Skip to content

Respect board-edge clearance for bounds-only boards - #176

Open
1932819331hy-debug wants to merge 2 commits into
tscircuit:mainfrom
1932819331hy-debug:fix/bounds-only-board-edge-clearance
Open

1932819331hy-debug wants to merge 2 commits into
tscircuit:mainfrom
1932819331hy-debug:fix/bounds-only-board-edge-clearance

Conversation

@1932819331hy-debug

Copy link
Copy Markdown

Summary

For a rectangular board described only by bounds, minBoardEdgeClearance was ignored:

 bounds: [0, 10] x [0, 10], clearance: 0.2
- free-space bounds: [0, 10] x [0, 10]
+ free-space bounds: [0.2, 9.8] x [0.2, 9.8]

Derive a local rectangular outline for positive bounds-only clearance, reuse the existing board-void calculation, and include those masks in the shared grid obstacle index. This makes initial grid generation and gap filling honor the same boundary as an equivalent explicit rectangle. Physical input bounds and supplied outlines are preserved.

Evidence

  • Before: the public-pipeline differential completes successfully but violates clearance only when the outline is omitted. The six added regressions produce three passes and three geometry assertion failures.
    After: all six pass, including translated bounds, three layers, one/three permitted gap-fill passes, a near-edge obstacle and omitted/zero/negative-clearance controls. The focused clearance/bounds/outline suite passes 20 tests.
  • Native non-benchmark suite: 116 passed, 1 existing skip. TypeScript project checking, ESM/declaration build and complete tracked-tree formatting pass. Added and inspected one SVG snapshot; existing snapshots pass unchanged.
  • Independent review passed 18 public-pipeline cases, 80 analytic clearance cases and nine short-outline baseline controls.
  • Two benchmark tests require the unavailable declared dataset/custom autorouter runtime. Both fail for missing dependencies on the untouched baseline too. The official autorouter package with the same version lacks the required override hook, so it was not substituted and a full-suite pass is not claimed.

Validation used Bun 1.3.1 with genuine declared-compatible registry dependencies in an isolated local environment.

Merge Danger

Door: Two-way; a normal revert restores the previous behavior.

Blast Radius: Routing.

Positive clearance now excludes bounds-only edge strips on all board layers. Omitted, zero and negative clearance preserve existing bounds-only behavior. Clearance that leaves no usable mesh (including an interior below the configured minimum node size) still reaches the existing empty-grid failure also reproducible with an explicit outline, tracked separately in #173.

@vercel

vercel Bot commented Nov 4, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the tscircuit Team on Vercel.

A member of the Team first needs to authorize it.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-04T10:14:08.779534Z d36e3ef PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

This branch has not been deployed

No deployments
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