Summary
Follow-up to #12587 (assert all invariants on continuous_run). Two improvements to handler assertion tracking during invariant campaigns:
1. Keep running after all invariants are broken
Currently the campaign stops when all invariants break (can_continue returns false). However, there may still be undiscovered assertion failures in handler functions. The campaign should continue running for its full runs/timeout to catch these.
2. Track broken handlers separately
Once a handler assertion fails, record it but stop re-checking its assertions on subsequent calls. The handler should still be called for sequence building (it may trigger interesting state transitions) but its known-broken assertions should be suppressed to avoid noise.
Implementation sketch:
- Add
broken_handlers: HashSet<(Address, Selector)> to InvariantTest
- Decouple "record failure" from "stop campaign" in the main fuzz loop
- Track handler assertion failures separately in
InvariantFailures (handler_errors map)
- Report handler failures alongside invariant failures in output
Related: #14437, #12587
cc @rappie (original suggestion: #12587 (comment))
Summary
Follow-up to #12587 (assert all invariants on
continuous_run). Two improvements to handler assertion tracking during invariant campaigns:1. Keep running after all invariants are broken
Currently the campaign stops when all invariants break (
can_continuereturns false). However, there may still be undiscovered assertion failures in handler functions. The campaign should continue running for its fullruns/timeoutto catch these.2. Track broken handlers separately
Once a handler assertion fails, record it but stop re-checking its assertions on subsequent calls. The handler should still be called for sequence building (it may trigger interesting state transitions) but its known-broken assertions should be suppressed to avoid noise.
Implementation sketch:
broken_handlers: HashSet<(Address, Selector)>toInvariantTestInvariantFailures(handler_errorsmap)Related: #14437, #12587
cc @rappie (original suggestion: #12587 (comment))