Define backend-confirmed sync as a synchronous Store contract - #1554
Draft
slashv wants to merge 1 commit into
Draft
Define backend-confirmed sync as a synchronous Store contract#1554slashv wants to merge 1 commit into
slashv wants to merge 1 commit into
Conversation
Contributor
PR preview
Report historyPR 1554 · 2026-08-11 20:07 UTC
|
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.
Problem
SyncStatus.isSynceddescribes session-to-leader delivery and can betruewhile the leader still has events awaiting confirmation from the sync backend.
The Store intent layer does not currently define how a session observes that
second boundary.
Solution
Define one flat, synchronous
SyncStatusspanning both propagation boundaries.The existing fields keep their current meaning;
backendHead,backendPendingCount, andisBackendSyncedexpose the latest backendconfirmation state observed through the leader.
The contract is deliberately conservative: a synchronous snapshot may briefly
remain false while a newer leader observation is in transit, but stale leader
state must not produce a backend-synced result. A decision record captures that
trade-off, and an open delta tracks the implementation and regression coverage.
This is the intent-only bottom layer of a planned stacked change. It does not
change runtime behavior, add per-event receipts, or classify backend delivery
failures.
Validation
devenv tasks run lint:full:fixdevenv tasks run ts:checkdevenv tasks run test:unitRelated issues
SyncStatus.isSyncedcan be mistaken for backend-confirmed sync #1553