Skip to content

Define backend-confirmed sync as a synchronous Store contract - #1554

Draft
slashv wants to merge 1 commit into
mainfrom
codex/backend-sync-intent
Draft

Define backend-confirmed sync as a synchronous Store contract#1554
slashv wants to merge 1 commit into
mainfrom
codex/backend-sync-intent

Conversation

@slashv

@slashv slashv commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Problem

SyncStatus.isSynced describes session-to-leader delivery and can be true
while 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 SyncStatus spanning both propagation boundaries.
The existing fields keep their current meaning; backendHead,
backendPendingCount, and isBackendSynced expose the latest backend
confirmation 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:fix
  • devenv tasks run ts:check
  • devenv tasks run test:unit

Related issues

@slashv slashv added syncing Sync engine and protocol · Set: manual api Public API surface · Set: manual type:feature New user-visible or system capability · Set: manual labels Aug 11, 2026
@github-actions

Copy link
Copy Markdown
Contributor

PR preview

Subject Status Report Details Updated
LiveStore docs preview success Docs preview deployed (livestore-docs-dev) PR aliases: pr-1554-cb6bbc5, pr-1554 2026-08-11 19:55 UTC
web-linearlite success web-linearlite deployed (preview) Worker: example-web-linearlite-preview.livestore.workers.dev 2026-08-11 19:48 UTC
web-todomvc success web-todomvc deployed (preview) Worker: example-web-todomvc-preview.livestore.workers.dev 2026-08-11 19:48 UTC
web-todomvc-script success web-todomvc-script deployed (preview) Worker: example-web-todomvc-script-preview.livestore.workers.dev 2026-08-11 19:48 UTC
web-todomvc-sync-cf success web-todomvc-sync-cf deployed (preview) Worker: example-web-todomvc-sync-cf-preview.livestore.workers.dev 2026-08-11 19:48 UTC
Report history

PR 1554 · 2026-08-11 20:07 UTC

Subject Status Report Details Updated
LiveStore docs preview success Docs preview deployed (livestore-docs-dev) PR aliases: pr-1554-cb6bbc5, pr-1554 2026-08-11 19:55 UTC
web-linearlite success web-linearlite deployed (preview) Worker: example-web-linearlite-preview.livestore.workers.dev 2026-08-11 19:48 UTC
web-todomvc success web-todomvc deployed (preview) Worker: example-web-todomvc-preview.livestore.workers.dev 2026-08-11 19:48 UTC
web-todomvc-script success web-todomvc-script deployed (preview) Worker: example-web-todomvc-script-preview.livestore.workers.dev 2026-08-11 19:48 UTC
web-todomvc-sync-cf success web-todomvc-sync-cf deployed (preview) Worker: example-web-todomvc-sync-cf-preview.livestore.workers.dev 2026-08-11 19:48 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api Public API surface · Set: manual syncing Sync engine and protocol · Set: manual type:feature New user-visible or system capability · Set: manual

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant