Skip to content

test(evm): wipe stale .openzeppelin manifest before upgradeability test#3431

Open
wen-coding wants to merge 1 commit into
mainfrom
wen/wipe_env_before_contract_upgradeability_test
Open

test(evm): wipe stale .openzeppelin manifest before upgradeability test#3431
wen-coding wants to merge 1 commit into
mainfrom
wen/wipe_env_before_contract_upgradeability_test

Conversation

@wen-coding
Copy link
Copy Markdown
Contributor

@wen-coding wen-coding commented May 13, 2026

Summary

  • The OZ upgrades plugin caches deployed proxy/impl addresses in contracts/.openzeppelin/unknown-<chainId>.json. After a cluster wipe those addresses no longer exist on-chain and the plugin aborts the Contract Upgradeability test with No contract at address ... (Removed from manifest).
  • CI doesn't see this because each job starts from a fresh checkout, but local devs hit it any time they re-run hardhat after a cluster wipe.
  • Fix: drop the manifest in a before() hook scoped to the Contract Upgradeability describe block so each run starts clean. Scoped narrowly because only this test uses the upgrades.* namespace; other tests in the suite only use @openzeppelin/test-helpers, which doesn't touch the manifest.

Test plan

Local verification on this branch (cluster torn down and re-created with make docker-cluster-stop && rm -rf build/generated, then restarted, then hardhat re-run — the exact scenario that triggered the failure):

  • Without this fix: Contract Upgradeability → Should allow for contract upgrades fails with No contract at address 0x... (Removed from manifest).
  • With this fix: same test passes (✔ Should allow for contract upgrades (1119ms)); rest of the suite unaffected.

Note

Low Risk
Low risk: test-only change that deletes the local OpenZeppelin upgrades manifest to avoid false failures after chain resets; no runtime or contract logic is modified.

Overview
Improves the Contract Upgradeability test reliability by deleting the cached OpenZeppelin upgrades manifest (contracts/.openzeppelin) in a before() hook so reruns after a chain/cluster wipe don’t fail due to stale proxy/implementation addresses.

Reviewed by Cursor Bugbot for commit ef916a5. Bugbot is set up for automated code reviews on this repo. Configure here.

The OZ upgrades plugin caches deployed proxy/impl addresses in
contracts/.openzeppelin/unknown-<chainId>.json. After a cluster wipe
those addresses no longer exist on-chain and the plugin aborts the
Contract Upgradeability test with "No contract at address ... (Removed
from manifest)".

CI doesn't see this because each job starts from a fresh checkout, but
local devs hit it any time they re-run hardhat after a cluster wipe.
Drop the manifest in a before() hook scoped to the Upgradeability
describe block so each run starts clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 13, 2026

The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedMay 13, 2026, 8:12 PM

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