Emit handler-level assertion failures in invariant logs#5
Emit handler-level assertion failures in invariant logs#5
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ad0dfbfd63
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| false, | ||
| false, |
There was a problem hiding this comment.
Keep revert checks when detecting assertion-only replay failures
This probe calls check_sequence with both fail_on_revert and fail_on_assert forced to false, but check_sequence only treats reverted handler calls as failures when one of those flags is enabled. As a result, when users run with both flags enabled and a persisted sequence fails due to a normal revert (for example a require), the probe reports assert_only_failure=true and the replay gets mislabeled as assertion failure in <handler>. That makes replay diagnostics incorrect for non-assert failures.
Useful? React with 👍 / 👎.
Summary
assertion_failure::<handler>)assertion failure in <handler> ...inother_failuresduring invariant runsassertion failure in <handler>instead of the invariant nameWhy
This gives behavior closer to Medusa semantics: assertion failures are emitted as handler-level failures (for example
counter_increment) even without synthetic/noop invariants.Validation
cargo +1.91.0 check -p foundry-evm -p forge../foundry/target/debug/forge test --mc CryticToFoundry) now shows:[FAIL: assertion failure in counter_increment ...]