Skip to content

Add pcbTracePaths support to autoroutingphase - #845

Merged
seveibar merged 1 commit into
mainfrom
add-autoroutingphase-pcb-trace-paths
Sep 11, 2026
Merged

Add pcbTracePaths support to autoroutingphase#845
seveibar merged 1 commit into
mainfrom
add-autoroutingphase-pcb-trace-paths

Conversation

@seveibar

Copy link
Copy Markdown
Contributor

Adds optional pcbTracePaths to <autoroutingphase> so saved PCB routes are accepted by both its TypeScript interface and runtime schema. Reuses FanoutTracePath validation, including distance normalization and wire/via layer continuity, and regenerates the props documentation.

Validation: all 512 tests pass, TypeScript typecheck passes, and changed-file formatting checks pass. Regression coverage checks saved-route preservation, unit normalization, omitted/empty paths, and invalid geometry.

Comment on lines 28 to 108
@@ -89,8 +99,12 @@ test("saved fanout paths reject invalid geometry and layer transitions", () => {
connection: "U1.1",
route: [wire, { ...path.route[1], from_layer: "inner1" }, path.route[2]],
},
])
]) {
expect(fanoutTracePath.safeParse(invalid).success).toBe(false)
expect(
autoroutingPhaseProps.safeParse({ pcbTracePaths: [invalid] }).success,
).toBe(false)
}
})

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This file contains more than one test(...) call. The style guide rule states that a *.test.ts file may have AT MOST one test(...). Here, test.each(...) (line 28) and a second test(...) (line 53) both appear in the same file. The file should be split into multiple numbered files, e.g. fanout-trace-paths1.test.ts and fanout-trace-paths2.test.ts.

Spotted by Graphite (based on custom rule: Custom rule)

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

@seveibar
seveibar merged commit 6c379a7 into main Sep 11, 2026
5 checks passed
@tscircuitbot

Copy link
Copy Markdown
Contributor

Thank you for your contribution! 🎉

PR Rating: ⭐⭐⭐
Impact: Major

Track your contributions and see the leaderboard at: tscircuit Contribution Tracker


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