Skip to content

fix: use physical duplicate lane placement - #138

Draft
ShiboSoftwareDev wants to merge 4 commits into
agent/repro-physical-duplicate-lane-placementfrom
agent/fix-physical-duplicate-lane-placement
Draft

fix: use physical duplicate lane placement#138
ShiboSoftwareDev wants to merge 4 commits into
agent/repro-physical-duplicate-lane-placementfrom
agent/fix-physical-duplicate-lane-placement

Conversation

@ShiboSoftwareDev

@ShiboSoftwareDev ShiboSoftwareDev commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Stack

Stacked on reproduction PR #137. Both PRs use the same fixture and SVG snapshot.

Problem

When two routes share one graph port, the prepass duplicates that port into two lanes. It previously kept the lanes only 0.025 mm apart even when the physical trace-plus-clearance spacing was 0.200 mm.

That mismatch let graph pathing choose an order that could not be drawn legally by the physical solver. The later stages then received overlapping lanes and could produce crossings or reject the route.

Fix

The duplicate-port prepass already calculates the real lane centers. This change uses those centers for:

  • boundary ordering and crossing checks;
  • serialized graph output consumed by the physical solver;
  • visualization.

The real coordinates are kept separate from optional routingCostX / routingCostY coordinates. Those optional coordinates preserve the previous distance-cost preference, so fixing physical topology does not also retune route selection across the board.

Insufficient-capacity behavior is unchanged: the prepass still exposes only the lanes that physically fit. Graphs without physical spacing inputs keep the legacy behavior.

Same fixture after the fix

Duplicate graph ports use physical spacing

The unchanged #137 fixture now measures 0.200 mm between lane centers. The red 0.1 mm traces and orange trace-plus-clearance envelopes no longer overlap.

Verification

  • GitHub-hosted Bun Test: passed (run)
  • same SVG fixture: passed in that hosted run
  • nothing was run locally

@vercel

vercel Bot commented Aug 2, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
tiny-hypergraph Ready Ready Preview Aug 2, 2026 9:46am

Request Review

@tscircuitbot

Copy link
Copy Markdown

Benchmark This PR

Run benchmarks by commenting on this PR:

/benchmark [benchmark.sh args...]
/benchmark --dataset <hg07|srj18> --limit <n> --solver <core|poly> --families <default|default+deep|all> --concurrency <n|auto>

Everything after /benchmark is forwarded directly to ./benchmark.sh.
The result comment shows the matching dataset from the latest stored main-branch benchmark artifact beside the PR run; main is not rerun for each PR benchmark request.

Examples:

  • /benchmark -> hg07, all samples, core solver
  • /benchmark --dataset srj18 --limit 20 -> first 20 srj18 samples
  • /benchmark --dataset srj18 --concurrency auto -> srj18 samples with runner CPU-count concurrency
  • /benchmark --sample sample002 -> one hg07 sample
  • /benchmark --limit 20 --solver poly -> first 20 hg07 samples with the poly solver
  • /benchmark --limit 40 --families default+deep -> first 40 hg07 samples with deeper candidate families

Any PR whose title contains [BENCHMARK TEST] will automatically run the benchmark workflow on PR updates.

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.

2 participants