When the codebase moved to db.ts as the storage adapter with three structurally separated stores, the legacyindexedDbStorage.ts file was converted into a compatibility shim rather than deleted, because callers still depended on it.
The shim re-exports polyglotDb as db and wraps it in a thin class that preserves the old call surface (getChats, saveChat, deleteChat, listConversations, loadConversation). It exists purely to avoid updating callers.
We're getting rid of it because it serves no protocol purpose anymore. The shim's deleteChat calls polyglotDb.deleteResource(id) with one argument, which is the old signature that doesn't write a deletion record, exactly the bug the two-argument atomic deleteResource(id, record) was introduced to fix. Any caller going through the shim is bypassing Invariant 5 and Invariant 6 silently. Keeping it alive means keeping a path open that breaks the protocol every time it's used.
When the codebase moved to
db.tsas the storage adapter with three structurally separated stores, the legacyindexedDbStorage.tsfile was converted into a compatibility shim rather than deleted, because callers still depended on it.The shim re-exports polyglotDb as db and wraps it in a thin class that preserves the old call surface (getChats, saveChat, deleteChat, listConversations, loadConversation). It exists purely to avoid updating callers.
We're getting rid of it because it serves no protocol purpose anymore. The shim's deleteChat calls
polyglotDb.deleteResource(id)with one argument, which is the old signature that doesn't write a deletion record, exactly the bug the two-argument atomicdeleteResource(id, record)was introduced to fix. Any caller going through the shim is bypassing Invariant 5 and Invariant 6 silently. Keeping it alive means keeping a path open that breaks the protocol every time it's used.