AEROSIM-TS-15
Implement Singularity liveness and readiness routes
The API exposes non-sensitive typed liveness and readiness endpoints suitable for Gondor probes.
- Verified flow state
- Done
- Owner
- AeroSim Architecture and Delivery
- Feature
- AEROSIM-FT-42
- Component
- API Service — Health service
- Repository
- corp-v1-aerosim/corp-v1-aerosim
Delivery scope
Add GET /health/live for process liveness and GET /health/ready for dependency readiness, with fixed response schemas and a ReadinessCheck interface that reports the database check without exposing connection strings. Primary files: applications/api/src/routes/health.ts, applications/api/src/services/readiness.ts, applications/api/tests/health-routes.test.ts.
Implementation contract
Implementation artifacts
- applications/api/src/routes/health.ts
- applications/api/src/services/readiness.ts
- applications/api/tests/health-routes.test.ts
Inputs
- GET request to /health/live or /health/ready
- ReadinessCheck result {database: up|down, checkedAt}
Outputs
- 200 HealthResponse {status:"ok"} from /health/live
- 200 ReadinessResponse {status:"ready"} or 503 {status:"not-ready", dependencies:{database:"down"}}
Failure boundaries
- Return 503 when the database readiness check times out or throws; liveness remains 200 while the process event loop responds.
- Never include DATABASE_URL, exception stacks, SQL text, or credentials in either health payload.
Excluded scope
- Kubernetes probe manifests and external monitoring alerts are owned by FT52-T2 and operations work.
Verification steps
- pnpm --filter @aerosim/api test -- health-routes.test.ts
- Inject a timed-out ReadinessCheck; assert /health/ready=503, /health/live=200, and serialized bodies contain no postgres URL.
Traceability
Dependencies
- AEROSIM-TS-14Canonical ID: TASK-0014
UI/UX applicability
non_visual
This Task owns technical or behavioral acceptance and does not claim direct visual conformance to the approved UI/UX package.
Acceptance evidence
Verified delivery: application PR #13 reviewed head 6c4882f49852a4728e8603186762828eb5c15f43, exact-head validation task 1741 succeeded, merged as 58d33ffbd3ca21ffdc5882a75de8fe71c25188b6; integrated Gitea Actions publish task 1742 and validate task 1743 succeeded. Release completion verified on product 1.0.0.0 at GitOps revision 5d3712d89dfbf7dacd993348e55f497d126c7bf9 with Argo Synced/Healthy, exact image digests, authenticated API/database access, and three-world configured-flight acceptance.
Current evidence boundary
No current implementation, acceptance, release, or deployment evidence is claimed for this planned Task. Any prior implementation may be used only as prototype and discovery evidence.