Skip to content

fix: prevent mutation of directConnMap when creating netConnMap (#79)#359

Open
pon024587-collab wants to merge 1 commit into
tscircuit:mainfrom
pon024587-collab:fix/connectivity-map-mutation
Open

fix: prevent mutation of directConnMap when creating netConnMap (#79)#359
pon024587-collab wants to merge 1 commit into
tscircuit:mainfrom
pon024587-collab:fix/connectivity-map-mutation

Conversation

@pon024587-collab
Copy link
Copy Markdown

Summary

Fixes #79 - eliminates extra trace lines and redundant net labels by preventing unintended mutation of the connectivity map.

Root Cause

In getConnectivityMapsFromInputProblem.ts, the netConnMap was initialized using directConnMap.netMap by reference. This caused logical net-label connections to be inadvertently added to the physical directConnMap.

Changes

  • Implemented deep cloning of directConnMap.netMap to ensure that directConnMap remains pure and only contains physical connections.

Testing

✅ All 57 existing tests pass.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 16, 2026

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

Project Deployment Actions Updated (UTC)
schematic-trace-solver Ready Ready Preview, Comment May 16, 2026 4:17pm

Request Review

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.

Fix extra net label in repro61, or remove trace

1 participant