Skip to content

Document terrain interaction contract v2#116

Merged
ogyrec-o merged 1 commit into
mainfrom
design/issue-386-terrain-interaction-contract-v2
May 26, 2026
Merged

Document terrain interaction contract v2#116
ogyrec-o merged 1 commit into
mainfrom
design/issue-386-terrain-interaction-contract-v2

Conversation

@ogyrec-o

@ogyrec-o ogyrec-o commented May 26, 2026

Copy link
Copy Markdown
Member

Summary

Defines Terrain Interaction Contract v2 as the long-term rc10 contract for voxel terrain break/place interactions.

This is SDK-only design work after freven-engine#386 smoke showed that local prediction fixes alone are not enough: client presented intent and server authoritative validation need one shared contract.

Why

Current Vanilla v1 payloads carry only target position/face/block id, while the client builds intent from prediction-aware presented cursor state and the server reconstructs validation from authoritative world/player position/block-center visibility. That mismatch can produce valid-looking client predictions that later rollback.

What changed

  • Adds docs/TERRAIN_INTERACTION_CONTRACT_v2.md.
  • Documents intent identity, stream boundary, ray origin/direction, hit/contact semantics, place semantics, prediction dependencies, server validation, deterministic rejection categories, and reconciliation.
  • Marks target-position-only v1 semantics as legacy/non-rc10 for the rc10 path.
  • Adds SDK vocabulary stubs in freven_block_api without choosing/wiring a serialized payload schema.
  • Updates SDK docs/index links and migration notes.

Boundaries

  • no engine runtime changes
  • no Vanilla runtime changes
  • no Boot changes
  • no protocol/wire implementation
  • no hidden fallback to broken v1 target-pos-only validation
  • no client prediction as server truth

Validation

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

Related:

@ogyrec-o ogyrec-o self-assigned this May 26, 2026
@ogyrec-o ogyrec-o merged commit e7f6544 into main May 26, 2026
1 check passed
@ogyrec-o ogyrec-o deleted the design/issue-386-terrain-interaction-contract-v2 branch May 26, 2026 10:12
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