Skip to content

Add same-net trace segment combine phase#414

Open
brain-nrds wants to merge 2 commits into
tscircuit:mainfrom
brain-nrds:bounty/issue-29-combine-close-same-net-segments
Open

Add same-net trace segment combine phase#414
brain-nrds wants to merge 2 commits into
tscircuit:mainfrom
brain-nrds:bounty/issue-29-combine-close-same-net-segments

Conversation

@brain-nrds
Copy link
Copy Markdown

@brain-nrds brain-nrds commented May 22, 2026

/claim #29

Summary

  • Adds a TraceCleanup pipeline phase that combines close, overlapping same-net segments before turn minimization.
  • Snaps only movable segments onto a same-net target segment, preserving trace endpoints so pin anchors are not moved.
  • Covers cross-trace merging, same-trace loop cleanup, different-net skips, and endpoint-anchored segment skips.
  • Updates the two visual snapshots that intentionally change because duplicate/nearby same-net segments are now combined.
  • Adds typescript as a dev dependency so the existing tsup build can resolve its peer dependency with npm.

Testing

  • npm run format:check
  • npm run build
  • npx tsup lib/solvers/TraceCleanupSolver/combineSameNetTraceSegments.ts --format esm --out-dir /private/tmp/trace-combine-test --no-dts
  • node --input-type=module -e "<helper assertions>"
  • GitHub CI: Bun Test, Format Check, Type Check, Vercel

@vercel
Copy link
Copy Markdown

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

Request Review

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.

2 participants