AI Flow
Public Made by Adomby adom
Adom's AI Flow: a tool to help the AI follow all of the steps it takes to build a board.
Laser-mark planner collapses same-parent STEP instances onto one terminal
Environment: adom/adom-aiflow 0.1.57, source base fdc07ea6f58626f3c4fd2249d0a8702e12eff5e7; Python planner on Linux. Visual readback: Pup 2.0.701 via Adom Bridge 2.1.170 on Windows (AdomLapper). No bridge cause identified.
STEP files with two occurrences of one child inside the same assembly were silently corrupted by the laser-mark planner: flatten() keyed placement by child representation and only rejected different parents. The second terminal's transform replaced the first, putting both capacitor terminals on one side.
This patch rejects every repeated child before mutating frames or geometry, matching the function's existing documented unsupported-instancing contract. It preserves the working single-occurrence transform path. It is a fail-closed repair, not new support for flattening repeated instances; an assembly-preserving mark workflow or occurrence expansion remains the appropriate follow-up.
Reproduced on Panasonic EEE-FK1V470P's manufacturer DS_Alumi_D STEP (original SHA-256 106f4f2536962b705e711953ebb791b3bf960613fa523da4aafc93386a18a86b). The preserved original and original GLB have opposing terminals; the prior marked STEP and hero contain overlapping terminal occurrences. The component page is repaired by retaining the original XCAF assembly and adding only the marking sheet: https://wiki.adom.inc/john/eee-fk1v470p
Base: fdc07ea6f58626f3c4fd2249d0a8702e12eff5e7. Two Python files only; no Rust, bridge, runtime or release changes. Current immutable base blob compared; tools/pr_preflight.py passed and every diff hunk reviewed.
Validation: python3 -m unittest discover -s tools/laser-etch -p test_step_instances.py -v: 3 passed (same-parent instances, different-parent instances, single-occurrence transform/idempotence). Manufacturer fixture also refuses before mutation. Component repair separately passes native OpenCascade STEP solid validity, bounds, volume and Boolean intersection checks and decoded GLB world-coordinate terminal checks. No native Fusion/Altium/KiCad application-import claim.
Maintainer follow-up: merge and release the guard, update chip-thumbnailer's vendored planner/step_text.py, and support occurrence-preserving mark composition so instanced manufacturer models can be processed without flattening. The marked component itself is rebuilt without the damaged flattener. This PR is not deployed to installed packages or shared runtimes.
Repro: load the manufacturer STEP into Step and call flatten(); both terminal occurrences in the same parent pass the old guard and acquire one placement. Expected: preserve two opposite placements or reject unsupported instancing without modifying the source. Actual: silent corruption, no error message. First observed in the existing marked component assets; original creation date not established.
Fix PR: https://wiki.adom.inc/adom/adom-aiflow/prs/30 The attached corrected underside shows the two separate leads restored from the vendor assembly. Native before/after evidence and validation are in the component provenance folder.
