The contract audit found that optimizer iteration counts and grid resolution had no published upper ceilings. The repair added and enforced these limits:
- maximum iterations:
100000 - maximum grid resolution:
1000000
The focused mutation pass selected every mutation generated for
validate_max_iters and validate_grid_resolution, including replacements
with unconditional success and changes to boundary comparisons.
cargo mutants \
--file src/optimize.rs \
--re 'validate_(max_iters|grid_resolution)' \
--timeout-multiplier 3.0 \
--jobs 1 \
-- --lockedbaseline: 793 tests passed
selected mutants: 11
caught: 11
missed: 0
timeout: 0
unviable: 0
This is the repair loop in executable form: the requests that exposed the missing limits became regression tests, then mutation testing tried to weaken or remove those guards. All eleven attempts were caught.