Skip to content

Preserve legal through-via connectivity in coincident gap-fill regions - #171

Draft
ShiboSoftwareDev wants to merge 3 commits into
test/sample24-gap-via-reprofrom
fix/coalesce-full-stack-gap-regions
Draft

ShiboSoftwareDev wants to merge 3 commits into
test/sample24-gap-via-reprofrom
fix/coalesce-full-stack-gap-regions

Conversation

@ShiboSoftwareDev

@ShiboSoftwareDev ShiboSoftwareDev commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Gap filling splits the same empty XY region into separate nodes on every layer, hiding a legal through-via location beside MP1.4 in SRJ24 sample024. Coalesce identical final-pass gap rectangles only when they cover every board layer, contain no copper or targets, and fit the physical via pad plus its required clearance. Existing obstacle padding is credited once; per-layer free-space coverage and copper ownership are preserved.

Stacked on repro #172. Both the cropped repro and sample024’s actual global mesh restore one eight-layer region at MP1.4, with unchanged 5.6564 × 0.9068 mm dimensions and room for the complete 0.60 mm pad/clearance envelope. This is one isolated contributor to routing sample 24.

Validation: source CI has 119 passed, one skipped, zero failures; ESM/DTS build passes. A geometry audit preserves free-space union and copper metadata across 96 fixture/pass combinations. Consumer CI has 899 passed, 65 skipped, zero failures across all nine shards, with build/type checks passing. Relevant SVGs were inspected.

Draft — performance regression remains. The full paired SRJ18 run is 16/16 DRC clean on both revisions; median time improves 5.5% and memory P90 improves 9.6%. However, an isolated paired sample2 run confirms a runtime increase from 89.4s to 105.3s (+17.8%), with 42 fewer vias and lower peak RSS. Its high-density routing work increases. The previous sample6/14 outliers now produce identical final routing SVGs and work counts to baseline. Full paired SRJ24 validation is complete: completion stays 19/26, DRC-clean outcomes stay 17/26, the same 12 DRC issues remain, and both revisions have six timeouts. DRC error types/messages are unchanged on every board. Median time improves 3.0%; memory P50 is +0.6%, P80 -8.0%, and P90 +2.5%. The full dataset runs show no routing/DRC outcome regressions.

Integration, exact benchmark reports, and remaining acceptance work: tscircuit/tscircuit-autorouter#3234. Do not call this regression-free or ready to merge while the sample2 runtime cost remains.

@vercel

vercel Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
rectdiff Ready Ready Preview Oct 25, 2026 11:49am UTC

Request Review

@ShiboSoftwareDev
ShiboSoftwareDev marked this pull request as draft October 24, 2026 12:51

Copy link
Copy Markdown
Contributor Author

Validation: repro assertion fails on unchanged upstream and passes with the fix. All 115 tests, typecheck, formatting, and build pass. A 96-case audit (48 fixtures, one and four gap-fill passes) preserves exact per-layer geometry and copper/target metadata. The real sample24 topology also retains the repaired eight-layer via region.

Same-machine SRJ18 comparison on autorouter 0ad9be59, replacing only these two RectDiff production files (effort 1, one thread, 360-second timeout):

Metric Baseline Fix
Solved / relaxed DRC passing 16/16 16/16
Timeouts / DRC errors 0 / 0 0 / 0
Median time 43.1 s 40.8 s
Median peak RSS 1084.7 MiB 1116.9 MiB
P90 peak RSS 2085.7 MiB 2434.1 MiB
Average vias 213.06 208.31
Average odd-angle traces 402.75 414.88

Not performance-neutral: sample6 rises from 2366 to 3072 MiB and 104.0 to 113.0 s. An independent fixed-then-baseline repeat confirms 3064 vs 2384 MiB and 112.6 vs 103.6 s. Both outputs pass DRC; both keep the same 2M native iteration limit. Route choices change, and sample6's joint DRC-repair phase takes longer (25.9 vs 7.5 s), but phase timings alone do not prove where RSS peaks.

Leaving this draft because of that reproducible memory regression. No DRC rules, search budgets, or downstream solver logic were changed. This fixes the missing gap-fill via region, not the complete sample24 solve.

@ShiboSoftwareDev

Copy link
Copy Markdown
Contributor Author

/benchmark --dataset 18 --same-machine

@ShiboSoftwareDev ShiboSoftwareDev changed the title fix: preserve full-stack connectivity in gap-fill regions Preserve legal through-via connectivity in coincident gap-fill regions Oct 25, 2026
@ShiboSoftwareDev

Copy link
Copy Markdown
Contributor Author

/benchmark --same-machine --dataset 18

@ShiboSoftwareDev

Copy link
Copy Markdown
Contributor Author

/benchmark --same-machine --dataset 24

This branch was successfully deployed

1 active deployment
Preview — deb14ea7 Deployed Oct 25, 2026 by vercel[bot]
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.

1 participant