Live Agent working · engine-01 Placer/router engine positioning
Back to Architecture
Worklog - 2026-05-05

Let KiCad's exact DRC evidence
drive the last endpoint patches.

The router was close enough that KiCad could point directly at the remaining opens. The missing step was letting those exact endpoint pairs become bounded, DRC-gated repair candidates instead of treating every direct patch as a tiny local stitch.

Before
0S / 3U
Nix-backed real DRC baseline
After
0S / 2U
one accepted endpoint bridge
Run
1309s
seed 42, 1 round, 2000 iters
Baseline

The pinned KiCad benchmark made the real floor visible

After moving KiCad CLI behind the Nix flake, pipeline:zero 42 1 2000 produced a real, repeatable board: 0 shorts / 3 unconnected, 211 routes, 205 vias, score 3.0. That became the first trustworthy target after the phantom baseline and host-tool drift were removed.

Observed

KiCad had exact endpoint evidence the router was ignoring

The DRC JSON reported pad-to-pad missing connections with precise endpoint coordinates. The pipeline already had a direct endpoint patch pass, but it only admitted short local gaps. These failures were longer board-level gaps, so the direct patcher never got a chance to try them.

Fixed

Direct endpoint hints now scale to exact DRC gaps

The hint builder now derives each direct bridge budget from the DRC endpoint distance, capped to keep it bounded, instead of hard-capping all endpoint pairs at 8 mm. The inputs are KiCad DRC endpoints, pad refs, and stackup layers. There are no board-specific net or component names in the implementation.

Fixed

Same-round direct patching uses the physical copper stackup

The net-component patch path already passed the board stackup as physical copper layer names. The same-round and final direct patch paths now do the same, so via-span obstacle checks agree with the real six-layer board rather than only the compressed signal-layer index.

Fixed

Exact-gated patch acceptance can defer to KiCad DRC

One direct bridge joined its endpoints and removed a failed net, but the router proxy conflict counter increased. The default direct patch API stays strict. The pipeline now uses a separate exact-gated API only where it immediately writes the candidate PCB, runs KiCad DRC, and restores the prior route unless the full DRC score improves.

Result

0 shorts / 3 unconnected became 0 shorts / 2 unconnected

pipeline:zero 42 1 2000 on commit a72ace9f with this patch: 213 routes, 209 vias, score 2.0, 0 shorts / 2 unconnected in 1309.2s. The accepted bridge was generic DRC-driven endpoint repair, not a named-net exception.

Still Open

The last two are candidate-validation blocked

The remaining endpoint candidates are found, but pre-commit geometry validation rejects them before KiCad can score a transaction. The next generic fix is to make direct-patch candidate validation use the same physical layer model as obstacle construction and post-commit sweeps, then let exact DRC decide only the candidates that are internally coherent.

Reproduce
mise run pipeline:zero 42 1 2000

# Result:
#   bench-results/a72ace9f-s42-r1-i2000-1777958028.json
#   /tmp/kvm-bench/a72ace9f-s42-r1-i2000-1777958028/board.kicad_pcb
#   213 routes, 209 vias, 0S/2U, score 2.0