Add payment invariant baseline#77
Conversation
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.
Tip: disable this comment in your organization's Code Review settings.
|
@coderabbitai review |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds a 24-step bounded payment-sequence fuzz invariant harness ( ChangesPayment Invariant Baseline
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
✅ Action performedReview finished.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
ops/AUTONOMOUS_RUN.md (1)
2883-2961:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winIncomplete merge timestamp for PR
#76.Line 2955 records the merge timestamp as
2026-06-10without the time component, while other completed PRs in this file consistently include both date and time (e.g., line 142 shows2026-06-09 23:33 UTC). This inconsistency may complicate future chronological tracing of autonomous execution events.📅 Suggested fix
-- Merged as PR `#76` on `2026-06-10`. +- Merged as PR `#76` on `2026-06-10 20:18 UTC`.The timestamp
20:18 UTCis derived from decision log line 3270.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@ops/AUTONOMOUS_RUN.md` around lines 2883 - 2961, Update the merge timestamp for PR `#76`: replace the date-only "2026-06-10" entry in the "PR `#76`: Prove vendored library provenance (Queue Item 34)" section with the full UTC datetime "2026-06-10 20:18 UTC" (use the decision log line 3270 as the source); ensure the entry format matches other completed PRs like the example "2026-06-09 23:33 UTC" so chronological tracing remains consistent.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@ops/AUTONOMOUS_RUN.md`:
- Line 2962: Update the worklog header "### PR TBD: Add payment invariant
baseline (Queue Item 35)" to reference the actual pull request number used later
in the section; replace "PR TBD" with "PR `#77`" (matching the URL
https://github.com/6529-Collections/6529Stream/pull/77) so the header reads "###
PR `#77`: Add payment invariant baseline (Queue Item 35)" for consistency with
other completed PR entries.
In `@test/StreamPaymentsInvariant.t.sol`:
- Line 45: The test currently reuses actionSeed as rawBid when calling
handler.bidAuction(firstArg, secondArg, actionSeed), which biases bids because
actionSeed is already used to select the action; fix by decoupling bid
generation from action selection: derive a separate bidSeed (e.g., bidSeed =
uint256(keccak256(abi.encode(actionSeed, SOME_CONSTANT))) or use another RNG
input) and compute rawBid from that seed, then clamp it into the expected bid
range before passing it to handler.bidAuction; update the call site to pass this
new rawBid instead of actionSeed and keep references to handler.bidAuction,
actionSeed and rawBid to locate the change.
---
Outside diff comments:
In `@ops/AUTONOMOUS_RUN.md`:
- Around line 2883-2961: Update the merge timestamp for PR `#76`: replace the
date-only "2026-06-10" entry in the "PR `#76`: Prove vendored library provenance
(Queue Item 34)" section with the full UTC datetime "2026-06-10 20:18 UTC" (use
the decision log line 3270 as the source); ensure the entry format matches other
completed PRs like the example "2026-06-09 23:33 UTC" so chronological tracing
remains consistent.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: c98767b2-90df-4707-b62b-9c8b14b234d0
📒 Files selected for processing (7)
docs/known-blockers.mddocs/status.mdops/AUTONOMOUS_RUN.mdops/ROADMAP.mdops/SLITHER_BASELINE.mdtest/README.mdtest/StreamPaymentsInvariant.t.sol
|
@coderabbitai review |
✅ Action performedReview finished.
|
Summary
StreamPaymentsInvariantTest, a bounded sequence fuzz harness for the current first-party payment surfaces.totalOwed()views, balance coverage, randomizer reserves, andemergencyWithdrawable()views after every generated action.Closes #8.
Validation
forge test --match-path test\StreamPaymentsInvariant.t.sol -vvvpassed: 1 fuzz test, 256 runs.make checkpassed: 188 tests.powershell -ExecutionPolicy Bypass -File scripts\check.ps1passed: 188 tests.forge fmt --check test\StreamPaymentsInvariant.t.solpassed.git diff --checkpassed.arbitrary-send-eth=0,reentrancy-eth=0,reentrancy-no-eth=0after scoped test-harness suppressions documented inops/SLITHER_BASELINE.md.Summary by CodeRabbit
New Features
Tests
Documentation