Fix: reconcile live expedition state without rebuilding the Realm#68
Closed
ael-dev3 wants to merge 1 commit into
Closed
Fix: reconcile live expedition state without rebuilding the Realm#68ael-dev3 wants to merge 1 commit into
ael-dev3 wants to merge 1 commit into
Conversation
Owner
Author
|
Superseded by merged PR #72. The live-state reconciliation work was integrated there with an atomic all-layer preflight so a later projection failure cannot leave the Realm partially mutated. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
This is PR A of the four-worker release train. It keeps live gathering updates inside one persistent Realm scene.
RealmMapScreen.RealmSceneHandle.reconcileLiveGatheringStateso resource layers update occupation rings, wagons, and telemetry in place.Why
Before this change, the scene-construction effect depended on
goldNodes,foodNodes,woodNodes, andstoneNodes. Those arrays intentionally changed when occupation phase, timestamps, or origin-castle state changed. A successful dispatch therefore disposed and rebuilt the entire WebGL scene, calledsetCameraMode('realm'), and could leave the player in the reported overview-like camera state until reload.The scene-construction effect now depends only on stable site topology. Live occupation updates reconcile through the persistent scene handle and never call camera reset or renderer loading state.
Dependency / stack
This branch is intentionally stacked on the exact refreshed head of Stone Quarry PR #65:
agent/stone-quarry-nodede679623b6814d95e501000d11d7208c6318d86e5d69e5eEvidence
The new scene regression injects an outbound-to-gathering occupation update and asserts:
Checks run:
tsc -bvitest run: 181 files, 1,638 tests passedspacetimedb/tsconfig.jsonTypeScript checkgit diff --checkScope boundary
This PR fixes scene stability and is not the generic four-worker authority migration. PR B will append the next schema generation after Stone v9, add exactly four server-owned workers per castle, generic dispatch/recall/claim, worker selection/roster UX, and the staged legacy cutover gate.
No SpacetimeDB schema, reducer, binding, production data, seed, deployment, or publish action is included here.