Labels: high-difficulty, testing, mutation
Difficulty: High
Module: tests/mutation/
🧠 Concept
Build an AST mutation testing framework that automatically injects known gas anti-patterns into test contracts to verify that GasGuard rules catch them reliably (preventing false negatives).
⚠️ Problem
Static analysis rules can become stale or miss edge cases. Mutation testing continuously validates that rule suites reliably detect injected code defects.
📁 Implementation Scope
tests/mutation/ast-mutator.ts
tests/mutation/mutation-runner.ts
🛠️ Requirements
- Mutate valid contract ASTs by injecting anti-patterns (e.g., changing
uint256 to uint8, un-caching loop lengths).
- Run mutated code through the GasGuard rules engine.
- Assert that active rules successfully detect 100% of injected mutations ("killing" the mutants).
🎯 Acceptance Criteria
Labels:
high-difficulty,testing,mutationDifficulty: High
Module:
tests/mutation/🧠 Concept
Build an AST mutation testing framework that automatically injects known gas anti-patterns into test contracts to verify that GasGuard rules catch them reliably (preventing false negatives).
Static analysis rules can become stale or miss edge cases. Mutation testing continuously validates that rule suites reliably detect injected code defects.
📁 Implementation Scope
tests/mutation/ast-mutator.tstests/mutation/mutation-runner.ts🛠️ Requirements
uint256touint8, un-caching loop lengths).🎯 Acceptance Criteria