Skip to content

Improve SRJ18 path negotiation and copper clearance repair - #2447

Draft
seveibar wants to merge 142 commits into
mainfrom
codex/srj18-ninety
Draft

Improve SRJ18 path negotiation and copper clearance repair#2447
seveibar wants to merge 142 commits into
mainfrom
codex/srj18-ninety

Conversation

@seveibar

@seveibar seveibar commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Follow-up to merged #2442. Crowded boards can lose shared routes during rip-up, cross fixed copper during repair, or exhaust the time limit on repeated path and clearance work. This PR corrects shared ownership and copper geometry, and replaces the specialized precision portfolio with bounded negotiated repair.

Current result: 12/16 DRC passing (75.0%), versus 10/16 (62.5%) on main. This improves SRJ18 by 12.5 percentage points, but does not meet the original >90% target or the requirement to avoid a large performance drop. The PR remains draft because performance and broader regression checks are unresolved.

The pipeline uses clearance projection and bounded sweeps of via coalescence, terminal escape repair, regional repair, and projection. Regional searches share a work budget. Candidate acceptance checks reference DRC improvement, fixed copper, and via-pad contacts. Selection does not use dataset IDs or initial error-count thresholds, and the structural Pipeline9ExactRepairSolver = BaseSolver & ... alias is removed.

Geometry fixes preserve shared-cell ownership, physical A03 coordinates, exact via anchors, and full trace/via copper dimensions. Repair inputs carry immutable copper. Terminal necking follows pad width and reaches full width after exiting the pad. Pipeline 7 performs exact repair, clearance projection, and the shared bounded regional operation using physical board bounds and preloaded copper.

Performance changes reduce repeated path searches, port-owner lookups, spatial queries, connectivity lookups, and distance calculations. The final Repair03 dependency also avoids rebuilding unused force-move indexes while enumerating layer topologies. The benchmark, dataset, reference checker, declared clearances, trace widths, via diameters, and time limits are unchanged.

Measurement Main 207c4191 PR runtime 97ca852c
DRC passing 10/16 (62.5%) 12/16 (75.0%)
Completion 13/16 (81.3%) 13/16 (81.3%)
Timeouts 1 3
DRC issues across solved samples 51 2
P50 time 103.2s 155.6s (+50.7%)
P90 time 313.9s 360.0s (+14.7%)
P95 time 336.9s 360.0s (+6.8%)
Average vias 210.92 192.85 (-8.6%)

The final same-machine comparison uses /benchmark --same-machine --dataset 18 and the standard 360-second limit. Later commits only update reviewed SVG snapshots; their production code and dependency pins match this run. Samples 13 and 14 become DRC passing. Sample 2 regresses from a completed route with DRC errors to a timeout. Samples 2, 6, and 15 time out in joint repair. Sample 16 retains two input-related contacts, including overlapping foreign-net pads. The issue total excludes timed-out samples.

An earlier revision reached 93.8%, but it predates required copper and via-pad guard corrections. That score does not describe this PR's final runtime.

Validation and remaining work:

  • Production build, TypeScript, format CI, and the added-code check pass on the benchmarked runtime. Local focused repair tests pass. Repair03 #116 has all checks green, including 113 tests and 4,030 assertions.
  • Reviewed native and Linux snapshots cover reports 64, 68, 73, 76, 77, 87, 88, 91, and 94. Existing functional and DRC assertions are retained; historically dirty fixtures are not claimed to be DRC clean.
  • The benchmarked-runtime CI run failed snapshot checks subsequently addressed by those updates. Report 94 completes locally with zero reference errors and clean materialized copper audits, but exceeds the hosted CI job allowance.
  • Report 96 remains unresolved: the native test passes its existing functional assertions, but the final route retains 95 reference DRC errors, its geometry review is incomplete, and its Linux run exceeds the existing test timeout. Its new snapshots are deliberately not accepted. CI is not fully green.

Supporting PRs are pinned to immutable commits:

seveibar and others added 23 commits September 7, 2026 10:37
Adapt the clearance precision repair from PR #2421 (61d59ac) onto current main. Require full reference DRC and physical margin before accepting candidate copper.
@vercel

vercel Bot commented Sep 7, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
capacity-node-autorouter Ready Ready Preview Sep 9, 2026 1:27am UTC

Request Review

@tscircuitbot

Copy link
Copy Markdown
Contributor

Benchmark This PR

Run benchmarks by commenting on this PR:

/benchmark [benchmark.sh args...]
/benchmark-long [benchmark.sh args...]
/benchmark-all [benchmark.sh args except --dataset]
/benchmark --same-machine
/benchmark-all --same-machine
/profile --dataset 18

Comment /benchmark to run the default dataset, or append any arguments accepted by ./benchmark.sh.
Comment /benchmark-long for an 8-vCPU run that defaults to 8 workers and has an eight-hour timeout.
Comment /benchmark-all to start separate workflow runs and result comments for dataset01 and dataset18. You may append benchmark arguments such as --pipeline 9; --dataset is not accepted because the command selects both datasets.
Append --same-machine to /benchmark or /benchmark-all to compare current main and the PR head sequentially on the same 8-vCPU Blacksmith runner.
Comment /profile --dataset 18 to compare direct Pipeline 7 stage-time percentages between current main and the PR head sequentially on one Blacksmith runner.

Everything after /benchmark, /benchmark-long, or /benchmark-all is safely forwarded to ./benchmark.sh, except --profile-solvers, which enables profile comparison tables, and --same-machine, which enables the paired runner.
Examples: /benchmark --dataset 18 --sample-timeout 2000s, /benchmark --pipeline 10 --dataset 29, /benchmark --pipeline 10 --dataset 29 --sample 1, /benchmark --pipeline 7 --limit 20, /benchmark all 20 --concurrency 8, /benchmark --same-machine, /benchmark-all --pipeline 9 --same-machine, and /benchmark-long --dataset 18.

Use /update-snapshots (or /us) to run BUN_UPDATE_SNAPSHOTS=1 bun test --timeout 120_000 on the PR branch and auto-commit snapshot updates.
Use /usf to read recent failed test files, update and verify their exact CI test shards, and auto-commit only their snapshots. It uses the configured fast benchmark runner by default; use /usf --ubuntu-latest for GitHub-hosted x64 CI parity.

Any PR whose title contains [BENCHMARK TEST] will automatically run one default-dataset benchmark on PR updates; it does not post a PR result comment.

@seveibar

seveibar commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

/benchmark --same-machine --dataset 18

@seveibar

seveibar commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

/benchmark --same-machine --dataset 1

@seveibar

seveibar commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

/benchmark --same-machine --dataset 18

@tscircuitbot

tscircuitbot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Same Machine Benchmark Results

Both revisions ran sequentially in one Blacksmith job on blacksmith-01m216wqjnfrc2ypgffm7yjqzb-8vcpu.

Dataset: srj18 · Scenarios: 16
Main: 207c419 · PR: b60d9b1

Solver Metric Main PR Delta
Pipeline9 Completion 81.3% (🕒6.3%) 87.5% (🕒12.5%) +6.2 pp
Pipeline9 Relaxed DRC pass 62.5% (🕒6.3%) 81.3% (🕒12.5%) +18.8 pp
Pipeline9 DRC issues 51 2 -49
Pipeline9 Timeouts 1 2 +1
Pipeline9 P50 time 104.9s 140.3s +33.8%
Pipeline9 P60 time 130.5s 210.6s +61.4%
Pipeline9 P70 time 218.3s 239.1s +9.5%
Pipeline9 P80 time 266.3s 330.3s +24.0%
Pipeline9 P90 time 315.4s 351.2s +11.4%
Pipeline9 P95 time 339.1s 360.0s +6.2%
Pipeline9 Average vias 210.92 217.43 +3.1%

Outcome changes: 3 improved, 0 regressed. DRC issues are totaled across solved samples. Timing percentiles include solved and timed-out samples; negative timing deltas are faster.

Changed outcomes (3)
Solver Sample Main PR Main time PR time Delta
Pipeline9 2 Solved (DRC failed) DRC passed 327.8s 330.3s Improved
Pipeline9 13 Solved (DRC failed) DRC passed 252.8s 197.0s Improved
Pipeline9 14 Failed DRC passed 146.9s 342.4s Improved

Workflow: View run
Artifact: Download raw reports

@seveibar

seveibar commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

/benchmark --same-machine --dataset 18

@tscircuitbot

tscircuitbot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Same Machine Benchmark Results

Both revisions ran sequentially in one Blacksmith job on blacksmith-01m21r3nhx8kvs1bt8ecspwztq-8vcpu.

Dataset: srj18 · Scenarios: 16
Main: 207c419 · PR: 97ca852

Solver Metric Main PR Delta
Pipeline9 Completion 81.3% (🕒6.3%) 81.3% (🕒18.8%) 0.0 pp
Pipeline9 Relaxed DRC pass 62.5% (🕒6.3%) 75.0% (🕒18.8%) +12.5 pp
Pipeline9 DRC issues 51 2 -49
Pipeline9 Timeouts 1 3 +2
Pipeline9 P50 time 103.2s 155.6s +50.7%
Pipeline9 P60 time 128.7s 231.5s +79.9%
Pipeline9 P70 time 215.9s 252.6s +17.0%
Pipeline9 P80 time 268.4s 347.0s +29.3%
Pipeline9 P90 time 313.9s 360.0s +14.7%
Pipeline9 P95 time 336.9s 360.0s +6.8%
Pipeline9 Average vias 210.92 192.85 -8.6%

Outcome changes: 2 improved, 1 regressed. DRC issues are totaled across solved samples. Timing percentiles include solved and timed-out samples; negative timing deltas are faster.

Changed outcomes (3)
Solver Sample Main PR Main time PR time Delta
Pipeline9 2 Solved (DRC failed) Timeout 324.5s 360.0s Regressed
Pipeline9 13 Solved (DRC failed) DRC passed 254.4s 231.5s Improved
Pipeline9 14 Failed DRC passed 150.3s 347.0s Improved

Workflow: View run
Artifact: Download raw reports

Native and Linux retain all four assertions and the reviewed physical contact lineage. Final reference errors are 52 versus 71 on the exact public baseline; no clean-board claim is made.
Both native and Linux retain all nine assertions, zero reference DRC errors, and zero physical via-pad or fixed-obstacle violations. Review used the physically installed final repair dependency.
@seveibar

seveibar commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

/benchmark --dataset 18 --same-machine --pipeline 9

@tscircuitbot

tscircuitbot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Same Machine Benchmark Results

Both revisions ran sequentially in one Blacksmith job on blacksmith-01m221vg67k7fe50sxpv7cmpv8-8vcpu.

Dataset: srj18 · Scenarios: 16
Main: 207c419 · PR: 779685c

Solver Metric Main PR Delta
Pipeline9 Completion 81.3% (🕒6.3%) 81.3% (🕒18.8%) 0.0 pp
Pipeline9 Relaxed DRC pass 62.5% (🕒6.3%) 75.0% (🕒18.8%) +12.5 pp
Pipeline9 DRC issues 51 2 -49
Pipeline9 Timeouts 1 3 +2
Pipeline9 P50 time 95.3s 145.6s +52.8%
Pipeline9 P60 time 120.6s 213.5s +77.0%
Pipeline9 P70 time 205.5s 237.1s +15.4%
Pipeline9 P80 time 261.0s 323.8s +24.0%
Pipeline9 P90 time 293.1s 360.0s +22.8%
Pipeline9 P95 time 323.9s 360.0s +11.1%
Pipeline9 Average vias 210.92 192.85 -8.6%

Outcome changes: 2 improved, 1 regressed. DRC issues are totaled across solved samples. Timing percentiles include solved and timed-out samples; negative timing deltas are faster.

Changed outcomes (3)
Solver Sample Main PR Main time PR time Delta
Pipeline9 2 Solved (DRC failed) Timeout 304.5s 360.0s Regressed
Pipeline9 13 Solved (DRC failed) DRC passed 257.3s 213.5s Improved
Pipeline9 14 Failed DRC passed 129.8s 323.8s Improved

Workflow: View run
Artifact: Download raw reports

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.

3 participants