Skip to content

fix: preserve trace-name validation when routing is disabled - #3972

Open
techmannih wants to merge 1 commit into
repro/4948-routing-disabled-diagnosticsfrom
fix/4948-routing-disabled-diagnostics
Open

techmannih wants to merge 1 commit into
repro/4948-routing-disabled-diagnosticsfrom
fix/4948-routing-disabled-diagnostics

Conversation

@techmannih

@techmannih techmannih commented Sep 16, 2026

Copy link
Copy Markdown
Member

Fix

Traces with the same name on separate electrical nets now retain their existing name-conflict diagnostic when PCB routing is disabled. Previously Group.doInitialPcbDesignRuleChecks() returned before validating names for platform/board routingDisabled and disabled legacy autorouters.

Run the existing Group name validation before the routing guards. Keep the legacy-router guard next to standalone routing checks; their existing helper already handles routingDisabled. The production diff remains seven lines in Group.ts, preserving name scoping and the exception for mutually connected same-named traces.

Regression tests

Stacked on #3971, which contains every explicit scenario and its fixture. This layer changes the three disabled-case assertions to require the existing diagnostic and updates their snapshots. All setup, snapshot options, routing-enabled coverage, valid-name controls, and router/cache tests come from the repro layer unchanged.

Only the error-text overlay changes in the three snapshots; PCB geometry and ratsnests are identical. Legacy missing-copper diagnostics remain present. No new error message or error type is introduced.

Related to tscircuit/tscircuit#4948. Native stack: main#3971 → this fix.

Validation

  • The desired diagnostic assertions fail in all three disabled cases before the production fix.
  • Focused repro, group, name-conflict, legacy-router, platform/board routing-disabled, nested-routing, and standalone DRC coverage: 37 pass, 1 existing skip, 0 fail across 38 test files, with a 30-second test timeout.
  • tsc --noEmit and Biome checks pass.
  • Updated PCB snapshots rendered and visually inspected; an SVG comparison confirms only the error-text overlay changed.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@vercel

vercel Bot commented Sep 16, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
tscircuit-core-benchmarks Ready Ready Preview Sep 16, 2026 2:14pm UTC

Request Review

"platform_disabled",
"board_disabled",
"legacy_disabled",
]) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong pattern, make the tests explicit for each of the case. Very confusing to review

@techmannih
techmannih force-pushed the fix/4948-routing-disabled-diagnostics branch from 092eaab to 5454944 Compare September 16, 2026 14:13
@techmannih techmannih changed the title fix: preserve group name diagnostics when routing is disabled fix: preserve trace-name validation when routing is disabled Sep 16, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is this beneficial? If the board has routingDisabled then why to confuse the AI with this error when It's not needed to route? I don't think this is a valid error from the AI

@techmannih

Copy link
Copy Markdown
Member Author

@vreview

@vreview

vreview commented Sep 17, 2026

Copy link
Copy Markdown

Video review

Complete

▶ Watch the video review

Reviewing commit 54549447.

This comment updates as work progresses.

Job: 823941374-issue_comment-5714062801

@nazasnow

Copy link
Copy Markdown

Hi @techmannih, thank you for the review and feedback! I will update the PR to address these points shortly.

1 similar comment
@nazasnow

Copy link
Copy Markdown

Hi @techmannih, thank you for the review and feedback! I will update the PR to address these points shortly.

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.

4 participants