From 382836243f12daa0702c8a86348237b8db6cb653 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 8 May 2026 09:02:44 +0000 Subject: [PATCH] chore(dev): expose mana-auth stderr via pnpm logs:auth Tee dev:auth stdout+stderr to services/mana-auth/dev.log and add a logs:auth script (tail -f) so a developer can isolate auth output without hunting through concurrently's multiplexed stream. Follow-up to the 2026-04-23 incident where a missing DB column caused mana-auth to return misleading 401s while the real Postgres error was buried in concurrently-managed stderr. The HTTP layer fix (error- classification + passkey end-to-end) deferred this dev-ergonomics improvement explicitly. https://claude.ai/code/session_01CDNt5FiUtXt5FYdFmpVyU6 --- docs/LOCAL_DEVELOPMENT.md | 10 ++++++++++ package.json | 3 ++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/LOCAL_DEVELOPMENT.md b/docs/LOCAL_DEVELOPMENT.md index dd16b4ad7..21259fb5f 100644 --- a/docs/LOCAL_DEVELOPMENT.md +++ b/docs/LOCAL_DEVELOPMENT.md @@ -292,6 +292,16 @@ If you see `./server: No such file or directory`: pnpm dev:sync:build ``` +### Tailing mana-auth logs + +When mana-auth runs inside a `dev:*:full` command its output is multiplexed with other services by `concurrently`. To see auth stderr in isolation, open a second terminal and run: + +```bash +pnpm logs:auth +``` + +The `dev:auth` script tees stdout+stderr to `services/mana-auth/dev.log` (gitignored), and `logs:auth` tails that file. + ### Port already in use If auth (port 3001) or sync (port 3050) is already running: diff --git a/package.json b/package.json index 422cccc76..fbafc3be8 100644 --- a/package.json +++ b/package.json @@ -76,7 +76,8 @@ "dev:chat:web": "pnpm --filter @chat/web dev", "dev:chat:landing": "pnpm --filter @chat/landing dev", "dev:chat:app": "concurrently -n api,web -c yellow,cyan \"pnpm dev:api\" \"pnpm dev:chat:web\"", - "dev:auth": "cd services/mana-auth && bun run --watch src/index.ts", + "dev:auth": "cd services/mana-auth && bun run --watch src/index.ts 2>&1 | tee dev.log", + "logs:auth": "tail -f services/mana-auth/dev.log", "dev:events": "cd services/mana-events && bun run --watch src/index.ts", "dev:analytics": "cd services/mana-analytics && bun run --watch src/index.ts", "dev:sync": "cd services/mana-sync && JWKS_URL=http://localhost:3001/api/auth/jwks DATABASE_URL=postgresql://mana:devpassword@localhost:5432/mana_sync ./server",