fix(auth): address Task 13 deployment review findings

This commit is contained in:
2026-08-17 21:31:25 +02:00
parent 9558eaa508
commit 7e52df2702
22 changed files with 1279 additions and 82 deletions
+12
View File
@@ -0,0 +1,12 @@
const STARTUP_CAUSES = new Set([
"auth_config_invalid",
"auth_session_store_invalid",
"workspace_registry_invalid",
]);
/** Return one bounded machine cause; never include the original error text or stack. */
export function formatStartupFailure(error: unknown): string {
const message = error instanceof Error ? error.message : "";
const cause = STARTUP_CAUSES.has(message) ? message : "startup_unknown";
return `backend startup failed: ${cause}`;
}