feat(web): add /healthz liveness endpoint for e2e + monitoring (BUNYIP-149) #202
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/BUNYIP-149-web-healthz"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Adds an unauthenticated
GET /healthzliveness endpoint to bunyip-web (the SSR hub) and references it from the e2e reachability gate (BUNYIP-149, BUNYIP-148 sub-task).Why
The e2e suite's reachability gate only probed bunyip-api's
/health- it could confirm the OP/API host was up, but not the hub the browser specs actually drive. bunyip-web had no health endpoint for a web-targeted gate or uptime probe.How
bunyip-web/src/handlers/health.rs):GET /healthz->200 {"status":"ok"},application/json. No auth (registered as a public route; the handler never calls the auth guard), no DB - liveness, not readiness. Mirrors bunyip-api's/health.e2e/scripts/health-check.mjs): now probes the API/healthand the hub/healthzbefore the suite runs. The hub probe is soft - it warns on a non-2xx but stays fatal on an unreachable host. PR SHAs never deploy, so on this very PR the live staging hub does not serve/healthzyet; a hard 404 would deadlock the PR introducing it (same deploy-transition shape as BUNYIP-183). Tighten to a hard check once/healthzis deployed everywhere.AC
GET /healthzreturns 200 + minimal body, no auth.Verification
clippy -p bunyip-web --all-targets -D warnings+fmt --all --checkclean;node --checkon the gate script clean. No schema change.🤖 Generated with Claude Code
bunyip-web (the SSR hub) had no health endpoint, so the BUNYIP-148 e2e suite could only confirm the OP/API host was up (bunyip-api /health), never the hub the browser specs actually drive. Add GET /healthz: unauthenticated, no DB, returns 200 `{"status":"ok"}` (liveness, not readiness - mirrors bunyip-api). Registered as a public route before the marketing/auth routes; the handler never calls the auth guard. Wire it into the PR-mode reachability gate (scripts/health-check.mjs): it now probes the API /health AND the hub /healthz before the suite runs. The hub probe is SOFT (warns on a non-2xx, still fatal on an unreachable host): PR SHAs never deploy, so on this very PR the live staging hub does not serve /healthz yet, and a hard 404 would deadlock the PR that introduces it (same deploy-transition shape as BUNYIP-183). Tighten to a hard check once /healthz is deployed everywhere. clippy -p bunyip-web --all-targets -D warnings + fmt --check clean; node --check on the gate script clean. #BUNYIP-149 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>