Skip to content

feat(engine): track position revisions through shared mutation paths - #916

Draft
apotema wants to merge 1 commit into
mainfrom
feat/position-revisions
Draft

apotema wants to merge 1 commit into
mainfrom
feat/position-revisions

Conversation

@apotema

@apotema apotema commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Prepared navigation queries need to detect position changes without traversing parent chains. This adds opt-in, world-local position revision tokens: preparation registers an entity; queries read its current token without allocating or repairing anything.

Shared position and hierarchy setters invalidate the entity and descendants immediately, while unrelated tracked entities retain their tokens. Generic Position mutations are covered. Generic Parent mutations now maintain the reverse Children index through the hierarchy setter. Destruction and ECS reset prevent token reuse; tracking follows its owning world. Raw Children replacement switches to conservative invalidation until world reset.

Part of Flying Platform's prepared endpoint design: https://github.com/moca-tecnologia/flying-platform-labelle/pull/1046. This does not enable prepared game matching. Direct backend/pointer writes still need migration/audit; explicit invalidation is available for unavoidable Position writes. Graph registration, CMN publication and controller/game integration remain separate. POSITION-REVISIONS.md documents the contract and fallback cost.

Validation: zig build test -j2 --summary all passed 281 build steps and 1,511 tests, including six new lifecycle regressions. All 20 Flying Platform test targets passed using the local engine/pathfinder overrides. No performance claim or WASM measurement is made.

@coderabbitai

coderabbitai Bot commented Oct 15, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

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