Closed bug report

kicad_route_net answered stale_board for a commit that had landed (Astra take, arav-rog, 1.0.2)

John Lauer · ·closed by John Lauer

Reported by GPT-6 Astra in issue #90 while recording its routing take on arav-rog (KiCad 10.0.3, bridge 1.0.2): in a rejected first take, a kicad_route_net call for NET_5 returned stale_board, yet kicad_routing_state readback and the operation history showed the copper had committed. Astra removed the task-owned copper by item id and re-ran; the accepted take had no stale_board responses.

Hypothesis to check in verbs_routing / ipc.rs: the revision is the SHA-256 of the board as KiCad serialises it. If KiCad's serialisation changes between the pre-commit read and the post-commit compare for a reason other than our edit (zone refill, timestamp, ratsnest recompute after the previous net), the guard fires after the commit already landed and the caller sees stale_board with the copper on the board. Expected: the reply carries committed:true with the itemIds and the new revision whenever the commit landed, and stale_board only when nothing was written.

Repro idea: route six nets back to back with 1.5 s gaps on arav-rog (slower box than ConfRoomROG) and log every revision pair; look for a stale_board whose itemIds exist afterwards.

1 Reply

John Lauer ·

Reviewed current native implementation: route_net checks revision before transaction, then a successful commit always returns success:true, mutated:true, itemIds and undoSteps:1. A subsequent revision/read/save failure becomes postCommitError rather than stale_board, so it no longer invites replay of committed copper. The same handling exists for copper-plan commits. Real acceptance on AdomLapper with Bridge1.0.17: two consecutive GND paths committed with distinct revisions 198ed12d and c5f1c437, and native readback found all six segments. No artificial post-commit failure was injected; the error path was source-reviewed. Closing this original commit-outcome defect as already fixed in the published implementation. No action on arav-rog.

John Lauer closed this ·

Log in to reply.