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.
silkscreen-audit: bare ERROR when an obstacle has only "boxes" (eager dict.get default in silkscreen-obstacle-check.py)
What happens
adom-aiflow silkscreen-audit --input audit.json answers ERROR: with an empty message (no detail) when an obstacle carries only boxes, which the schema in skills/aiflow-silkscreen allows ("box" | "boxes").
Cause
tools/silkscreen-obstacle-check.py line 19:
any(overlaps(a,b) for a in label.get('boxes',[label['box']]) for b in o.get('boxes',[o['box']]))
Python evaluates the default argument of dict.get eagerly, so [o['box']] raises KeyError: 'box' for an obstacle that has boxes and no box, even though the default is never used. The same pattern applies to marks (label['box']). The CLI then prints a bare ERROR:.
Repro
{"obstacles": [{"id": "R1:body", "kind": "body", "layer": "F.SilkS", "boxes": [[0,0,1,1]]}],
"inventory": [{"id": "R1:body", "kind": "body", "layers": ["F.SilkS"]}],
"marks": [{"id": "R1", "layer": "F.SilkS", "text": "R1", "box": [2,2,3,3]}]}
python3 tools/silkscreen-obstacle-check.py --input that.json --out r.json -> KeyError: 'box'.
Fix
o['boxes'] if 'boxes' in o else [o['box']] (and the same for marks), and let the CLI show the checker's exception text. Workaround used meanwhile: give every obstacle its union box as well.
Also seen in the same run (adom-aiflow 0.2.6)
project-page --page <owner/slug> --create --private --no-pushprintsOK: project page https://wiki.adom.inc/<owner>/<slug> (updated), although nothing was pushed and the page does not exist. With--no-pushit should say the page was built locally and where.