diff --git a/packages/app/src/runtime/replica-cache/index.test.ts b/packages/app/src/runtime/replica-cache/index.test.ts index f97b63ef7..8149032f3 100644 --- a/packages/app/src/runtime/replica-cache/index.test.ts +++ b/packages/app/src/runtime/replica-cache/index.test.ts @@ -25,10 +25,6 @@ class MemoryStorage implements ReplicaCacheStorage { this.writes += 1; this.values.set(key, value); } - - async removeItem(key: string): Promise { - this.values.delete(key); - } } function workspace( @@ -230,38 +226,6 @@ describe("ReplicaCache", () => { }); }); - it("clears a cache containing a timeline row that fails its schema", async () => { - const storage = new MemoryStorage(); - const writer = new ReplicaCache(storage); - writer.setHosts([SERVER_ID]); - seedSession(); - await writer.flush(); - - const payload = JSON.parse(storage.values.get("@paseo:replica-cache") ?? "null") as { - hosts: Array<{ timeline: { items: unknown[] } | null }>; - }; - const timeline = payload.hosts[0]?.timeline; - if (!timeline) throw new Error("Expected cached timeline"); - timeline.items = [ - { - kind: "todo_list", - id: "legacy-todo", - timestamp: { __paseoDate: "2026-08-11T08:02:00.000Z" }, - provider: "codex", - items: [{ text: "Ship it", completed: false }], - }, - ]; - storage.values.set("@paseo:replica-cache", JSON.stringify(payload)); - useSessionStore.getState().clearSession(SERVER_ID); - - const reader = new ReplicaCache(storage); - reader.setHosts([SERVER_ID]); - await reader.restore(); - - expect(storage.values.has("@paseo:replica-cache")).toBe(false); - expect(useSessionStore.getState().sessions[SERVER_ID]).toBeUndefined(); - }); - it("persists only the focused agent view with a short timeline tail", async () => { const storage = new MemoryStorage(); const cache = new ReplicaCache(storage);