Skip to content

fix: harden compact tile metrics and validation#929

Merged
github-actions[bot] merged 1 commit into
stagefrom
fix/917-compact-tile-review
Jul 13, 2026
Merged

fix: harden compact tile metrics and validation#929
github-actions[bot] merged 1 commit into
stagefrom
fix/917-compact-tile-review

Conversation

@MichaelFisher1997

Copy link
Copy Markdown
Collaborator

Summary

  • saturate compact-tile savings metrics to prevent malformed inputs from underflowing
  • cap material validation against the versioned 7-bit wire range
  • make expanded vertex size an explicit metrics input instead of importing the RHI vertex type
  • cover compact tile headers and payloads with the CRC
  • add regression tests for malformed metrics and header corruption

Validation

  • nix develop --command zig build test --summary all (328/328 tests passed)
  • pre-push formatting and full test checks passed
  • git diff --check

Follow-up to #928 and #917.

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Jul 13, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📋 Summary

This PR is a follow-up to #917 and references #928. Issue #917 is a broad LOD GPU roadmap; the PR does not fully complete it but contributes the hardening pieces described in the summary. Issue #928 could not be accessed.

The PR hardens modules/world-lod/src/lod_tile.zig: it saturates ByteMetrics.savedBytes, caps material validation to the 7-bit wire range, decouples byteMetrics from the RHI Vertex type by accepting an explicit vertex size, and extends the CRC to cover header metadata. It also adds regression tests for malformed metrics and header corruption. All 328 tests pass and formatting is clean.

📌 Review Metadata

The implementation matches the PR description: metrics are saturated, validation is capped, vertex sizing is explicit, and the CRC covers the header. This does not complete #917's full roadmap, but it is a valid incremental step toward the compact-tile workstreams.

🔴 Critical Issues (Must Fix - Blocks Merge)

None identified.

⚠️ High Priority Issues (Should Fix)

None identified.

💡 Medium Priority Issues (Nice to Fix)

None identified.

ℹ️ Low Priority Suggestions (Optional)

None identified.

📊 SOLID Principles Score

Principle Score Notes
Single Responsibility 9 Changes are tightly scoped to compact tile hardening.
Open/Closed 8 byteMetrics now accepts vertex size externally, making it more extensible without modifying RHI.
Liskov Substitution 8 No subtyping; API change is source-compatible within the repo (only caller updated).
Interface Segregation 8 Function signature is focused; no bloated dependencies.
Dependency Inversion 9 world-lod no longer imports RHI Vertex for metrics.
Average 8.4

🎯 Final Assessment

Overall Confidence Score: 92%

Confidence Breakdown:

  • Code Quality: 95%
  • Completeness: 90%
  • Risk Level: 20%
  • Test Coverage: 95%

Merge Readiness:

  • All critical issues resolved
  • SOLID average score >= 6.0
  • Overall confidence >= 60%
  • No security concerns
  • Tests present and passing

Verdict:

MERGE

The PR is a focused, well-tested hardening change with no unresolved issues.

{
  "reviewed_sha": "843a0aa58aa935ae9b0aa884fab8c8020accdeec",
  "critical_issues": 0,
  "high_priority_issues": 0,
  "medium_priority_issues": 0,
  "overall_confidence_score": 92,
  "recommendation": "MERGE"
}

New%20session%20-%202026-07-13T02%3A28%3A38.515Z
opencode session  |  github run

@github-actions
github-actions Bot merged commit 9b33853 into stage Jul 13, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant