test UnsupportedFlowInputs revert in flowInit#441
test UnsupportedFlowInputs revert in flowInit#441thedavidmeister wants to merge 1 commit intomainfrom
Conversation
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, 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 have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ 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. Review rate limit: 0/1 reviews remaining, refill in 12 minutes and 43 seconds.Comment |
Summary
Pins the
flowInitguard that rejects any non-zeroflowInputsbyte returned by the deployer.Flow.sol:210reverts withUnsupportedFlowInputswhenflowInputs != 0. No prior test exercised this branch; the only mock IO strings used in tests hadflowInputs == 0, so a regression here would not have been caught.The new fuzz test mocks the deployer to return a non-zero
flowInputsbyte and asserts the revert selector. Mutation verified: inverting the check (!= 0→== 0) makes the test fail; reverting passes.Closes #310 #320.
Test plan
testFlowConstructionRevertsOnNonZeroFlowInputs— 100 fuzz runs, all passFlow.sol:210→ test failsrainix-sol-static🤖 Generated with Claude Code