Skip to content

fix(splat3d): address Codex review on render-depth certification (#206 follow-up)#208

Merged
AdaWorldAPI merged 1 commit into
masterfrom
claude/splat3d-cpu-simd-renderer-MAOO0
May 26, 2026
Merged

fix(splat3d): address Codex review on render-depth certification (#206 follow-up)#208
AdaWorldAPI merged 1 commit into
masterfrom
claude/splat3d-cpu-simd-renderer-MAOO0

Conversation

@AdaWorldAPI
Copy link
Copy Markdown
Owner

@AdaWorldAPI AdaWorldAPI commented May 26, 2026

Summary

Follow-up to the merged #206 fixing the two issues Codex flagged on commit de039e4c:

  1. certify_batch_simd panic on short depth_var (P1). The SIMD lane load staged depth_var up to batch.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 from certify_batch_scalar's .get().unwrap_or(0.0). stage16 now reads via get().unwrap_or(0.0), so a short depth_var reads 0.0 for missing lanes (SIMD↔scalar parity preserved).
  2. HEEL-rejected blocks returned a passing certificate (P2). cascade_block's reject branch called certify_depth_scalar(0,0,0,…), which yields passed = true under default params (and nonzero error terms under a nonzero budget) — a rejected block could be misread as certified. It now returns RenderDepthCertificate::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 — empty depth_var against a 20-splat batch; SIMD matches scalar, no panic.
  • heel_rejects_behind_near_plane now asserts the rejected decision carries a failed certificate (!passed, zero covariance error).
  • Full hpc::splat3d::depth* suite: 29 pass; cargo fmt --check clean.

https://claude.ai/code/session_017GFLBnDy23AWBqvkbHHC41


Generated by Claude Code

Summary by CodeRabbit

  • Bug Fixes

    • Fixed a regression where depth-rejected blocks could incorrectly appear as valid.
    • Improved robustness of depth variance handling to prevent crashes when data sizes are mismatched.
  • Tests

    • Extended regression test coverage for depth certification edge cases.

Review Change Stack

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
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 26, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 1be8a18c-a701-4c6e-8bde-c4c722f13ba1

📥 Commits

Reviewing files that changed from the base of the PR and between 9ca4004 and b493999.

📒 Files selected for processing (2)
  • src/hpc/splat3d/depth_cascade.rs
  • src/hpc/splat3d/depth_cert.rs

📝 Walkthrough

Walkthrough

This PR hardens depth-certificate handling in the splat-3D depth cascade and certification modules. A public RenderDepthCertificate::ZERO constant replaces internal constant patterns, used consistently across HEEL rejection, scalar batch certification, and SIMD batch certification for invalid/culled slots. SIMD stage16 now reads bounds-safely to prevent panics on short input buffers.

Changes

Depth Certificate Zero Constant and Rejection Path Hardening

Layer / File(s) Summary
RenderDepthCertificate::ZERO constant definition
src/hpc/splat3d/depth_cert.rs
Public associated constant ZERO represents a failed/zeroed certificate (passed = false) for culled or rejected slots, replacing prior file-local ZERO_CERT.
Scalar and SIMD certificate paths for invalid slots with robustness fix
src/hpc/splat3d/depth_cert.rs, tests/*
Scalar and SIMD certificate generation emit RenderDepthCertificate::ZERO for invalid lanes. SIMD stage16 performs bounds-safe reads via get().unwrap_or(0.0) to prevent panics on short buffers. Test suite updated to assert against RenderDepthCertificate::ZERO and includes regression test verifying SIMD robustness.
HEEL rejection hardening and test
src/hpc/splat3d/depth_cascade.rs
HEEL rejection path in cascade_block now assigns RenderDepthCertificate::ZERO instead of calling certify_depth_scalar with zero inputs. Test heel_rejects_behind_near_plane extended to verify rejected blocks have certificate.passed == false and certificate.covariance_depth_error == 0.0.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 A zero that's true, not a facade so neat,
Makes rejections and culls more complete!
No false-passing paths, just honest ZERO bright,
SIMD bounds-safe, and HEEL set right. ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly references a specific fix addressing Codex review findings on render-depth certification, directly matching the primary changes across both modified files.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/splat3d-cpu-simd-renderer-MAOO0

Comment @coderabbitai help to get the list of available commands and usage tips.

@AdaWorldAPI AdaWorldAPI merged commit 17d8da8 into master May 26, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants