Skip to content

Remove CryticToFoundry assertion shim and rely on fail_on_assert#2

Open
aviggiano wants to merge 4 commits intomainfrom
feat/remove-foundry-13322-shim
Open

Remove CryticToFoundry assertion shim and rely on fail_on_assert#2
aviggiano wants to merge 4 commits intomainfrom
feat/remove-foundry-13322-shim

Conversation

@aviggiano
Copy link
Collaborator

@aviggiano aviggiano commented Feb 23, 2026

Summary

  • remove the CryticToFoundry assertion-failures shim introduced as a workaround for foundry-rs/foundry#13322
  • enable fail_on_assert = true in foundry.toml
  • make assertion failures explicit via assert(false) in counter_increment catch path
  • remove the synthetic invariant_counter_increment campaign
  • update script/ci/check_fuzzer.sh Foundry check to require:
    • invariant_number_is_small() failure
    • invariant_number_change_requires_sequence() failure
    • emitted assertion failure line containing assertion failure in counter_increment

Validation

Using local forge from Foundry (with the pending assertion-emission changes):

  • ../foundry/target/debug/forge test --mc CryticToFoundry
  • PATH=../foundry/target/debug:$PATH FOUNDRY_INVARIANT_CONTINUOUS_RUN=false script/ci/check_fuzzer.sh foundry

Observed in logs:

  • assertion failure emitted as assertion failure in counter_increment ...
  • invariant_number_change_requires_sequence() fails
  • invariant_number_is_small() fails

Blocker

This PR is blocked by (and intended to land with) the Foundry fix for:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant