Skip to content

Report terrain validation trace diagnostics#121

Merged
ogyrec-o merged 1 commit into
mainfrom
diagnose/issue-386-terrain-validation-report
May 27, 2026
Merged

Report terrain validation trace diagnostics#121
ogyrec-o merged 1 commit into
mainfrom
diagnose/issue-386-terrain-validation-report

Conversation

@ogyrec-o

Copy link
Copy Markdown
Member

Summary

Adds a non-breaking terrain interaction validation report API with server-authoritative ray trace diagnostics.

Why

frevenengine/freven-engine#386 rapid LMB smoke now has one remaining rare rollback after #120:

  • FaceMismatch is gone.
  • Most rapid break actions commit.
  • A rare break can still be rejected with Occluded.

Occluded must not be blindly relaxed because it protects against breaking through another block. To diagnose correctly, runtime/server code needs to know which authoritative trace hit caused the rejection without duplicating DDA logic outside the shared validator.

What changed

  • Adds TerrainInteractionTraceHitV2.
  • Adds TerrainInteractionTraceV2.
  • Adds TerrainInteractionValidationReportV2.
  • Adds validate_terrain_interaction_v2_report(...).
  • Keeps existing validate_terrain_interaction_v2(...) API source-compatible by delegating to the report API.
  • Includes the authoritative trace hit block id, position, face, distance, and contact point.
  • Adds regression coverage proving reports expose the occluding trace hit.

Boundaries

  • no Vanilla source changes
  • no engine source changes
  • no Boot changes
  • no protocol changes
  • no validation behavior changes
  • no server authority weakening
  • no client prediction as authority

Validation

  • cargo +stable fmt --all -- --check
  • cargo +stable test --locked -p freven_block_api terrain_interaction
  • cargo +stable test --locked --workspace
  • cargo +stable clippy --locked --workspace --all-targets -- -D warnings
  • git --no-pager diff --check

Related:

@ogyrec-o ogyrec-o self-assigned this May 27, 2026
@ogyrec-o ogyrec-o merged commit 0e2db87 into main May 27, 2026
1 check passed
@ogyrec-o ogyrec-o deleted the diagnose/issue-386-terrain-validation-report branch May 27, 2026 16:10
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.

1 participant