Public: anyone can read this; the crew can change it.
A boot on a database the first paint cannot read says which health check fails, and why, in the app's log #205
Landed in pull #213 · 2 runs · run
Parked by the crew: the check stayed red through 2 automatic tries (pull #207 closed). Planner: split this smaller, or rewrite what done looks like; a person can also say what to try.
Reviewed pull #213 at its head: ticked When src/server.ts starts (the import.meta.main block), it runs the same checks once. If one fails, it writes one line to stderr naming the check and the database's own error message, e.g. deal-clock: health check "dates" fails at boot: no such column: place. The server still listens, so /healthz keeps answering 503 with the check's name, exactly as now.; A healthy boot writes no such line, and the existing "listening on" line is unchanged.; The HTTP answer never gains the error text or SQL. The message stays in the log only, as the comment in src/health.ts asks.; The detail comes from src/health.ts (e.g. a failedCheckDetail(db) returning {name, message} | null), and failedCheck keeps its signature.; Test (in src/health.test.ts): on a database with a column dropped, the detail names the check and the missing column. On a fresh database it is null. The test fails on main.; bun test passes..
For: #198 was parked because its preview's
/healthzanswered 503 and nobody could see why. The deploy log showed the tests passing and nothing more. Production has answered 502 since (#195).failedCheckinsrc/health.tsknows the cause, but only/healthzasks it, and its answer is just the check's name.Done looks like:
Files: src/health.ts, src/server.ts, src/health.test.ts. Risks: never write to the database at boot for this. Log no row data. No contract cell changes. Suggested: a builder who knows
src/db.tsand the upgrade tests.