D75 — Opt-in minimal repair of illegal input placements¶
Decision¶
With --repair-input (off by default), placement legality for choosing a result is absolute: an input with an overlap or outline violation involving a movable part (board courtyard rule, else 0) is replaced, as the comparison baseline and fallback, by its minimal repair (place::repaired: only the conflicting movable parts re-placed at the nearest legal spot). routable seeds with the repair and verifies against it; other illegal seeds are routed for reference only and never become the incumbent. --route-check writes the repair when the new placement routes worse; eco starts from it. An input with no repair is compared as it is (old behaviour), and the report names the conflicts left.
Alternatives¶
Strict: never keep an illegal input, the best legal candidate wins even if it routes worse (14 of 30 PCBench tier-A hand placements have model conflicts, some clean in KiCad; tried: auto on LogicBoxen went 0 → 8 unrouted); keep the old rule and only report the conflicts (the private board would still output shorts); judge only conflicts involving moved parts (the old rule: a routable run kept an overlapping input plus one ECO move and called it "legal")
Reason¶
A result with overlapping parts is not a placement, whatever its route count, and the hand layout should stay as close as the conflicts allow. The model is conservative, so an unrepairable input is not presumed wrong. Chosen by the contributor's user over the strict and report-only variants. Made opt-in when merged (2026-10-07): by default the input is compared and kept as it is, as before, because the repair is never compared with the original (rule 4) and the conservative model moved a part of a placement KiCad calls clean (kitspace_threeboard: U1 by 0.25 mm in x and y). --scratch is unaffected. Tests: [m8] "with absolute seed legality illegal seeds are reference only unless the input is accepted as it is", "minimal repair: only parts in a conflict move".