test: repro #641 — interleaved GND/VCC brackets cross on the same chip edge#707
test: repro #641 — interleaved GND/VCC brackets cross on the same chip edge#707DPS0340 wants to merge 4 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
… same chip edge Pins the current behavior on bug-report-20260708T055430Z (the tscircuit#641 board): U_MCU's left edge interleaves GND and VCC_3V3 pins (3=GND, 4=VCC, 5=GND, 6=VCC), and MspConnectionPairSolver pairs same-net neighbors into two bracket traces that each enclose a pin of the other net. Interleaved brackets on the same edge always cross, visually shorting the rails. Also pins the tscircuit#674-family false junction on this board (FAULT connector crossing the U_MCU.18-R_FAULT_PULLUP.1 trace). A fix should remove the bracket-bracket crossing, e.g. per-pin net labels for interleaved same-edge rail pins.
85c75d2 to
15cde1c
Compare
|
Rebased onto current |
|
@mohan-bee thanks for the review on #700 — much appreciated. If you have a spare minute, this one is even lighter: 1 file, +78/-0, no production code touched. It's purely a characterization test for #641. Worth knowing before you look: it passes on So it doesn't fix anything — it just makes #641 visible to CI so a future fix has a tripwire. If you'd rather this repo not carry known-failing behavior as a passing test, I'm equally happy to close it; no attachment either way. |
Addresses @mohan-bee's review ("no snapshots"). The assertion only checked the crossing list, so the board was never rendered. Now the repro also pins the render, making the two crossings visually reviewable.
|
@mohan-bee fixed in 05a5e7f — the repro now pins the board render too: The test was only asserting the crossing list, so it never rendered anything. Now both are covered, which is more useful here anyway since the whole point is that the two brackets visibly cross. Full suite: 145 pass / 0 fail. Ready for another look whenever you have a moment. |
Following @mohan-bee's snapshot feedback on tscircuit#703/tscircuit#707, applying the same here pre-emptively: the assertion only checked which labels overlapped a chip body, so the board was never rendered. Now the relocated labels are visually reviewable.
mohan-bee
left a comment
There was a problem hiding this comment.
this is wrong .. please raise a bug report for repros and stuffs.
@mohan-bee flagged this as wrong, and it was. The tscircuit#641 board is already a bot-imported bug report (tests/bug-reports/bug-report-20260708T055430Z), and that directory carries its own snapshot test. Adding a second snapshot of the same board here duplicated it. The repro now only asserts the crossing list, which is the part specific to this issue; the render stays pinned by the existing bug report. Full suite 145 pass / 0 fail.
|
@mohan-bee understood, and you were right — my first attempt made it worse rather than better. I read "no snapshots" as "please add a snapshot", so I added one. That was the wrong fix: the #641 board is already a bot-imported bug report at Fixed in e471260 — the extra snapshot is gone. The repro now only asserts the crossing list, which is the part specific to #641; the render stays pinned by the existing bug report. If your point was broader — that a repro like this shouldn't live in Full suite 145 pass / 0 fail. |
Applying @mohan-bee's feedback from tscircuit#703/tscircuit#707 here too. The tscircuit#655 board is already a bot-imported bug report (bug-report-20260707T230831Z) with its own snapshot test, so the snapshot I added to this repro duplicated it. The repro keeps only the assertion specific to tscircuit#655 — which labels overlap a chip body. That assertion still fails on main and passes here. Full suite 145 pass / 0 fail.
The previous commit added tests/bug-reports/bug-report-636/, which repeats the mistake @mohan-bee already flagged on tscircuit#703/tscircuit#707: bug report directories are generated by .github/scripts/import-json-bug-report.ts and named from the issue's created_at, so they must not be hand-created. Issue tscircuit#636 was opened at 2026-07-07T23:08:31Z, and the bot-imported report for it already exists as bug-report-20260707T230831Z. The hand-made bug-report-636.json was a byte-identical copy of it — so tscircuit#636 is not a second board as its comment claimed, it is the same board tscircuit#655 already covers. Removes the duplicate directory and the duplicate test file, keeping the one assertion tscircuit#636 added that tscircuit#655 did not have: labels must stay on an orientation the input allows. Both assertions fail on main and pass here. Full suite 146 pass / 0 fail.
Same issue @mohan-bee flagged on tscircuit#703/tscircuit#707: bug report directories are generated by .github/scripts/import-json-bug-report.ts and named from the issue's created_at, so they must not be hand-created. Issue tscircuit#670 was opened at 2026-07-16T14:48:56Z and its bot-imported report already exists as bug-report-20260716T144856Z. The hand-made bug-report-20260716-long-trace-670/input.json was a byte-identical copy. Removes the duplicate and points the repro at the existing bug report. Full suite 145 pass / 0 fail.
|
@mohan-bee thanks for the reviews — both were right, and I've addressed the concrete part. Current state of this branch is a single file: No hand-made Before you spend more time on it, I want to check the premise rather than keep pushing: this PR only pins current behavior, it doesn't fix #641. The assertion records that the interleaved GND/VCC brackets still cross: If "this is wrong" meant characterization tests aren't wanted here — i.e. you'd rather see the actual fix (rendering interleaved same-edge rail pins as per-pin net labels instead of bracket traces) than a test that locks in the bug — then I'd rather close this and come back with the fix. Just say the word and I'll close it; no need to review further. For context on the related ones: #703 fixes the #674 connector crossings, and #716 (stacked on it) takes that board from 3 crossings to 0. The second crossing listed above is from that family and goes away there. |
Reworked to match how repro-only PRs land in this repo (e.g. tscircuit#691): a minimized input under tests/repros/assets/ plus a snapshot, rather than importing a bot-imported bug report directly. The scene is now a single chip with the four interleaved pins that cause the defect — U_MCU 3=GND, 4=VCC_3V3, 5=GND, 6=VCC_3V3, spaced 0.2 apart. MspConnectionPairSolver wires 3->5 and 4->6, and each bracket spans the other net's pin sitting between them, so they always cross. Net-label orientations are dropped from the minimized scene so the assertion covers the interleaved-bracket crossing on its own, with no label-driven routing mixed in: 2 traces, 1 crossing, down from the 6 traces and unrelated FAULT crossing carried by the full board. Full suite 145 pass / 0 fail.
|
@mohan-bee reworked this to match how repro-only PRs actually land here (7343e1d). I went and looked at #691 — your merged repro-only PR for #687 — and copied its shape: a minimized input under The scene is now one chip with just the four pins that cause the defect:
I also dropped the net-label orientations from the minimized scene, so the assertion is the interleaved-bracket crossing on its own with no label-driven routing mixed in. That takes it from the full board's 6 traces (including an unrelated FAULT crossing) down to 2 traces / 1 crossing. Full suite 145 pass / 0 fail. If you'd still rather not carry a known-failing behavior as a passing assertion, say the word and I'll close it — no attachment, I just didn't want #641 to be invisible to CI. |
|
@mohan-bee following up once, then I'll act on whatever you prefer rather than keep pushing revisions. Your second review said "this is wrong .. please raise a bug report for repros and stuffs", and I took that to mean repro-only PRs aren't wanted here. But I went and checked how repros actually land in this repo, and I want to make sure I'm not misreading you. #695 (merged 2026-07-23, techmannih) — the most recent repro merge — has exactly the file shape this PR now has: versus mine: Same three files, same layout. #619 (MustafaMulla29) and #588/#587/#589 (Sang-it, an outside contributor) are the same pattern. So the structural objections from your first review are addressed, and the layout now matches what gets merged. That leaves two readings of your second comment and I'd rather ask than guess:
Either way I'm not going to push another revision at you. Just tell me 1 or 2 — or close it yourself, which I'll read as (1) and take no offence at. For context on why I care about the underlying bug rather than the PR: #641 is still open and unfixed, and the crossing it describes is reproducible on current |
Reproduction PR for #641, following the repo's repro-first workflow. Uses
bug-report-20260708T055430Z(already in the repo via #642 — the input JSON is byte-identical to the #641 attachment).The defect
U_MCU's left edge interleaves GND and VCC_3V3 pins (3=GND, 4=VCC, 5=GND, 6=VCC).
MspConnectionPairSolverpairs same-net neighbors, producing two bracket traces that each enclose a pin of the other net:Interleaved brackets on the same edge always cross — the GND/VCC rails short visually. Same family as
repro-atmega328p-missing-gnd-netlabel, where the boxed-in bracket's label is silently dropped.The test also pins this board's #674-family false junction (FAULT connector crossing
U_MCU.18-R_FAULT_PULLUP.1), so both defects on this board are tracked.A fix should eliminate the bracket-bracket crossing — likely by rendering interleaved same-edge rail pins with per-pin net labels instead of bracket traces. Happy to follow up with that fix PR once this repro lands.