feat(admin): Step 2 - wire BondSlashChoice through dispute finalize execute path#77
Conversation
Thread bond slash choice from the TUI action through execute_finalize_dispute into admin settle/cancel with to_optional_payload() on the wire. Add log_context, module tests, and docs marking the execute layer done (TUI picker still pending). Co-authored-by: Cursor <cursoragent@cursor.com>
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ 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: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThis PR threads ChangesBond slash choice in dispute finalization
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
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)
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@docs/FINALIZE_DISPUTES.md`:
- Line 39: The "Current UI" note in FINALIZE_DISPUTES.md references the wrong
step numbers ("until step 4–5 land") which conflicts with the planned
bond/confirm flow listed as steps 8–9; update that phrase to reference the
correct step numbers (e.g., "until steps 8–9 land") so the note aligns with the
bond/confirm flow described above and avoid rollout-state confusion.
🪄 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: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 35166b57-e9e7-4017-b125-687f755bf2ed
📒 Files selected for processing (12)
README.mddocs/ADMIN_DISPUTES.mddocs/CODING_STANDARDS.mddocs/FINALIZE_DISPUTES.mddocs/MESSAGE_FLOW_AND_PROTOCOL.mddocs/README.mdsrc/ui/key_handler/admin_handlers.rssrc/ui/key_handler/enter_handlers.rssrc/util/order_utils/bond_resolution.rssrc/util/order_utils/execute_admin_cancel.rssrc/util/order_utils/execute_admin_settle.rssrc/util/order_utils/execute_finalize_dispute.rs
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
Summary
Follow-up to #76 (mostro-core 0.11.3 +
BondSlashChoicehelper). This PR completes step 3 — execute layer for admin dispute bond slash:execute_admin_settle/execute_admin_cancelacceptbond: BondSlashChoiceand sendbond.to_optional_payload()on the wire (None→payload: null)execute_finalize_disputethreadsbondthrough to settle/cancelexecute_finalize_dispute_actiontakesbond; UI still passesBondSlashChoice::default()until the slash picker landsBondSlashChoice::log_context()for consistent log/toast phrasingbond_enabledgating still Pendingenter_handlers.rs: imports consolidated at top of fileMotivation
Aligns Mostrix with admin settle / admin cancel and Mostro daemon bond resolution (MostroP2P/mostro#738). Safe default: no slash until the TUI exposes choices.
Breaking changes
None for users. Internal API:
execute_admin_settle,execute_admin_cancel, andexecute_finalize_disputenow require abondargument.Test plan
cargo fmt --allcargo clippy --all-targets --all-featurescargo test(108 tests)cargo buildpayload: null(default)BondResolutionon wireFollow-up (not in this PR)
SelectBondSlashstep + confirm summarybond_enabledfrom kind 38385; skip slash UI when offAddBondInvoice/BondPayoutRequestfor payout recipientsSummary by CodeRabbit
New Features
Documentation