test: cover Recycler and preserve pending refunds - #25
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 (23)
💤 Files with no reviewable changes (1)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughThe pull request configures Maven tests and JaCoCo coverage checks, adds test suites, updates resource, recipe, escrow, inventory, and effect code, and uploads coverage reports from build workflows. ChangesRecycler tests and runtime
Priority: ⬇️ Low Estimated code review effort: 4 (Complex) | ~45 minutes Change: Bug fix Merge Risk: 🔵 Low · up to Pending refunds now survive collisions and unreadable files. One disclosed edge case remains: if a pending file cannot be deleted, an item may be handed out twice. Merging is acceptable if the owner is aware of this and plans a transactional persistence follow-up. Security Architecture ReviewSecurity architecture risk: 🟡 Moderate · up to The refund fix improves recovery, but a partially completed file move can now accumulate multiple refunds across restarts. Downgrading can also leave newer refund files undiscoverable. These risks depend on recovery or rollback conditions rather than normal successful operation. 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 2.27% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 88 functions across 18 files. (4 skipped: 4 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
A rabbit checks the tests at dawn, Comment |
Recycler previously had no measured test coverage, and its pending-return handling could discard an older refund when a second escrow file arrived for the same player. This adds 45 tests with strict 100% line, branch and instruction gates across all production classes, and fixes three reproduced failures: colliding pending returns now retain and deliver both stacks; unreadable escrow/return files remain available for recovery; equal configured output velocity bounds no longer throw after recycling.
Tests cover configuration and legacy recipes, provider ordering and all six provider integrations, durability and deposit policy, GUI events, cancellation/confirmation, persisted escrow recovery, commands, lifecycle and scheduled effects. CI publishes HTML/XML coverage reports. Private invariant checks are simplified only where existing caller validation, Bukkit collection contracts, or fixed layout arithmetic already establish the condition. Resource null checks move before resource ownership to avoid unreachable compiler-generated cleanup branches while preserving close/error handling.
Validation: Java 21
mvn -o -B --no-transfer-progress clean verify: 45 tests, no failures/errors/skips; 1,316/1,316 lines, 728/728 branches, 5,310/5,310 instructions; no coverage exclusions. Each corrected inventory/effect failure was reproduced before its fix.Remaining existing limitation: failed file deletion is not checked before a refund, so a readable return file that cannot be deleted could deliver twice. This needs a separate transactional persistence change. External plugin APIs are mocked; these results do not replace a live Minecraft integration run.
Summary by CodeRabbit
Bug Fixes
Documentation
Tests