fix: skip MSP pair creation for net-label-only connections (fixes #79)#563
Closed
singhaditya21 wants to merge 1 commit into
Closed
fix: skip MSP pair creation for net-label-only connections (fixes #79)#563singhaditya21 wants to merge 1 commit into
singhaditya21 wants to merge 1 commit into
Conversation
When pins are connected only via netConnections (net labels), the solver was incorrectly creating MSP pairs and routing traces between them. This produced spurious traces alongside the net labels, causing the NetLabel- PlacementSolver to place an extra net label on the trace in addition to the individual pin labels — the duplicate label visible in repro61. The fix filters queuedDcNetIds in MspConnectionPairSolver to exclude any global net whose component pins all lack a presence in directConnMap. Nets with at least one pin directly wired (directConnections) continue to produce MSP pairs and routed traces as before; purely label-only nets receive only net label placements. Changes: - MspConnectionPairSolver: filter net-label-only nets from MSP queue - Add SchematicTracePipelineSolver_repro61.test.ts regression test - Update MspConnectionPairSolver_repro1 expected pair count (4 → 2) - Update repro130 and repro126 tests to reflect no spurious traces - Regenerate 18 SVG snapshots Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Author
|
Friendly nudge 🙂 — CI is green and this is mergeable whenever you have a moment. Happy to rebase or address any feedback if it helps. Thanks for the great project! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When two or more pins are connected only via
netConnections(net labels like GND, VCC), theMspConnectionPairSolverwas incorrectly queuing those nets for MSP pair creation and routing physical traces between the pins.This caused a spurious trace to appear between components that should only display individual net labels, and the
NetLabelPlacementSolverwould then add an extra net label on that trace — producing the duplicate label visible in the repro61 screenshot (issue #79).Solution
Filter
queuedDcNetIdsinMspConnectionPairSolverto exclude any global connectivity net whose component pins do not appear indirectConnMap. Nets with at least one pin indirectConnectionscontinue to produce MSP pairs and routed traces as before. Purely label-only nets (only innetConnections) receive only net label placements — no redundant trace.Changes
MspConnectionPairSolver.ts: filter net-label-only nets from the MSP queueSchematicTracePipelineSolver_repro61.test.ts— verifies no MSP pairs and no traces are created for net-label-only connections; GND and VCC labels are still placedMspConnectionPairSolver_repro1.test.ts— corrects expected pair count from 4 to 2 (GND was net-label-only, only VCC and EN pairs remain)repro130andrepro126— updated assertions to reflect that net-label-only nets no longer produce routed tracesTest Results
All 72 tests pass, 4 skipped, 0 failures.
/claim #79
fixes #79