Skip to content

Add same-net trace combining phase#303

Open
Iineman2 wants to merge 3 commits into
tscircuit:mainfrom
Iineman2:fix-same-net-trace-combining
Open

Add same-net trace combining phase#303
Iineman2 wants to merge 3 commits into
tscircuit:mainfrom
Iineman2:fix-same-net-trace-combining

Conversation

@Iineman2
Copy link
Copy Markdown

@Iineman2 Iineman2 commented May 11, 2026

/claim #34
/claim #29

Summary

  • add a post-cleanup SameNetTraceCombiningSolver phase to the schematic trace pipeline
  • snap only close overlapping internal same-net horizontal/vertical segments onto a shared run
  • preserve pin endpoint segments and reject snaps that would intersect different-net traces
  • also covers the same-X/same-Y close same-net merge case from Merge same-net trace lines that are close together (make at the same Y or same X) #34; example34 passes with this pipeline phase

Verification

  • npx --yes bun test tests/solvers/SameNetTraceCombiningSolver/SameNetTraceCombiningSolver.test.ts
  • npx --yes bun test tests/examples/example29.test.ts
  • npx --yes bun test tests/examples/example30.test.ts
  • npx --yes bun test tests/examples/example34.test.ts
  • npx --yes bun run build
  • npx --yes biome format lib/solvers/SameNetTraceCombiningSolver/SameNetTraceCombiningSolver.ts lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver.ts tests/solvers/SameNetTraceCombiningSolver/SameNetTraceCombiningSolver.test.ts
  • git diff --check

Note: bun run format:check currently reports repo-wide CRLF formatting drift in many pre-existing files, so I verified formatting on the changed files directly.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 11, 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 11, 2026 4:00pm

Request Review

@Iineman2
Copy link
Copy Markdown
Author

Format check is green after e8b0679. Current PR checks are all passing: test, type-check, format-check, and Vercel.

@Iineman2
Copy link
Copy Markdown
Author

Iineman2 commented May 11, 2026

Added durable before/after visual proof for the #34 surface from the SVG snapshots:

The files compare origin/main against the current PR head for tests/examples/example34.test.ts, alongside the focused SameNetTraceCombiningSolver regression tests already in the branch.

@Iineman2
Copy link
Copy Markdown
Author

Added a small extra coverage pass after the visual proof: the focused solver suite now also checks vertical same-net snapping and verifies that the merge-distance / minimum-overlap thresholds leave non-qualifying same-net segments unchanged.

Verification after the update:

  • npx --yes bun test tests/examples/example29.test.ts tests/examples/example30.test.ts tests/examples/example34.test.ts tests/solvers/SameNetTraceCombiningSolver/SameNetTraceCombiningSolver.test.ts
  • CI is green again: test, format-check, type-check, and Vercel.

@Iineman2
Copy link
Copy Markdown
Author

Quick review-ready status update for maintainers: PR #303 is still green across test, type-check, format-check, and Vercel after the extra solver coverage. The branch has focused proof for both claimed surfaces (#29 and #34), including before/after visual assets and the demo video linked above. Happy to trim or tune the merge thresholds if you want a narrower acceptance window.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant