Skip to content

Save reusable autorouting phase JSON artifacts in CLI builds - #4963

Open
seveibar wants to merge 1 commit into
mainfrom
feat/autorouting-artifacts
Open

seveibar wants to merge 1 commit into
mainfrom
feat/autorouting-artifacts

Conversation

@seveibar

Copy link
Copy Markdown
Contributor

Automatically save completed CLI autorouting phases as importable pcbTracePaths JSON under .tscircuit/autorouting-artifacts/<entrypoint>/, and print each saved file's location. Users can copy a generated file into their project and pass its default JSON import to <autoroutingphase pcbTracePaths={savedPaths} /> without manually extracting routes.

The exporter resolves PCB port selectors, converts board coordinates to the phase group's local frame, preserves wire/via dimensions, and orders multi-terminal routes for replay. Artifacts are separated by entrypoint, subcircuit, phase, and stage, including parallel builds. Unsupported geometry or write failures produce a warning without failing the build; partial saved-path arrays are not written.

This applies to tsci build and commands using the shared CLI circuit renderer. Browser rendering in tsci dev is not included. Usage and limitations are documented in docs/autorouting-artifacts.md.

Validation:

  • 7 feature tests pass, including an actual routed board and parallel CLI builds with same-named entrypoints.
  • TypeScript checking, CLI build, and formatting pass.
  • Complete-route and fanout artifact replay verified against current core during development.
  • Existing autorouter diagnostics tests could not load on the rebased checkout because the local sharp native binary is missing.

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