Skip to content

test: repro #34 — generated connector rail runs parallel to same-net trace rail#708

Closed
DPS0340 wants to merge 1 commit into
tscircuit:mainfrom
DPS0340:repro/34-close-parallel-rails
Closed

test: repro #34 — generated connector rail runs parallel to same-net trace rail#708
DPS0340 wants to merge 1 commit into
tscircuit:mainfrom
DPS0340:repro/34-close-parallel-rails

Conversation

@DPS0340

@DPS0340 DPS0340 commented Jul 24, 2026

Copy link
Copy Markdown

Reproduction PR for the remaining #34 symptom, following the repo's repro-first workflow.

The rail-alignment cleanup from #663 handles most same-net close-rail cases, but generated net-label connector traces are excluded from the eligible set: traceCleanupSolver2 derives eligibleTraceIds from the first cleanup pass, which runs before AvailableNetOrientationSolver creates the connectors.

On example45 (already in the repo) the generated SDA connector runs a vertical rail at x=10.42 while the same-net R10.2->CONN1.3 trace runs a parallel rail 0.166 away at x=10.58, with 0.5 of overlapping length — two rails that should be one line:

R10.2-CONN1.3:                   (10.15,0.70)->(10.58,0.70)->(10.58,0.10)->(11.02,0.10)
available-net-orientation-1-SDA: (10.37,0.70)->(10.42,0.70)->(10.42,0.20)->(10.32,0.20)

The test asserts exactly this unmerged rail pair (with a visual snapshot), so a fix flips the assertion to .toEqual([]).

Proposed fix in #700 (separate PR, /claim #34 there): add the generated available-net-orientation-* traces to the alignment pass's eligible set — the existing #663 merging machinery then pulls them onto the shared coordinate. Happy to rebase #700 on this repro once it lands.

…same-net trace rail

Pins the remaining tscircuit#34 symptom on example45: the rail-alignment cleanup
from tscircuit#663 excludes generated net-label connector traces (eligibleTraceIds
is derived from the first cleanup pass, which runs before
AvailableNetOrientationSolver creates connectors), so the SDA connector
rail at x=10.42 stays 0.166 from the same-net R10.2-CONN1.3 rail at
x=10.58 instead of merging onto one line.

A fix should flip the assertion to .toEqual([]).
@vercel

vercel Bot commented Jul 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
schematic-trace-solver Ready Ready Preview, Comment Jul 24, 2026 11:50am

Request Review

@DPS0340

DPS0340 commented Jul 25, 2026

Copy link
Copy Markdown
Author

Superseded by #700, which covers this case with tests/repros/repro-same-net-rail-merge-34.test.ts plus the fix for #34. Closing this standalone repro.

@DPS0340 DPS0340 closed this Jul 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant