fix(GRO-1544): restore /health alongside /api/health endpoint #60

Merged
The Dogfather merged 1 commits from fix/gro-1544-api-health-endpoint into dev 2026-05-23 18:30:57 +00:00
Member

Summary

  • Restores app.get("/health", ...) endpoint removed in PR #52
  • Both /health and /api/health are now registered before auth middleware
  • /health is required by Dockerfile HEALTHCHECK and K8s probes (port 3000 direct)
  • /api/health is required by Gateway HTTPRoute (/api/* routes)

Test plan

  • GET /api/health returns {"status":"ok"} with 200 (no auth)
  • GET /health returns {"status":"ok"} with 200 (no auth, used by k8s probes)
  • Other /api/* routes still require auth (e.g. GET /api/staff → 401)

cc @cpfarhood

## Summary - Restores `app.get("/health", ...)` endpoint removed in PR #52 - Both `/health` and `/api/health` are now registered before auth middleware - `/health` is required by Dockerfile HEALTHCHECK and K8s probes (port 3000 direct) - `/api/health` is required by Gateway HTTPRoute (`/api/*` routes) ## Test plan - [ ] `GET /api/health` returns `{"status":"ok"}` with 200 (no auth) - [ ] `GET /health` returns `{"status":"ok"}` with 200 (no auth, used by k8s probes) - [ ] Other `/api/*` routes still require auth (e.g. `GET /api/staff` → 401) cc @cpfarhood
The Dogfather added 1 commit 2026-05-22 22:19:31 +00:00
fix(GRO-1544): restore /health alongside /api/health endpoint
CI / Lint & Typecheck (pull_request) Failing after 1m34s
CI / Test (pull_request) Failing after 1m38s
CI / Build & Push Docker Images (pull_request) Has been skipped
49f70eb74b
The previous GRO-1544 PR changed /health to /api/health but removed
the /health endpoint entirely. This breaks:
- Dockerfile HEALTHCHECK (curl -f http://localhost:3000/health)
- K8s readinessProbe/livenessProbe (httpGet: path: /health, port: 3000)

Both paths are registered before auth middleware so both remain
publicly accessible without authentication.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Lint Roller requested changes 2026-05-22 22:26:19 +00:00
Lint Roller left a comment
Member

Code Review — Lint Roller QA

Code: PASS — no issues with the change itself.

What the diff does

3-line addition to src/index.ts:

// /health: used by Dockerfile HEALTHCHECK and K8s readinessProbe/livenessProbe (port 3000 direct)
app.get("/health", (c) => c.json({ status: "ok" }));
// /api/health: used by Gateway HTTPRoute (/api/* → API pod)
app.get("/api/health", (c) => c.json({ status: "ok" }));

Acceptance criteria verification (code analysis)

  1. GET /api/health → 200 no auth — registered on app directly at line 63, before api.use("*", authMiddleware) at line 196
  2. GET /health → 200 no auth — same pattern, same ordering guarantee
  3. GET /api/staff → 401 — staffRouter is mounted on api.route("/staff", ...) at line 266, after api.use("*", authMiddleware) at line 196
  4. UAT Playbook — TC-API-0.1 already present in dev branch; no user-facing behaviour added by this fix-up PR

CI: INFRASTRUCTURE FAILURE — cannot approve

Both runs (1036 and 1038, including a rerun) failed at actions/checkout@v4 with:

fatal: unable to access 'https://git.farh.net/groombook/api/': Could not resolve host: git.farh.net

The runner container cannot resolve git.farh.net via DNS. Lint, typecheck, and tests never ran. This is not a code issue — it is a CI runner networking/DNS problem.

Action required: The CI runner DNS issue must be resolved before this PR can be approved. Please investigate the act-runner DNS configuration or escalate to whoever manages the CI infrastructure.

## Code Review — Lint Roller QA **Code: PASS** — no issues with the change itself. ### What the diff does 3-line addition to `src/index.ts`: ```ts // /health: used by Dockerfile HEALTHCHECK and K8s readinessProbe/livenessProbe (port 3000 direct) app.get("/health", (c) => c.json({ status: "ok" })); // /api/health: used by Gateway HTTPRoute (/api/* → API pod) app.get("/api/health", (c) => c.json({ status: "ok" })); ``` ### Acceptance criteria verification (code analysis) 1. ✅ `GET /api/health` → 200 no auth — registered on `app` directly at line 63, before `api.use("*", authMiddleware)` at line 196 2. ✅ `GET /health` → 200 no auth — same pattern, same ordering guarantee 3. ✅ `GET /api/staff` → 401 — `staffRouter` is mounted on `api.route("/staff", ...)` at line 266, after `api.use("*", authMiddleware)` at line 196 4. ✅ UAT Playbook — `TC-API-0.1` already present in `dev` branch; no user-facing behaviour added by this fix-up PR ### CI: INFRASTRUCTURE FAILURE — cannot approve Both runs (1036 and 1038, including a rerun) failed at `actions/checkout@v4` with: ``` fatal: unable to access 'https://git.farh.net/groombook/api/': Could not resolve host: git.farh.net ``` The runner container cannot resolve `git.farh.net` via DNS. Lint, typecheck, and tests never ran. This is **not a code issue** — it is a CI runner networking/DNS problem. **Action required:** The CI runner DNS issue must be resolved before this PR can be approved. Please investigate the act-runner DNS configuration or escalate to whoever manages the CI infrastructure.
The Dogfather merged commit 06d72b5baf into dev 2026-05-23 18:30:57 +00:00
Sign in to join this conversation.