Closed bug report

Molecule check: renaming MP1-MP4 in place is reported as a move, and gate stops before DRC (patch attached)

noah · ·closed by John Lauer

Found on a hands-on run of AM32 ESC v1, 0.2.51; the code is unchanged in 0.2.54.

What happened. The start board numbered its corner pins against the molecule rule (MP1 back-left). AI Flow's own molecule check asked for MP1 front-left, so the human renamed MP1-MP4 in the schematic: same four footprints, same positions, same rotations, new designators. From then on molecule check, gate and finish report ERROR fixed references moved since the run started: MP1 (40.00, 40.00) -> (40.00, 72.00); MP2 ..., though nothing moved.

Why it matters. gate stops on that error before it runs DRC, so the run cannot record DRC at all, and spec.molecule.fixed cannot help: MP1 is always compared with the start board. The hint ("Put them back where the start board had them") would undo the rename the rule asked for.

Fix (attached, rename-fix-0.2.54.patch). When every "moved" fixed reference now sits exactly where another moved reference sat on the start board (same footprint library, position within 0.005 mm, rotation within 0.01 deg, matched one to one), report OK N fixed references renamed in place, nothing moved: MP1 is the part that was MP3; .... A rename plus any real move still errors, and the rest of the check judges the new names (MP1 front-left) as before. A new unit test corner_pins_renamed_in_place_are_not_moved covers both cases. All 358 tests pass on the 0.2.51 base; the patch applies cleanly to 0.2.54's checks.rs. With it, this board's gate ran DRC: 0 errors, 0 unconnected.

rename-fix-0.2.54.patch

1 Reply

John Lauer ·

Thanks Noah, and thanks for the patch: it went in as you wrote it.

What was wrong. The molecule check compared every fixed reference by name with the start board. After you renamed MP1 to MP4 to match the rule (same four footprints, same positions, same rotations), it looked up "MP1" on the start board, found the part that used to carry that name, and reported a move that never happened. On top of that, gate treated any molecule error as a reason to stop before DRC, so the run could not record DRC at all.

What changed (in adom-aiflow 0.2.56).

  • Your rename-in-place rule: when every "moved" fixed reference sits exactly where another moved reference sat on the start board (same footprint, position within 0.005 mm, rotation within 0.01 deg, matched one to one), the check says OK N fixed references renamed in place, nothing moved: MP1 is the part that was MP3; .... A rename plus any real move is still reported as a move, and the rest of the check judges the new names (MP1 front-left).
  • gate no longer stops before DRC on a molecule finding. It prints the molecule findings as a note, runs DRC and records it (gate.json and the run), and then its last line lists the open molecule findings with the suggestion to fix them and gate again. finish still lists anything left. AI Flow suggests; it does not stop the run.

How it was verified. Your unit test corner_pins_renamed_in_place_are_not_moved (both cases) is in and passes, with the full unit suite and every workflow suite.

Upgrade: tell your AI "give me the latest adom-aiflow" (or adom-wiki pkg install adom/adom-aiflow); adom-aiflow --version says 0.2.56.

John Lauer closed this ·

Log in to reply.