Skip to content

Design scenario-based sync verification for reproducible convergence testing - #1438

Closed
slashv wants to merge 5 commits into
livestorejs:schickling/2026-07-15-intent-designfrom
slashv:victornyberg/docs/test-setup
Closed

Design scenario-based sync verification for reproducible convergence testing#1438
slashv wants to merge 5 commits into
livestorejs:schickling/2026-07-15-intent-designfrom
slashv:victornyberg/docs/test-setup

Conversation

@slashv

@slashv slashv commented Jul 18, 2026

Copy link
Copy Markdown
Collaborator

Important

This is a stacked draft based on #1406 (schickling/2026-07-15-intent-design) and should be reviewed and merged after it. PR #1406 establishes context/ as the current intent layer and RFCs as the proposal pipeline. This architecture therefore starts as an RFC; once accepted and implemented, its durable contracts should converge into context/02-system/09-verification/.

Problem

LiveStore has targeted sync simulation hooks and tests, but no unified, serializable, reproducible architecture for exercising concurrent clients, network and backend failures, convergence, and trace inspection.

Writing this design directly into context/ would incorrectly describe an unimplemented proposal as current system intent. We need to develop and review the architecture first while preserving a clear path into the intent hierarchy introduced by #1406.

Solution

Add RFC 0003, Scenario-Based Sync Verification, defining a direction for:

  • declarative, reproducible scenario specifications;
  • a headless runner built around real sync components;
  • dynamic creation of clients and additional sessions within a client;
  • workloads, network and backend faults, and controlled time;
  • participant execution profiles independent of sync-backend realization;
  • structured traces, correctness oracles, artifacts, and a separate visualizer;
  • initial verification with the SQLite read model while preserving a path toward read-model-independent sync verification.

The RFC deliberately leaves the concrete scenario file syntax open until the runtime model is validated. It changes no runtime behavior. Once the proposal is accepted and implemented, the resulting system contracts should be distilled into the verification section of context/; implementation detail and operating guidance can remain in contributor documentation.

Validation

  • git diff --check upstream/pr-1406...HEAD
  • Verified that relative Markdown links in the RFC resolve locally.
  • Not run: dt lint:full:fix, dt ts:check, or dt test:run. The repository's devenv remained in Nix environment evaluation after warning that the user was not trusted to configure Cachix, and never reached dt. This is a documentation-only draft with no executable changes.
  • No changelog entry: this RFC proposes future architecture and does not change shipped behavior or package APIs.

Demo (optional)

scenario specification
         |
         v
       runner ----> participants + sync backend + injected faults
         |
         v
 structured trace ----> correctness oracles / artifacts / visualizer

Related issues

@slashv slashv added docs design decision Design decision / RFC · Set: manual testing Testing · Set: manual syncing Sync engine and protocol · Set: manual feedback-wanted Feedback wanted · Set: manual labels Jul 18, 2026
@schickling
schickling deleted the branch livestorejs:schickling/2026-07-15-intent-design July 18, 2026 08:45
@schickling schickling closed this Jul 18, 2026
@schickling-assistant schickling-assistant added type:docs Documentation-only change or documentation task · Set: manual and removed docs labels Jul 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

design decision Design decision / RFC · Set: manual feedback-wanted Feedback wanted · Set: manual syncing Sync engine and protocol · Set: manual testing Testing · Set: manual type:docs Documentation-only change or documentation task · Set: manual

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants