Skip to content

feat(invariant): track handler assertion failures independently during continuous runs #14448

@grandizzy

Description

@grandizzy

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))

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions