Skip to content

test malformed-stack reverts in flow() and stackToFlow()#444

Merged
thedavidmeister merged 1 commit intomainfrom
2026-05-05-issue-316-317-328-malformed-stack-tests
May 7, 2026
Merged

test malformed-stack reverts in flow() and stackToFlow()#444
thedavidmeister merged 1 commit intomainfrom
2026-05-05-issue-316-317-328-malformed-stack-tests

Conversation

@thedavidmeister
Copy link
Copy Markdown
Contributor

Summary

Pins the documented "MAY revert if malformed" / "MUST revert if malformed" clauses on IFlowV5.stackToFlow and IFlowV5.flow. The observable revert is MissingSentinel(RAIN_FLOW_SENTINEL) from LibStackSentinel.consumeSentinelTuples when any of the three required sentinels is absent.

Five tests:

  • testStackToFlowRevertsOnEmptyStack
  • testStackToFlowRevertsOnOneSentinelOnly
  • testStackToFlowRevertsOnTwoSentinelsOnly
  • testFlowRevertsOnEmptyEvaluatedStack (fuzzed)
  • testFlowRevertsOnOneSentinelOnlyEvaluatedStack (fuzzed)

Closes #316 #317 #328.

Test plan

  • all 5 tests pass

🤖 Generated with Claude Code

Pins the documented "MAY revert if malformed" / "MUST revert if
malformed" clauses on `IFlowV5.stackToFlow` and `IFlowV5.flow`. The
observable revert is `MissingSentinel(RAIN_FLOW_SENTINEL)` from
`LibStackSentinel.consumeSentinelTuples` when any of the three required
sentinels is absent.

Five tests:
- stackToFlow on an empty stack
- stackToFlow with only one sentinel
- stackToFlow with only two sentinels
- flow() with an empty evaluated stack
- flow() with only one sentinel in the evaluated stack

Closes #316 #317 #328.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 5, 2026

Warning

Rate limit exceeded

@thedavidmeister has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 28 minutes and 12 seconds before requesting another review.

To continue reviewing without waiting, purchase usage credits in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 1e945ed2-cce0-4bcc-8a11-f6abb3933f2d

📥 Commits

Reviewing files that changed from the base of the PR and between ceaea3c and 3b97f37.

📒 Files selected for processing (2)
  • test/src/concrete/Flow.preview.t.sol
  • test/src/concrete/Flow.transfer.t.sol
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 2026-05-05-issue-316-317-328-malformed-stack-tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@thedavidmeister
Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 7, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@thedavidmeister thedavidmeister merged commit f434ae7 into main May 7, 2026
4 checks passed
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.

[A22-1] [MEDIUM] IFlowV5.flow() malformed-stack revert is untested

1 participant