Skip to content

fix: always write -latest.json even when no new deployments occur#2

Merged
boyuanx merged 1 commit intomainfrom
fix/latest-json-always-write
Mar 3, 2026
Merged

fix: always write -latest.json even when no new deployments occur#2
boyuanx merged 1 commit intomainfrom
fix/latest-json-always-write

Conversation

@boyuanx
Copy link
Contributor

@boyuanx boyuanx commented Mar 3, 2026

Summary

  • Decouples cumulative -latest.json persistence from the _hasNewDeployments flag
  • When a CI run is interrupted after on-chain deployment but before JSON files are written, a retry detects existing contracts and skips redeployment — but _hasNewDeployments stays false, so _afterAll() never writes the JSON
  • Now -latest.json is always written when finalJsonLatest has content, ensuring the file is created on retry runs
  • The timestamped diff file remains gated by _hasNewDeployments (only written for actual new deployments)

When a CI run is interrupted after contracts are deployed on-chain but
before deployment JSON files are written, a retry run detects the
existing contracts and skips redeployment. However, _hasNewDeployments
remains false, causing _afterAll() to skip writing all JSON files —
including the cumulative -latest.json that already has the correct data
in memory.

Decouple -latest.json persistence from the _hasNewDeployments flag so
the cumulative file is always written when it has content. The
timestamped diff file remains gated by _hasNewDeployments.
@boyuanx boyuanx merged commit 01cfe82 into main Mar 3, 2026
1 check passed
@boyuanx boyuanx deleted the fix/latest-json-always-write branch March 3, 2026 04:12
@boyuanx boyuanx restored the fix/latest-json-always-write branch March 3, 2026 04:18
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