Skip to content

CYS3-02: Upgradeable Storage Layout Changes Can Corrupt Live Proxies - #107

Merged
evercoinx merged 4 commits into
mainfrom
serge/CYS3-02
May 10, 2026
Merged

evercoinx merged 4 commits into
mainfrom
serge/CYS3-02

Conversation

@evercoinx

@evercoinx evercoinx commented May 9, 2026 •

Copy link
Copy Markdown
Contributor

Note

Low Risk
Low risk: changes are limited to tests and documentation, mainly adding regression coverage for upgrade safety and stabilizing fork tests against oracle staleness.

Overview
Adds a new StorageLayout.t.sol regression test that pins storage layouts for all mainnet-deployed UUPS proxies (PolicyManager, ClaimManager, PremiumManager, SpecRegistry, Swapper, CoverPoolFactory) by comparing Foundry storageLayout output against a baseline (with AST-ID normalization).

Stabilizes Morpho fork tests by reducing COVERAGE_LIMIT, wiring ClaimManager with oraclePriceFeed + a 10% deviation tolerance in the fork setup, and introducing _skipFork() which advances time while mocking Chainlink latestRoundData() timestamps to avoid staleness reverts.

Updates AGENTS.md with explicit guidance on append-only state variable changes for deployed UUPS proxies and the requirement to update the pinned baselines alongside legitimate appends.

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

@evercoinx
evercoinx requested a review from dB2510 May 9, 2026 09:40
@evercoinx evercoinx self-assigned this May 9, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit baa9ff3. Configure here.

Comment thread test/unit/StorageLayout.t.sol
@evercoinx
evercoinx force-pushed the serge/CYS3-02 branch 2 times, most recently from cd7685b to 3d3af87 Compare May 9, 2026 14:25
@evercoinx
evercoinx merged commit 7d84b33 into main May 10, 2026
5 checks passed
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.

2 participants