Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(sync): bounded tail-first thread sync (v2) with media externalization and transport negotiation #3849

Closedsnipemanmike(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/3849/headopened View on GitHub

Showing 55 changed files with 96 additions and 12 deletions (loading 51).

x
0 of 55 viewed, 55 left
7 additions and 3 deletionsapps/mobile/src/connection/environment-cache-store.tsModified
View file
@@ -8,6 +8,7 @@
OrchestrationThreadDetailSnapshot,
ServerConfig,
VcsListRefsResult,
+ WindowedOrchestrationThread,
} from "@t3tools/contracts";
import * as Effect from "effect/Effect";
import * as Layer from "effect/Layer";
@@ -17,7 +18,10 @@
import * as MobileDatabase from "../persistence/mobile-database";
​
const SHELL_SNAPSHOT_CACHE_SCHEMA_VERSION = 1;
-const THREAD_SNAPSHOT_CACHE_SCHEMA_VERSION = 2;
+// Bumped 2 -> 3: the stored snapshot is now either a complete legacy detail
+// snapshot or a bounded thread-sync-v2 window. Version-2 records fail decode
+// and are evicted by loadDecodedCache, so upgrades take one clean resync.
+const THREAD_SNAPSHOT_CACHE_SCHEMA_VERSION = 3;
const SERVER_CONFIG_CACHE_SCHEMA_VERSION = 1;
const VCS_REFS_CACHE_SCHEMA_VERSION = 1;
​
@@ -30,7 +34,7 @@
schemaVersion: Schema.Literal(THREAD_SNAPSHOT_CACHE_SCHEMA_VERSION),
environmentId: Schema.String,
threadId: Schema.String,
- snapshot: OrchestrationThreadDetailSnapshot,
+ snapshot: Schema.Union([OrchestrationThreadDetailSnapshot, WindowedOrchestrationThread]),
});
const StoredServerConfig = Schema.Struct({