From 3b109689e1f19b4d48ffb7b1196121a2e7a08485 Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Sat, 20 Jun 2026 16:39:06 -0700 Subject: [PATCH] Avoid sensitive persistence paths Co-authored-by: codex --- apps/mobile/src/connection/storage.ts | 17 ----------------- .../src/platform/persistence.test.ts | 3 +-- .../client-runtime/src/platform/persistence.ts | 5 +---- 3 files changed, 2 insertions(+), 23 deletions(-) diff --git a/apps/mobile/src/connection/storage.ts b/apps/mobile/src/connection/storage.ts index 693fdfcfcc..ba894c7d17 100644 --- a/apps/mobile/src/connection/storage.ts +++ b/apps/mobile/src/connection/storage.ts @@ -340,7 +340,6 @@ export const connectionStorageLayer = Layer.effectContext( stage: "read", resource: "shell-cache", environmentId, - path: file.uri, cause, }), }); @@ -352,7 +351,6 @@ export const connectionStorageLayer = Layer.effectContext( stage: "parse", resource: "shell-cache", environmentId, - path: file.uri, cause, }), }); @@ -364,7 +362,6 @@ export const connectionStorageLayer = Layer.effectContext( stage: "decode", resource: "shell-cache", environmentId, - path: file.uri, cause, }), ), @@ -386,7 +383,6 @@ export const connectionStorageLayer = Layer.effectContext( stage: "read", resource: "legacy-shell-cache", environmentId, - path: legacyFile.uri, cause, }), }); @@ -398,7 +394,6 @@ export const connectionStorageLayer = Layer.effectContext( stage: "parse", resource: "legacy-shell-cache", environmentId, - path: legacyFile.uri, cause, }), }); @@ -410,7 +405,6 @@ export const connectionStorageLayer = Layer.effectContext( stage: "decode", resource: "legacy-shell-cache", environmentId, - path: legacyFile.uri, cause, }), ), @@ -435,7 +429,6 @@ export const connectionStorageLayer = Layer.effectContext( stage: "encode", resource: "shell-cache", environmentId, - path: file.uri, cause, }), ), @@ -453,7 +446,6 @@ export const connectionStorageLayer = Layer.effectContext( stage: "write", resource: "shell-cache", environmentId, - path: file.uri, cause, }), }); @@ -473,7 +465,6 @@ export const connectionStorageLayer = Layer.effectContext( resource: "thread-cache", environmentId, threadId, - path: file.uri, cause, }), }); @@ -486,7 +477,6 @@ export const connectionStorageLayer = Layer.effectContext( resource: "thread-cache", environmentId, threadId, - path: file.uri, cause, }), }); @@ -499,7 +489,6 @@ export const connectionStorageLayer = Layer.effectContext( resource: "thread-cache", environmentId, threadId, - path: file.uri, cause, }), ), @@ -525,7 +514,6 @@ export const connectionStorageLayer = Layer.effectContext( resource: "thread-cache", environmentId, threadId: thread.id, - path: file.uri, cause, }), ), @@ -544,7 +532,6 @@ export const connectionStorageLayer = Layer.effectContext( resource: "thread-cache", environmentId, threadId: thread.id, - path: file.uri, cause, }), }); @@ -562,7 +549,6 @@ export const connectionStorageLayer = Layer.effectContext( resource: "thread-cache", environmentId, threadId, - path: file.uri, cause, }), }); @@ -580,7 +566,6 @@ export const connectionStorageLayer = Layer.effectContext( stage: "remove", resource: "shell-cache", environmentId, - path: file.uri, cause, }), }); @@ -595,7 +580,6 @@ export const connectionStorageLayer = Layer.effectContext( stage: "remove", resource: "legacy-shell-cache", environmentId, - path: legacyFile.uri, cause, }), }); @@ -613,7 +597,6 @@ export const connectionStorageLayer = Layer.effectContext( stage: "remove", resource: "thread-cache", environmentId, - path: threadDirectory.uri, cause, }), }); diff --git a/packages/client-runtime/src/platform/persistence.test.ts b/packages/client-runtime/src/platform/persistence.test.ts index 37cf289c34..1485eab1f3 100644 --- a/packages/client-runtime/src/platform/persistence.test.ts +++ b/packages/client-runtime/src/platform/persistence.test.ts @@ -17,13 +17,12 @@ describe("ConnectionPersistenceError", () => { resource: "thread-cache", environmentId: EnvironmentId.make("environment-1"), threadId: ThreadId.make("thread-1"), - path: "file:///cache/thread-1.json", cause, }); expect(error.cause).toBe(cause); expect(error.message).toBe( - "Could not load thread: thread cache decode failed for environment environment-1 and thread thread-1 at file:///cache/thread-1.json.", + "Could not load thread: thread cache decode failed for environment environment-1 and thread thread-1.", ); expect(error.message).not.toContain(cause.message); }); diff --git a/packages/client-runtime/src/platform/persistence.ts b/packages/client-runtime/src/platform/persistence.ts index 3020fc68d8..3f4ce292ba 100644 --- a/packages/client-runtime/src/platform/persistence.ts +++ b/packages/client-runtime/src/platform/persistence.ts @@ -51,7 +51,6 @@ export class ConnectionPersistenceError extends Schema.TaggedErrorClass