Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions loopx/control_plane/coordination/sqlite_authority_store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,12 @@ export function sqliteAuthorityPath(directory: string, goalId: string): string {
function protocol(message: string): never { throw new AuthorityStoreProtocolError(message); }

function readFailure(error: unknown): AuthorityStoreReadFailure {
return error instanceof AuthorityStoreProtocolError || error instanceof SyntaxError
? {status: "failed", reason_code: "provider_protocol_violation", reason: error.message}
: {status: "unavailable", reason_code: "provider_read_unavailable",
reason: "SQLite authority store could not be read; check database availability and lock contention"};
if (error instanceof AuthorityStoreProtocolError || error instanceof SyntaxError) {
return {status: "failed", reason_code: "provider_protocol_violation", reason: error.message};
}
// For other errors, include the original error message if available
const reason = error instanceof Error ? error.message : "SQLite authority store could not be read; check database availability and lock contention";
return {status: "unavailable", reason_code: "provider_read_unavailable", reason};
}

function fileBytes(path: string): number {
Expand Down
Loading