Repository navigation
Test order-clearer and order context words for both orders in clear3 - #2937
Conversation
Closes #2936 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Configure and check both orders test/concrete/raindex/RaindexV6.contextWordEntrypoints.t.sol |
doClear accepts separate calculate and handle sources for each order. The tests check the TAKER order’s clearer, owner, and counterparty context alongside the ACTOR order’s context. A new test covers both orders’ calculate and handle sources. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Other
Possibly related PRs
- rainlanguage/raindex.deploy#2928: This PR tests the order context words introduced in the four-row order layout.
- rainlanguage/raindex.deploy#2921: This PR extends the context-word tests to both orders in
clear3.
Merge Risk: 
Minimal · up to 05133
-
The PR adds the intended clear context-word coverage without an established merge-blocking risk.
Pre-merge checks: 
5
-
Full details: Title check
-
Explanation
The title "Test order-clearer and order context words for both orders in clear3" matches the main change. The PR adds testClearBothOrdersContextWords and updates doClear so that Bob's order has its own calculate and handle sources. The new test checks raindex(), sender(), order-owner(), order-counterparty() and order-clearer() for both orders in both sources. The title is specific and short. It names the test target (clear3) and the context words under test, so a teammate scanning history can identify the change.
Full details: Linked Issues check
-
Explanation
Issue
#2936requires a clear test in which both orders' calculate and handle IO sources ensure their context words, including order-clearer() == clearer for the second (bob) order. The diff changes only test/concrete/raindex/RaindexV6.contextWordEntrypoints.t.sol. The change adds bobClearChecks() with raindex(), sender() == CLEARER, order-owner() == TAKER, order-counterparty() == ACTOR, and order-clearer() == CLEARER. doClear() now accepts bobCalculate and bobHandle and builds bob's order from them. testClearBothOrdersContextWords passes bobClearChecks() through ensures() in both the calculate and handle sources of bob's order, so it covers the requirement. Alice's checks (clearChecks()) are kept on both sides. testClearCalculateContextWords and testClearHandleIOContextWords still pass alice's checks and use bob sources of '_ :1 1;' and ':;', which matches the previous bob expression ' _:1 1;:;'. The mutant result (M03, failure of only the new test) is reported by the author and was not re-run in this review. The requirement is met by the test code as written.
Full details: Out of Scope Changes check
-
Explanation
The whole-PR diff against the merge base touches one file, test/concrete/raindex/RaindexV6.contextWordEntrypoints.t.sol. No production code in src/ changes. Every hunk serves issue
#2936: the doClear signature and bob order construction (needed to parameterise bob's sources), the new bobClearChecks() helper, the updated call sites for the existing tests (which keep bob's original behaviour), and the new testClearBothOrdersContextWords. No unrelated change is present.
Full details: Docstring Coverage
-
Explanation
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)
-
Finishing Touches: 💡 1
-
🛠️ Fix failing CI checks: 💡
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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 @coderabbitai help to get the list of available commands.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@coderabbitai assess this PR size classification for the totality of the PR with the following criterias and report it in your comment: S/M/L PR Classification Guidelines:This guide helps classify merged pull requests by effort and complexity rather than just line count. The goal is to assess the difficulty and scope of changes after they have been completed. Small (S)Characteristics:
Review Effort: Would have taken 5-10 minutes Examples:
Medium (M)Characteristics:
Review Effort: Would have taken 15-30 minutes Examples:
Large (L)Characteristics:
Review Effort: Would have taken 45+ minutes Examples:
Additional Factors to ConsiderWhen deciding between sizes, also consider:
Notes:
|
Closes #2936
doClearnow takes bob's calculate/handle sources. NewtestClearBothOrdersContextWordsmakes both orders ensureraindex(),sender(),order-owner(),order-counterparty()andorder-clearer()in calculate and handle IO, so bob'sclearing = trueinclear3is pinned. Existing clear tests keep their behaviour (bob stays_ _:1 1;:;).QA
testClearBothOrdersContextWords- main's code is correct, so it passes on base (targeted--match-test testClearrun, 3/3 pass); it fails under the M03 mutant below, which every other test survivessrc/concrete/raindex/RaindexV6.solclear3bob'scalculateOrderIOlast argtrue -> false(M03,Build.solregenerated) -> killed bytestClearBothOrdersContextWordsonly (panic: array out-of-bounds access (0x32));testClearCalculateContextWords/testClearHandleIOContextWordspass under itCLEARERis the prankedclear3caller,TAKER/ACTORare the pranked owners of bob/alice; counterparty of each order is the other order's ownerorder-clearer()== clearer with alice's still checked; covered both sides x both sources, plus bob's owner/counterparty/sender/raindexpre-commit run --all-files: clean🤖 Generated with Claude Code
Summary by CodeRabbit