From b38812716d563b8520d0308222e77b16e60cdd47 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Fri, 20 Feb 2026 10:52:41 +0000 Subject: [PATCH] Default sync engine mode to read-pilot with fallback Co-authored-by: Julius Marminge --- README.md | 8 ++++---- SYNC_ENGINE_MIGRATION.md | 4 ++-- apps/server/src/index.ts | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index c5ca2a511e..c99d5954cd 100644 --- a/README.md +++ b/README.md @@ -105,13 +105,13 @@ T3 Code has a global runtime mode switch in the chat toolbar: The server supports feature-flagged sync-engine modes while migrating from the legacy in-house state sync pipeline to LiveStore. -- `T3CODE_SYNC_ENGINE_MODE=legacy` (default) +- `T3CODE_SYNC_ENGINE_MODE=livestore-read-pilot` (default) + - Uses the LiveStore mirror for `state.bootstrap`, `state.catchUp`, and `state.listMessages` reads when available. + - Automatically falls back to legacy reads if the mirror is unavailable or errors. +- `T3CODE_SYNC_ENGINE_MODE=legacy` - Uses the existing `PersistenceService`-backed state sync engine for reads and writes. - `T3CODE_SYNC_ENGINE_MODE=shadow` - Keeps legacy state as canonical, but mirrors committed `state.event` traffic into a LiveStore shadow store for parity validation. -- `T3CODE_SYNC_ENGINE_MODE=livestore-read-pilot` - - Uses the LiveStore mirror for `state.bootstrap`, `state.catchUp`, and `state.listMessages` reads when available. - - Automatically falls back to legacy reads if the mirror is unavailable or errors. Optional diagnostics: diff --git a/SYNC_ENGINE_MIGRATION.md b/SYNC_ENGINE_MIGRATION.md index 44d1d60eea..efd364c377 100644 --- a/SYNC_ENGINE_MIGRATION.md +++ b/SYNC_ENGINE_MIGRATION.md @@ -6,9 +6,9 @@ This runbook describes how to operate and verify the LiveStore migration path sa Server mode is controlled by `T3CODE_SYNC_ENGINE_MODE`: -- `legacy` (default): legacy persistence service is canonical for reads/writes. +- `livestore-read-pilot` (default): write path remains legacy-backed, but state reads prefer LiveStore mirror with delegate fallback. +- `legacy`: legacy persistence service is canonical for reads/writes. - `shadow`: legacy remains canonical, and `state.event` writes are mirrored into LiveStore. -- `livestore-read-pilot`: write path remains legacy-backed, but state reads prefer LiveStore mirror with delegate fallback. ## Diagnostics flags diff --git a/apps/server/src/index.ts b/apps/server/src/index.ts index 7be789c49c..78b112d5c3 100644 --- a/apps/server/src/index.ts +++ b/apps/server/src/index.ts @@ -41,7 +41,7 @@ function parsePort(value: string | undefined): number | undefined { function resolveSyncEngineMode(raw: string | undefined): SyncEngineMode { if (!raw || raw.trim().length === 0) { - return "legacy"; + return "livestore-read-pilot"; } const normalized = raw.trim().toLowerCase(); if (