Skip to content

Fix: harden renderer recovery invariants and input handling#82

Closed
ael-dev3 wants to merge 1 commit into
fix/realm-renderer-recoveryfrom
fix/realm-renderer-recovery-followup
Closed

Fix: harden renderer recovery invariants and input handling#82
ael-dev3 wants to merge 1 commit into
fix/realm-renderer-recoveryfrom
fix/realm-renderer-recovery-followup

Conversation

@ael-dev3

Copy link
Copy Markdown
Owner

Summary

Stacked follow-up to #80 for the main ael-dev3/Warpkeep repository. This PR keeps the renderer recovery scope focused and removes the remaining lifecycle/input gaps without duplicating the recovery implementation already in #80.

Base / head

Changes

  • Make WebGL2 the authoritative, cached capability probe; WebGL1 cannot enter the Realm renderer path.
  • Enforce the lifecycle invariant that a renderer which has presented a frame can never fall back to static compatibility mode.
  • Add monotonic renderer-generation telemetry and explicit failure-code/context-loss/context-restore DOM counters.
  • Suspend pointer, wheel, label-click, and camera gesture input synchronously during WebGL context loss; cancel active gestures and pause ambience.
  • Record bounded context loss/restore telemetry and resume/rebuild through the existing attestation-preserving recovery path.
  • Add a deterministic short yield before the single allowed Compact castle transport retry.
  • Remove the retired exact fallback sentence from the compatibility surface and use precise recovery-safe copy.
  • Extend lifecycle, context-event, fallback-copy, and cleanup regression coverage.
  • Document the follow-up recovery invariants and diagnostics.

Verification

  • tsc -b
  • vitest run: 197 files, 1,756 tests passed
  • vitest run tests/realmRendererRecovery.test.ts tests/realmSceneCleanup.test.ts tests/realmMapScreen.test.tsx tests/realmQualityRecreation.test.tsx: 4 files, 78 tests passed
  • vite build
  • git diff --check

Non-goals / safety

No backend, SpacetimeDB, authorization, asset, Water Engine, DNS, Pages, or production deployment changes are included. Durable world state remains outside the renderer lifecycle.

@ael-dev3

Copy link
Copy Markdown
Owner Author

Superseded by #95, which carries the renderer invariants and follow-up fixes in the released Alpha 0.3.14 tree.

@ael-dev3 ael-dev3 closed this Jul 22, 2026
@ael-dev3
ael-dev3 deleted the fix/realm-renderer-recovery-followup branch July 22, 2026 20:56
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