fix: quarantine disabled LPV resources#909
Conversation
kcov coverageLine coverage ran for this PR and uploaded a non-blocking report artifact named |
📋 SummaryPR #909 implements the disabled-LPV quarantine acceptance criterion from #902 (specifically: "Disabled LPV allocates no textures/buffers and runs no update pass"). It defers LPV grid textures, buffers, descriptor sets, and compute pipelines until LPV is enabled; releases them when disabled; skips the update pass and timing; defaults omitted preset 📌 Review Metadata
🔴 Critical Issues (Must Fix - Blocks Merge)None identified.
|
| Principle | Score | Notes |
|---|---|---|
| Single Responsibility | 8 | LPV resource lifecycle is now separated into initResources/deinitResources, and the enable gate is consolidated in isEnabled. |
| Open/Closed | 7 | Existing structs are modified rather than extended, but the change is a focused bug fix. |
| Liskov Substitution | 8 | No inheritance or interface subtypes introduced. |
| Interface Segregation | 8 | No new interfaces; isEnabled() is a simple, focused query. |
| Dependency Inversion | 8 | No new concrete dependencies; still relies on existing RHI/Vulkan abstractions. |
| Average | 7.8 |
🎯 Final Assessment
Overall Confidence Score: 75%
Confidence Breakdown:
- Code Quality: 75% (clean refactor, but the errdefer ordering misses the rare error path)
- Completeness: 80% (implements the stated acceptance criterion, but could use targeted lifecycle tests)
- Risk Level: 60% (low in normal operation; runtime resource destruction is safe via the resource-manager deletion queue, but the error-path leak is a latent risk)
- Test Coverage: 70% (preset default test added, but quarantine behavior is not unit-tested)
Merge Readiness:
- All critical issues resolved
- SOLID average score >= 6.0
- Overall confidence >= 60%
- No security concerns
- Tests present and passing (if applicable)
Verdict:
MERGE WITH FIXES — The PR correctly implements the disabled-LPV quarantine and passes tests; address the createGridTextures errdefer leak before merging.
{
"reviewed_sha": "610f5edd6908b5578a107f22c498785bb484995d",
"critical_issues": 0,
"high_priority_issues": 0,
"medium_priority_issues": 1,
"overall_confidence_score": 75,
"recommendation": "MERGE WITH FIXES"
}
📋 SummaryPR #909 implements the disabled-LPV quarantine acceptance criterion from #902 (specifically: "Disabled LPV allocates no textures/buffers and runs no update pass"). It defers LPV resource allocation until enabled, releases resources when disabled, skips the update pass when disabled, defaults omitted preset 📌 Review Metadata
🔴 Critical Issues (Must Fix - Blocks Merge)None identified.
|
| Principle | Score | Notes |
|---|---|---|
| Single Responsibility | 8 | LPV resource lifecycle is cleanly separated into initResources/deinitResources, and the enable gate is consolidated in isEnabled. |
| Open/Closed | 7 | Existing structs are modified rather than extended, but the change is a focused bug fix. |
| Liskov Substitution | 8 | No inheritance or interface subtypes introduced. |
| Interface Segregation | 8 | No new interfaces; isEnabled() is a simple, focused query. |
| Dependency Inversion | 8 | No new concrete dependencies; still relies on existing RHI/Vulkan abstractions. |
| Average | 7.8 |
🎯 Final Assessment
Overall Confidence Score: 85%
Confidence Breakdown:
- Code Quality: 85% (clean refactor, errdefer error path is now handled)
- Completeness: 85% (implements the stated acceptance criterion, but could use targeted lifecycle tests)
- Risk Level: 75% (low in normal operation; runtime resource destruction relies on existing RHI/Vulkan cleanup paths)
- Test Coverage: 75% (preset default test added, but quarantine behavior is not unit-tested)
Merge Readiness:
- All critical issues resolved
- SOLID average score >= 6.0
- Overall confidence >= 60%
- No security concerns
- Tests present and passing (if applicable)
Verdict:
MERGE — The PR correctly implements the disabled-LPV quarantine; consider adding lifecycle unit tests as a follow-up.
{
"reviewed_sha": "7dc333bc2df60f7fe4dd4fad32ddeaeb9778adee",
"critical_issues": 0,
"high_priority_issues": 0,
"medium_priority_issues": 0,
"overall_confidence_score": 85,
"recommendation": "MERGE"
}

Summary
Implements the disabled-LPV allocation/update acceptance criterion from #902.
Validation
nix develop --command zig fmt modules/engine-graphics/src/vulkan/lpv_system.zig modules/game-ui/src/screens/world.zig modules/game-ui/src/screens/world_frame_params.zig modules/game-core/src/settings/json_presets.zig modules/game-core/src/settings/tests.zignix develop --command zig build testnix develop --command zig build run -Dskip-present -Dauto-world=normal -Dstartup-diagnostic-seconds=5nix develop --command zig build test-robustnessblocked by pre-existing Zig 0.16 incompatibility:src/integration_test_robustness.zigreferences removedprocess.Child.Term.Exited