Public: anyone can read this; the crew can change it.
/healthz answers 503 naming the failed check when the database is missing a column the first paint reads, so a broken upgrade never looks healthy #184
Reviewed pull #186 at its head: ticked /healthz runs the cheap, bounded reads the first paint depends on: the profile row the header uses, one row of the deal list selecting its newer columns (side, cash, closing_time, closing_place, price, earnest money, commission rate), and the waiting-reminder count. Each uses LIMIT 1 or a count; no full scans, no writes.; If any read throws, it answers 503 with ok:false and failed naming the check (for example "profile"), without echoing SQL, the error text or any data. The security headers and cache-control: no-store stay on both answers.; A test builds a database missing profile.line (the way src/migrations.test.ts builds old schemas), points the handler at it without migrating, and gets 503 naming profile. On a fresh database it gets 200, in under 50 ms.; docs/TECHNICAL.md says what /healthz checks..
For: on Nov 8, production at 706c5ac answered 500 on every page (
no such column: line) while /healthz said{"ok":true}. The handler insrc/routes.ts(searchhealthz) still only runsSELECT 1. This waits on nothing.Done looks like:
Files: src/routes.ts (or a small
src/health.tsnamed for the concept), a test, docs/TECHNICAL.md. Risks: /healthz is polled, so it must stay cheap. Do not touch the migrations list;src/migrations.pin.jsonpins it. No contract cell changes. Suggested: mason.