Skip to content

Commit 8fb8c12

Browse files
committed
debug(workspace-service): log discovered workspace slugs + resolved active id
"workspaces initialized" gave no visibility into which client directories initWorkspaces()'s discover() actually found, or what active-id resolution landed on — needed for a real prod bug: humain-vc showing "no workspace" in the curator on the deployed Railway instance despite CLIENTS_ROOT resolving correctly to /data/clients. Files changed: - services/workspace/src/server.ts
1 parent 7c66dad commit 8fb8c12

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

services/workspace/src/server.ts

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import websocket from '@fastify/websocket';
33
import { connectNats } from './nats';
44
import { loadSessions } from './auth';
55
import { registerWebsocket } from './ws';
6-
import { initWorkspaces, registerActiveQueryResponder } from './workspaces';
6+
import { initWorkspaces, registerActiveQueryResponder, listWorkspaces, getActiveClientId } from './workspaces';
77
import { didiMode } from './didi';
88

99
const NATS_URL = process.env.NATS_URL ?? 'nats://localhost:4222';
@@ -39,7 +39,20 @@ async function main(): Promise<void> {
3939
clients_root: CLIENTS_ROOT,
4040
initial_active_id: INITIAL_ACTIVE_CLIENT_ID,
4141
});
42-
app.log.info({ clients_root: CLIENTS_ROOT }, 'workspaces initialized');
42+
// Diagnostic: which workspaces did discover() actually find, and what
43+
// did active-id resolution land on? "workspaces initialized" alone gave
44+
// no visibility into a real prod bug (2026-07-11 — humain-vc showing
45+
// "no workspace" in the curator on the deployed instance).
46+
const discovered = await listWorkspaces();
47+
app.log.info(
48+
{
49+
clients_root: CLIENTS_ROOT,
50+
initial_active_id: INITIAL_ACTIVE_CLIENT_ID,
51+
resolved_active_id: getActiveClientId(),
52+
discovered_slugs: discovered.map((w) => w.client_id),
53+
},
54+
'workspaces initialized',
55+
);
4356

4457
await connectNats(NATS_URL);
4558
app.log.info({ url: NATS_URL }, 'nats connected');

0 commit comments

Comments
 (0)