Skip to content

Reproduce stale circuit JSON after a failed rebuild - #4394

Open
ShiboSoftwareDev wants to merge 1 commit into
mainfrom
repro/failed-build-keeps-stale-circuit-json
Open

Reproduce stale circuit JSON after a failed rebuild#4394
ShiboSoftwareDev wants to merge 1 commit into
mainfrom
repro/failed-build-keeps-stale-circuit-json

Conversation

@ShiboSoftwareDev

Copy link
Copy Markdown
Contributor

Reproduction

This adds a focused integration test that:

  1. successfully builds index.tsx and saves dist/index/circuit.json
  2. replaces the same source file with a component that throws during circuit generation
  3. runs the same build again and confirms the command exits with a fatal error
  4. records that the previous circuit.json is still present byte-for-byte

The stale artifact can therefore look like the failed source revision built successfully to downstream fabrication or inspection tooling.

Expected behavior

A failed rebuild must not leave the prior circuit.json at the output path for that entrypoint.

Actual behavior

The fatal build exits 1, but dist/index/circuit.json still contains the previous successful build.

Test

  • bun test tests/cli/build/build-failed-rebuild-stale-output.test.ts
  • bun run format:check

This is the reproduction PR. The fix is intentionally kept in the next PR in the stack.

@ShiboSoftwareDev
ShiboSoftwareDev marked this pull request as ready for review August 20, 2026 23:40
@github-actions

Copy link
Copy Markdown
Contributor

This PR has been automatically marked as stale because it has had no recent activity. It will be closed if no further activity occurs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant