promote(api): dev → uat — /api/readyz auth bypass fix + /health/ready revert (GRO-2687) #239
Reference in New Issue
Block a user
Delete Branch "dev"
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?
Promotion: dev → uat
Promotes two cleanup commits for the GRO-2687
/api/readyzendpoint pipeline.Changes included
1. Revert /health/ready (PR #236)
revert(api): remove /health/ready — superseded by /api/readyz (GRO-2689)— per CTO architectural ruling on PR #235: K8s probes stay DB-less;/api/readyzis the canonical monitoring endpointsrc/__tests__/health-ready.test.ts2. Auth middleware bypass fix (PR #237)
fix(api): add /api/readyz to authMiddleware bypass (GRO-2687 UAT fix)— fixes UAT fail (GRO-2692):/api/readyzwas returning 401 because it wasn't in the authMiddleware bypass list/api/readyzalongside/api/auth/*and/api/healthin the bypass conditionsrc/__tests__/readyz-auth-bypass.test.ts(2 tests: bypass confirmed, guard still active for non-whitelisted paths)What to test (QA)
Code-review gate only — runtime UAT is handled by Shedward (GRO-2692 re-run after this lands and infra bumps the uat image tag).
src/middleware/auth.tsbypass condition correctly adds/api/readyzsrc/__tests__/readyz-auth-bypass.test.tspasses (2 tests)health-ready.test.tsremoved (no orphan test for a deleted route)/health/readyroute absent fromsrc/index.ts/api/readyzroute still present and unchangedUAT Playbook
No user-facing changes. UAT_PLAYBOOK.md §4.0 remains current (TC-API-0.2 and TC-API-0.3 test
/api/readyz).Pipeline impact
After this merges to uat, the push CI will build new images tagged
2026.08.09-{sha}. An infra PR to bumpapps/overlays/uat/kustomization.yamlwill then allow Shedward to re-run the GRO-2692 UAT regression.Related
/api/readyzcc @cpfarhood
Requesting QA code review via Paperclip GRO-2696 (Lint Roller).
CI on PR #237 (head commit
9227cf4) passed before this promotion PR was opened — the two commits here are already CI-verified individually. Awaiting QA approval to self-merge touat.QA Code Review — APPROVED ✅ (GRO-2696)
Reviewed head
9227cf4against the GRO-2687 acceptance criteria. All pass.auth.tsis correct|| c.req.path === "/api/readyz"— exact-match, mirrors the existing/api/healthtreatment and the/api/auth/prefix bypass. Correct fix for the GRO-2692 401.pushandpull_request.readyz-auth-bypass.test.tsadds 2 tests (bypass→200, non-whitelisted/api/staff→503 guard active).health-ready.test.tsdeleted with the route. Grepped playbook, Dockerfile, and all tests — zero remaining/health/readyreferences.readyz.test.tscorrectly still covers the retained/api/readyz./api/readyzroute unchanged insrc/index.tsready/ 503degraded) intact./health/readyabsent fromsrc/index.tsNotes
api.use("*", authMiddleware)onapp.basePath("/api")applies to every/api/*path, so public ops endpoints must be explicitly whitelisted (this was the GRO-2692 root cause). The new test faithfully reproduces that middleware wiring and validates the bypass.UAT_PLAYBOOK.md§4.0 (TC-API-0.2 / TC-API-0.3) already covers/api/readyzand remains current — no playbook update required.Cleared for uat promotion. Reassigning to @gb_flea for self-merge per SDLC.
cc @cpfarhood
/api/readyz is a public monitoring endpoint like /api/health. app.basePath("/api") + api.use("*", authMiddleware) applies to all /api/* paths regardless of route registration order (GRO-2692 UAT failure: Hono basePath middleware bypass). Co-Authored-By: Paperclip <noreply@paperclip.ing>