test: enforce full GeigerCounters coverage and fix collection regressions - #21
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 (20)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughThe pull request adds automated tests and JaCoCo coverage enforcement. It also changes command coordinate validation, configuration migration, source movement and collection, drop-limit timing, and WorldGuard region lookup. ChangesRuntime behavior and verification
Priority: ➖ Normal Estimated code review effort: 4 (Complex) | ~60 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to The collection test exercises its intended retry, and a failed source move has a fallback. No identified issue needs to be fixed before merging. Security Architecture ReviewSecurity architecture risk: 🟡 Moderate · up to A manual move now hides the current source while a new location loads. If that operation never finishes, collection can remain unavailable to everyone on the server until an administrator intervenes. Normal command access is restricted, and the reviewed changes also strengthen stale-move and collection checks. 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)
Full details: Docstring CoverageExplanation Docstring coverage is 7.69% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 156 functions across 17 files. (3 skipped: 3 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
A rabbit checks the source’s new place Comment |
GeigerCounters had no executable coverage suite. Regression tests reproduced collection from the wrong world or a stale source, an older asynchronous move overwriting a newer one, lost legacy message customizations, nonfinite move coordinates, and inaccurate wait times after lowering or disabling drop limits. Fix those cases and cover configuration/migration, commands, collection/rewards, rate limits/persistence, spawn filtering, lifecycle, particles and sounds.
Use the equivalent
BukkitWorldwrapper directly for WorldGuard world lookup; the pinned older WorldEdit adapter's static enum initialization is incompatible with the current Paper API. Narrow private-guard and weighted-selection cleanups preserve established behavior.mvn clean verifyenforces 100% production line, branch and instruction coverage without exclusions; CI uploads JaCoCo reports. Java 21 clean offline verify passed: 100 tests, zero failures/errors/skips; 1,163/1,163 lines, 489/489 branches, 5,280/5,280 instructions. External server/plugin boundaries are mocked; no deployment was performed.Collection now consumes exactly one active counter in either hand, preserves the remaining stack, and delivers one dead counter. Rewards and dead-counter inventory leftovers drop at the player instead of being discarded; full and partially full inventories have regression coverage.
Summary by CodeRabbit