Cancel a maintenance pay request after one vehicle click - #66
Conversation
The pay session was only cleared when the payment succeeded. A failed attempt (no unpaid maintenance, insufficient funds or an unregistered vehicle) left it armed, so every vehicle right-click was cancelled and repeated the error until the 60-second timeout. Clear the session after any payment attempt, matching the transfer and release sessions. Players rerun the command to try again. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe listener now passes the vehicle UUID and type ID to ChangesVehicle maintenance payment handling
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to Failed payments no longer keep intercepting vehicle clicks. No actionable issue remains before merge. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to A failed payment now ends the armed request, so later vehicle clicks are no longer intercepted by that request. The review found no demonstrated new privilege or broader payment exposure, but some exceptional and overlapping-payment behavior remains unverified. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
A rabbit watched the payment flow, Comment |
Problem
After
/faction vehicle maintenance pay bank, a failed payment left the pay request armed. Reasons for failure include "This vehicle has no unpaid maintenance", insufficient funds and an unregistered vehicle. Every right-click on a vehicle was then cancelled and repeated the error until the request timed out (transfer-request-timeout-seconds, 60 s), so the player felt stuck.Fix
VehicleMaintenancePayListenernow clears the session after any payment attempt, not just a successful one. This matches the transfer and release sessions. To retry, the player runs the command again.The payment step moved into a package-private
pay(...)method. ModelEngine is not on the test classpath, soActiveVehiclecannot be mocked.Tests
failedPaymentDisarmsSessionSoLaterClicksReachTheVehicleinVehicleMaintenanceBankCommandTest.mvn testsuite passes locally.🤖 Generated with Claude Code
Summary by CodeRabbit