Skip to content

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

Merged
wen-coding merged 2 commits into
mainfrom
wen/wipe_env_before_contract_upgradeability_test
May 19, 2026
Merged

test(evm): wipe stale .openzeppelin manifest before upgradeability test#3431
wen-coding merged 2 commits 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 18, 2026, 5:36 PM

@cursor
Copy link
Copy Markdown

cursor Bot commented May 18, 2026

PR Summary

Low Risk
Low risk: test-only change that deletes the local OpenZeppelin upgrades manifest before running the upgradeability test to avoid failures from stale cached addresses.

Overview
Makes the Contract Upgradeability test self-healing across local chain/cluster resets by adding a before() hook that removes contracts/.openzeppelin (the OpenZeppelin upgrades manifest) before deploying/upgrading proxies.

This prevents the upgrades plugin from aborting on stale proxy/implementation addresses cached from prior runs, without affecting the rest of the EVM test suite.

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

@codecov
Copy link
Copy Markdown

codecov Bot commented May 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.37%. Comparing base (10b7abd) to head (b69914c).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3431      +/-   ##
==========================================
+ Coverage   59.30%   59.37%   +0.06%     
==========================================
  Files        2127     2112      -15     
  Lines      175833   173673    -2160     
==========================================
- Hits       104286   103123    -1163     
+ Misses      62464    61573     -891     
+ Partials     9083     8977     -106     
Flag Coverage Δ
sei-db 70.41% <ø> (-0.22%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 150 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

wen-coding added a commit that referenced this pull request May 18, 2026
…merge

The merge of #3431 (origin/wen/wipe_env_before_contract_upgradeability_test)
silently kept our side of setupSigners because #3363 had touched the same
region. Apply #3431's intent here: drop associateSigner and the
seilocalSignerPrivateKeys lookup, and have setupSigners always use the
fundAddress + self-send-tx flow.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@wen-coding wen-coding added this pull request to the merge queue May 19, 2026
@wen-coding wen-coding removed this pull request from the merge queue due to a manual request May 19, 2026
@wen-coding wen-coding added this pull request to the merge queue May 19, 2026
Merged via the queue into main with commit 25a36cb May 19, 2026
41 checks passed
@wen-coding wen-coding deleted the wen/wipe_env_before_contract_upgradeability_test branch May 19, 2026 16:02
wen-coding added a commit that referenced this pull request May 19, 2026
…merge

The merge of #3431 (origin/wen/wipe_env_before_contract_upgradeability_test)
silently kept our side of setupSigners because #3363 had touched the same
region. Apply #3431's intent here: drop associateSigner and the
seilocalSignerPrivateKeys lookup, and have setupSigners always use the
fundAddress + self-send-tx flow.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

3 participants