Skip to content

Prefer preserving caller-owned routes during rerip - #170

Open
ShiboSoftwareDev wants to merge 1 commit into
mainfrom
fix/prefer-preserved-routes-during-rerip
Open

Prefer preserving caller-owned routes during rerip#170
ShiboSoftwareDev wants to merge 1 commit into
mainfrom
fix/prefer-preserved-routes-during-rerip

Conversation

@ShiboSoftwareDev

Copy link
Copy Markdown
Contributor

Root cause

The autorouter's stable-initial-assignment subclass restores fanout routes after a whole-graph rerip, but tiny-hypergraph's partial-rip optimizer had no ownership hook. It therefore reopened caller-owned fanout routes during quality optimization even though ordinary routes crossed the same hot regions.

In the SRJ29 sample003 reproduction this changed 18 preloaded fanout sections across six partial-rip rounds. Pipeline 9 later received reconstructed through_obstacle traces and failed exact repair.

Fix

Add one explicit getRouteIdsPreferredForPreservation() hook shared by both rerip modes:

  • quality partial rerips retain preferred routes and reopen other routes in the hot region;
  • completion selective rerips first search for another blocker owner;
  • a preferred route remains eligible when it is the only blocker, so this does not make routes immutable or disable reripping.

Default behavior is unchanged because the base hook returns an empty set. The autorouter's existing StableInitialAssignments subclass opts in for its preloaded route IDs.

Result on the real reproduction

srj29 sample003, Pipeline 10, 1x effort:

Before After
Completion failed 100%
Relaxed DRC failed 100%
Runtime 69.7s to failure 101.7s solved
Vias n/a 39

Tests

  • bun test tests/outside-in-partial-rip-tiny-hypergraph-solver.test.ts tests/selective-rerip-tiny-hyper-graph-solver.test.ts
  • Real PCB reproduction is tracked in the stacked capacity-autorouter reproduction PR.

@vercel

vercel Bot commented Aug 16, 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 16, 2026 3:21pm

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.
Every command runs current main and the PR head sequentially on the same Blacksmith machine, then reports their results side by side.

Examples:

  • /benchmark -> all committed completed SRJ18 Pipeline7 cases, core solver
  • /benchmark --limit 4 -> first four committed Pipeline7 cases
  • /benchmark --dataset srj18 --concurrency auto -> srj18 samples with runner CPU-count concurrency
  • /benchmark --sample sample003 -> one committed SRJ18 Pipeline7 case
  • /benchmark --dataset hg07 --limit 20 --solver poly -> first 20 hg07 samples with the poly solver
  • /benchmark --dataset hg07 --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