From a72ae2549a2de657897f0d5206eb93ed046763fa Mon Sep 17 00:00:00 2001 From: mptyl Date: Thu, 13 Aug 2026 21:06:32 +0200 Subject: [PATCH] fix: ping the active workspace runtime for /health/dwh instead of the legacy config --- backend/src/app.ts | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/backend/src/app.ts b/backend/src/app.ts index 003a2626..25e4ff51 100644 --- a/backend/src/app.ts +++ b/backend/src/app.ts @@ -117,7 +117,20 @@ export function buildApp(config: AppConfig, deps?: BuildAppDeps): FastifyInstanc return authenticate(req, reply); }); app.get("/health", async () => ({ status: "ok" })); - app.get("/health/dwh", async () => tht.dbPing()); + app.get("/health/dwh", async () => { + // In the registry system there is no single legacy DWH config: ping the first active + // workspace's rendered runtime config. If the registry is not bootstrapped yet, do not + // block the app — per-workspace diagnostics and the session precheck own reachability. + try { + const revisions = await workspaceRegistry.list(); + if (revisions.length > 0) { + return await tht.dbPing(revisions[0].snapshotPath); + } + } catch { + // fall through + } + return { ok: true, detail: "workspace diagnostics own DWH reachability" }; + }); app.get("/me", async (req) => getPrincipal(req)); sessionRoutes(app, { mgr, tht: tht as ThtRunner, hub, getSettings, readiness, listModels, workspaceRegistry,