feat(test-specs): Test mutators#2860
Open
marioevz wants to merge 7 commits into
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## forks/amsterdam #2860 +/- ##
================================================
Coverage 86.94% 86.94%
================================================
Files 586 586
Lines 35777 35777
Branches 3363 3363
================================================
Hits 31106 31106
Misses 4012 4012
Partials 659 659
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🗒️ Description
Introduce a spec-test mutator framework that lets fill apply systematic mutations to existing spec tests so we can hunt for edge cases without writing new tests. Mutators are fork-gated: each fork declares which mutators it supports via
BaseFork.spec_test_mutators(), and the user opts in per fill invocation.Usage
The value selected for a given test is the intersection of what the user requested with what the test's fork supports — so requesting a mutator on a fork that doesn't enable it is a no-op rather than an error, and tests under a fork range get mutated only on the forks where the mutation is meaningful.
First mutator: EIP_7702_ALL_CONTRACTS_AS_DELEGATIONS (Prague+)
Every
pre.deploy_contract(...)call is rewritten so that:(0xef0100 || <code-address>)pointing at that account.This stresses the EIP-7702 delegation path against the full body of existing state/blockchain tests. Edge cases surfaced this way are expected to be promoted into standalone tests as a follow-up — the flag is an exploration aid, not part of regular fill runs.
🔗 Related Issues or PRs
N/A.
✅ Checklist
just statictype(scope):.mkdocs servelocally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.@ported_frommarker.Cute Animal Picture