fix: address remaining Cubic review comments (P2 issues)
- Add content-based fallback matching for todos without ids - Add TODO comment for exported but unused SDK functions - Add resetStorageClient() for test isolation - Fixes todo duplication risk on beta (SQLite backend)
This commit is contained in:
@@ -475,6 +475,10 @@ describe("session-manager storage - SDK path (beta mode)", () => {
|
||||
resetSqliteBackendCache: () => {},
|
||||
}))
|
||||
|
||||
// Reset client to ensure "client not set" case is exercised
|
||||
const { resetStorageClient } = await import("./storage")
|
||||
resetStorageClient()
|
||||
|
||||
// Re-import without setting client
|
||||
const { readSessionMessages } = await import("./storage")
|
||||
|
||||
|
||||
@@ -17,6 +17,10 @@ export function setStorageClient(client: PluginInput["client"]): void {
|
||||
sdkClient = client
|
||||
}
|
||||
|
||||
export function resetStorageClient(): void {
|
||||
sdkClient = null
|
||||
}
|
||||
|
||||
export async function getMainSessions(options: GetMainSessionsOptions): Promise<SessionMetadata[]> {
|
||||
// Beta mode: use SDK
|
||||
if (isSqliteBackend() && sdkClient) {
|
||||
|
||||
Reference in New Issue
Block a user