Skip to content

fix: recover missing verification JSONs after interrupted CI#4

Merged
boyuanx merged 2 commits intomainfrom
fix/verification-json-recovery
Mar 3, 2026
Merged

fix: recover missing verification JSONs after interrupted CI#4
boyuanx merged 2 commits intomainfrom
fix/verification-json-recovery

Conversation

@boyuanx
Copy link
Contributor

@boyuanx boyuanx commented Mar 3, 2026

Summary

Test plan

  • forge fmt passes on modified files
  • All 102 existing tests pass (forge test)
  • New test_VerificationJsonRecoveredAfterInterruptedCI test validates the 4-step scenario: deploy → delete JSON → re-deploy (early return) → assert JSON recovered

boyuanx added 2 commits March 3, 2026 16:15
When a contract already exists on-chain but the verification
standard-json-input file is missing (e.g. CI interrupted after deploy
but before file write), the early return in __deploy() now detects the
missing file and regenerates it.

Changes:
- Extract _getStandardJsonInputPath() helper to DRY path construction
- Add verification JSON recovery logic to __deploy() early return block
- Add regression test with VerificationRecoveryHelper mock
Use a dedicated "recovery-test" subfolder for VerificationRecoveryHelper
to prevent Forge's vm.revertToState() from restoring stale file-system
state (corrupted standard-json-input files) across test boundaries.
@boyuanx boyuanx merged commit d842901 into main Mar 3, 2026
1 check passed
@boyuanx boyuanx deleted the fix/verification-json-recovery branch March 3, 2026 08:45
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