fix: merge generated net-label connector rails with same-net traces (#34)#700
fix: merge generated net-label connector rails with same-net traces (#34)#700DPS0340 wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Following the repo's repro-first workflow: opened #708 as the standalone reproduction PR for the remaining #34 symptom (pins the unmerged SDA/R10.2-CONN1.3 rail pair on example45 with a visual snapshot). This PR is the fix that flips that repro's assertion to |
Fixes tscircuit#34 for generated net-label connector traces. The aligning_same_net_rails cleanup pass (traceCleanupSolver2) restricted eligibleTraceIds to traces that existed at the first cleanup pass. Net-label connector traces generated later by AvailableNetOrientationSolver were excluded, so a generated rail could run parallel to a same-net trace rail 0.1-0.3 apart without ever being merged (visible in example45, where the SDA connector rail at x=10.42 ran beside the R10.2->CONN1.3 rail at x=10.58). Generated available-net-orientation traces are now added to the eligible set for the alignment pass, letting the existing rail-group merging pull close same-net rails onto one coordinate. Adds a regression test asserting no close parallel same-net rails remain in example45, and updates snapshots for the three boards whose rails now merge (example45, example49, bug-report-20260707T134549Z).
5a0f2fe to
48b30cc
Compare
|
Rebased onto current If you're triaging my open PRs on this repo, this is the cheapest one to review first: 5 files, +83/-6, one behavioral change in The regression test is meaningful in both directions: Full suite: 145 pass / 0 fail. For ordering, my open PRs here go smallest-first: #700 (+83/-6) → #707 (+78/-0, characterization only) → #699 (+462/-324) → #703 (+712/-50) → #702 (largest, mostly regenerated snapshots). Happy to split #702 further if the size is what's holding it up — just say the word. |
|
@imrishabh18 @mohan-bee — you've both merged in this repo recently, so tagging you rather than leaving this sitting: would one of you be able to review? This is the smallest of my open PRs here (5 files, +83/-6, one behavioral change in The regression test is meaningful both ways: Full suite 145 pass / 0 fail, CI green. If it's easier to batch, my open PRs here smallest-first are: #700 (+83/-6), #707 (+78, characterization only), #699, #703, #702. Happy to split #702 if its size is the blocker. |
|
Thanks for the review @mohan-bee. @seveibar — this one is approved and Quick summary for the merge decision: it's +83/-6 across 2 files. No rush — flagging it because it's been sitting approved and I didn't want it to get lost in the queue. |
|
@mohan-bee gentle nudge — this has been APPROVED and Flagging it because that's unusual for this repo rather than to rush anyone: #694 went approved → merged in 4 minutes, and you merged #712 yourself, so I don't think this is waiting on permissions. It looks more like it just slipped off the list after the approval. Recap so it's cheap to action:
If you'd rather someone else press the button, @MustafaMulla29 has merged most of the recent ones. And if there's something you spotted after approving that you'd like changed, I'm happy to take it — just say so. |
|
@MustafaMulla29 @techmannih — one small ask, not a review request for everything I have open. #700 has been APPROVED and For calibration, the usual gap in this repo is minutes — #694 went approved → merged in 4 minutes, and #697/#695 merged with no approval at all. So this one sitting is unusual rather than me being impatient. It's the smallest thing I have open: +83/-6, one source file plus its test. Fixes generated net-label connector rails not merging with same-net rails; the regression test fails on I know I have a lot of PRs open here and I don't expect them reviewed as a batch — I'd rather land one and let that inform the rest. If any of them are unwelcome, say so and I'll close them; I'd genuinely prefer that to leaving a queue nobody wants. If there's something you'd like changed on #700 that wasn't caught in the approval, happy to take it. |
/claim #34
Fixes the remaining #34 symptom: close parallel same-net rails left unmerged when one of them is a generated net-label connector trace.
Reproduce in an example file (as requested)
On current
main,example45shows the exact symptom from the issue screenshot: the generatedSDAnet-label connector runs a vertical rail atx=10.42while the same-netR10.2 -> CONN1.3trace runs a parallel rail 0.166 apart atx=10.58, with 0.5 of overlapping length — two rails that should be one line.Root cause
The
aligning_same_net_railscleanup pass added in #663 (traceCleanupSolver2) restrictseligibleTraceIdsto traces that existed at the first cleanup pass:Net-label connector traces are generated later by
AvailableNetOrientationSolver, so they're never eligible for rail alignment — the merging machinery from #663 simply never sees them.Fix
Add the generated
available-net-orientation-*traces from the pre-alignment collision output to the eligible set. The existing rail-group merge (alignSameNetRails) then pulls them onto the shared coordinate — no changes to the alignment algorithm itself. All existing safety checks (obstacle collisions, label anchor preservation, readability scoring) still apply.Demonstrate fix before/after (as requested)
After the fix, the SDA connector rail merges onto
x=10.42with the same-net trace:Snapshots updated for the three boards whose rails now merge:
example45,example49,bug-report-20260707T134549Z. I scanned all example and bug-report boards with a close-parallel-rail detector before/after: example45's finding is eliminated and no new ones appear anywhere.Verification
tests/repros/repro-same-net-rail-merge-34.test.tsasserts no close parallel same-net rails remain in example45 (fails onmain)bun test— 141 pass, 0 failbunx tsc --noEmit/bunx biome check— clean