Skip to content

Test: Fix flaky setFlags and streaming payment order fuzz tests - #786

Merged
marvinkruse merged 1 commit into
devfrom
fix/flaky-fuzz-2
Oct 22, 2026
Merged

marvinkruse merged 1 commit into
devfrom
fix/flaky-fuzz-2

Conversation

@marvinkruse

Copy link
Copy Markdown
Member

Summary

Two more fuzz tests failed randomly in CI on dev after #780 and #781 merged. Neither failure was related to those changes.

  • ERC20PaymentClientBaseV2Test.test_setFlags: with all 256 bits set, the test's uint8 flag counter overflows. _setFlags has the same limit because _flagCount is a uint8, so setting all 256 flags reverts. It's admin-only and far beyond the number of flags in use, so the contract stays as is and the test excludes that input.
  • PP_StreamingV1Test.test_ValidPaymentOrder: the expected value left out the origin/target chain check that validPaymentOrder performs. Whenever the fuzzer produced an otherwise valid order (e.g. a deployed token address) with random chain IDs, the test expected true. The streaming mock now exposes _validOriginAndTargetChain (same as the PP_Simple_v2 mock), and the test includes it.

Test-only change.

Deployment Steps

✅ No deployment steps required.

Test Plan

Pre-merge checklist

  • Both tests pass with FOUNDRY_FUZZ_RUNS=30000
  • Full suite with FOUNDRY_PROFILE=ci passes under seeds 0x1, 0x2a, 0x1337 (1586/1586 each)
  • forge fmt --check passes
  • CI green

@marvinkruse
marvinkruse merged commit b6a4fda into dev Oct 22, 2026
6 checks passed
@marvinkruse
marvinkruse deleted the fix/flaky-fuzz-2 branch October 22, 2026 20:58
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