test V5 sentinel + min sentinels through IFlowV5 re-export#477
Conversation
IFlowV5.t.sol imported RAIN_FLOW_SENTINEL directly from IFlowV4.sol, so the V5 test never exercised the V5 re-export surface: a drift in the V5 re-export would pass silently. Import the constant from IFlowV5.sol and add a pin for the MIN_FLOW_SENTINELS re-export too, so a change at the V5 boundary fails this test. Closes #419 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Warning Review limit reached
More reviews will be available in 48 minutes and 2 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
What
test/interface/IFlowV5.t.solimportedRAIN_FLOW_SENTINELdirectly fromsrc/interface/deprecated/v4/IFlowV4.sol— the V5 test never exercised the V5 interface at all. The file was byte-identical toIFlowV4.t.sol(modulo the relative import depth), so ifIFlowV5.solever changed its sentinel re-export (intentionally or by mistake), the V5 test would still pass because it bypassed V5 entirely.This PR changes the import to come from
src/interface/IFlowV5.sol, exercising the re-export surface the test is named to pin. It also adds a pin for theMIN_FLOW_SENTINELSre-export (== 3) through V5, since that constant is re-exported on the same chain (V3 → V4 → V5) and was previously untested via V5.Test-only. No source changes.
Mutation validation
Both assertions were proven to read through the V5 interface by mutating the V5 re-export and confirming the relevant test fails, then restoring:
IFlowV5.solRAIN_FLOW_SENTINELre-export replaced with a wrong local constanttestSentinelValueMIN_FLOW_SENTINELSre-export replaced with99testMinFlowSentinelsValueBefore the import change (importing from V4 directly), neither mutation would have been caught — that is the gap this PR closes.
Verification
forge build: clean.forge test: 56 passed, 0 failed (the V5 suite is now 2 tests, both green).forge fmt --checkon the changed file: clean.Note:
mainis currently red onrainix-sol-staticdue to a pre-existing slither redundant-statement finding fixed by #476 (not yet merged). This PR's CI will show that same pre-existing static red until #476 lands — it is unrelated to this change, which touches only a test file.Closes #419
🤖 Generated with Claude Code