Repository navigation
test: enforce full GunsAndGadgets coverage and fix runtime regressions - #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 (29)
💤 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; 5 remain after this review. 📝 WalkthroughWalkthroughThe pull request adds Maven test and coverage configuration, broad automated tests, and changes to configuration parsing, crafting, gun management, inventory handling, and projectile behavior. ChangesGameplay behavior and test coverage
Priority: ➖ Normal Estimated code review effort: 4 (Complex) | ~60 minutes Change: Bug fix Sequence Diagram(s)sequenceDiagram
participant ProjectileShooter
participant World
participant VehicleFramework
participant HitTarget
ProjectileShooter->>World: Ray-trace projectile segment
World-->>ProjectileShooter: Return entity and block hit positions
ProjectileShooter->>VehicleFramework: Resolve hit entity as a vehicle when enabled
VehicleFramework-->>ProjectileShooter: Return vehicle or no vehicle
alt Registered vehicle hit
ProjectileShooter->>HitTarget: Apply projectile or rocket damage
else Living entity hit
ProjectileShooter->>HitTarget: Apply entity damage and hit effects
end
Merge Risk: ⚪ Minimal · up to This change adds broad test coverage and fixes to crafting, reloading, and projectile handling. The evidence available shows no established defect that should block merging. Whether a shot can damage the shooter's own vehicle has not been confirmed and may be worth a follow-up check. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The changes mostly strengthen validation and recovery. One new full-inventory fallback places crafted weapons in the shared world, where another player may be able to collect them. Release dependency checks are present, but some deployment-specific controls remain unverified. 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 7.14% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 252 functions across 24 files. (4 skipped: 4 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
A rabbit checks the coverage rows, Comment |
GunsAndGadgets had no executable coverage suite. Add regression tests covering firing/collisions, reload/ammo accounting, crafting/inventories, stats/skins/provenance, persistence/configuration, commands/lifecycle and automatic refresh.
Fix the defects exposed by those tests:
mvn clean verifynow enforces 100% production line, branch and instruction coverage without exclusions. CI uploads JaCoCo reports. Tests use real dependency types and mock external server/plugin boundaries. Small refactors remove checks ruled out by callers/API contracts and make private random calculations deterministic in tests.Build inputs include checksum-pinned NBTAPI/ModelEngine and fastutil for integration tests. CoreProtect is declared as a provided API dependency for VehicleFramework type loading, using the shared verified-release installer; none of these dependencies are bundled in the runtime JAR.
Validation: Java 21 clean offline Maven verify passed with 161 tests, zero failures/errors/skips; 2,335/2,335 lines, 1,196/1,196 branches and 10,879/10,879 instructions. No live-server deployment performed.
Additional regressions fix the remaining damage/accuracy and ammunition issues: rocket self-damage scales linearly and ignores arming-time reduction, piercing is clamped to 0–100% and can be lethal, and accuracy improves continuously from the existing zero-stat spread with a 0.07-degree floor. Cancelled reloads refund exact consumed item snapshots even after skin/ammo configuration changes; overflow drops safely. Reservation identity prevents an older reload task from interfering with a newer one. Unknown ammunition definitions preserve existing loaded state rather than consuming it.
Summary by CodeRabbit