fix(splat3d): address Codex review on render-depth certification (#206 follow-up)#208
Conversation
Two correctness fixes on the merged #206 code: - certify_batch_simd no longer panics on a depth_var shorter than batch.len: stage16 now reads via get().unwrap_or(0.0), matching certify_batch_scalar's fallback — honors the "does not panic on malformed input" contract. - HEEL-rejected blocks in cascade_block now return RenderDepthCertificate::ZERO (passed=false) instead of certify_depth_scalar(0,0,0,..), which yielded passed=true under default params and could be misread as certified. Promote the shared zeroed/failed certificate to a public associated const RenderDepthCertificate::ZERO. Add regression tests: short-depth_var SIMD parity (no panic), and HEEL-reject carries a failed certificate. https://claude.ai/code/session_017GFLBnDy23AWBqvkbHHC41
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR hardens depth-certificate handling in the splat-3D depth cascade and certification modules. A public ChangesDepth Certificate Zero Constant and Rejection Path Hardening
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Summary
Follow-up to the merged #206 fixing the two issues Codex flagged on commit
de039e4c:certify_batch_simdpanic on shortdepth_var(P1). The SIMD lane load stageddepth_varup tobatch.len, so a caller passing a shorter buffer would index out of bounds and panic — contradicting the documented "does not panic on malformed input" and diverging fromcertify_batch_scalar's.get().unwrap_or(0.0).stage16now reads viaget().unwrap_or(0.0), so a shortdepth_varreads0.0for missing lanes (SIMD↔scalar parity preserved).cascade_block's reject branch calledcertify_depth_scalar(0,0,0,…), which yieldspassed = trueunder default params (and nonzero error terms under a nonzero budget) — a rejected block could be misread as certified. It now returnsRenderDepthCertificate::ZERO(passed = false).Promotes the shared zeroed/failed certificate to a public associated const
RenderDepthCertificate::ZERO(used by the batch culled-slot path and HEEL rejection).Tests
certify_batch_simd_short_depth_var_does_not_panic— emptydepth_varagainst a 20-splat batch; SIMD matches scalar, no panic.heel_rejects_behind_near_planenow asserts the rejected decision carries a failed certificate (!passed, zero covariance error).hpc::splat3d::depth*suite: 29 pass;cargo fmt --checkclean.https://claude.ai/code/session_017GFLBnDy23AWBqvkbHHC41
Generated by Claude Code
Summary by CodeRabbit
Bug Fixes
Tests