fix: reject mail to recipients who opted out before confirmation - #26
Conversation
|
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 (6)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughMailService now checks that the selected character remains available for mail before calculating flight time. If no listed mail target matches the recipient’s owner UUID and character ID, it returns the letter and sends an unavailable message. ChangesRecipient Mail Check
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to The change is ready to merge after normal checks. Its behavior if RPCharacters is disabled during an open confirmation remains unverified, but no resulting failure has been established. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The new check reduces mail sent to characters who opted out before confirmation. Its effect depends on the recipient service being deployed alongside it, and unexpected recipient data could interrupt the letter-return path. No broader access or privilege change is evident. Retained concerns
Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 3 files. (3 skipped: 3 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
A rabbit checks the mailbound trail Comment |
If a character opts out of receiving mail after a sender opens the recipient picker, confirmation now returns the letter instead of sending it to the stale selection. The check matches both owner UUID and character ID against RPCharacters' current recipient list.
Adds a configurable rejection message. Existing in-flight and pending deliveries remain unchanged. The per-character toggle and persistence live in TF-Minecraft/RPCharacters#49; deploy both changes for the complete behavior. This uses the existing RPCharacters API.
Validation: Java 21,
mvn -o -q verifypassed (26 tests). New tests verify that unavailable recipients get the letter returned without queueing delivery, and listed recipients still reach normal flight validation. Adds JSON Simple in test scope to initialize the RPCharacters API in Mockito. No live-server test performed.Summary by CodeRabbit