Repository navigation
[Bug] workspace.json with a non-array sessionIds breaks the whole workspace domain and cascades into unrelated services #11612
Environment
SummaryA single malformed record in Steps to reproduce
ActualStartup log: Frontend — clicking "select workspace directory" shows: The workspace list is empty and all conversations appear to be gone (they are still on disk). Expected
Root cause analysisTwo independent layers contribute:
Suggested fixes
LogsNotes
|
Replies: 1 comment 1 reply
|
Confirmed. The cascade is one mechanism, not a second bug.
"All conversations are gone" is not data loss: the sessions are on disk and the workspace table never opened, so no list RPC can answer. Recovery is to fix the record (make One caution for the fix: Version: the schema and |
Confirmed. The cascade is one mechanism, not a second bug.
packages/workspace/workspace/src/spec.ts:29declaressessionIds: z.array(sessionId). The durability boundary parses records throughparseRecord(packages/storage/storage-domain/src/index.ts:200-209), which throwsDomainError('invalid-record', ...)and has no skip path. So one string-valued record fails theworkspacedomain's open, every service that waits on that domain stayspending, and the client reports whichever downstream call it hit first —directoryPicker/listin your case."All conversations are gone" is not data loss: the sessions are on disk and the workspace table never opened, so no list RPC can answer.
Recovery is to…