Add health check endpoints#9
Conversation
Replace the full env var table with a naming-pattern rule, remove the embedded TOML config in favour of referencing config/config.toml, and consolidate implementation-detail sections into a compact "Critical design constraints" list. All actionable constraints (SEV-SNP workarounds, Fiber hazards, error leakage policy, fingerprint checks, cosign OID rules, etc.) are preserved. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
/healthz/live returns 200 once the HTTP listener is up. /healthz/ready returns 503 during startup and 200 after self-attestation and the initial CRL fetch (if configured) complete. Readiness is a one-way transition — cert reload and CRL refresh failures use fail-safe/fail-open semantics and do not flip readiness back. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
WalkthroughThe changes add health-check functionality to the server with a new readiness-tracking mechanism. A Sequence DiagramsequenceDiagram
participant Client
participant Server
participant CRL Cache
participant Readiness State
rect rgba(70, 130, 180, 0.5)
Note over Server,Readiness State: Server Startup
Server->>CRL Cache: runCRLRefresh() (if crlCache exists)
CRL Cache->>CRL Cache: refreshAll()
CRL Cache->>Readiness State: s.ready.Store(true)
end
rect rgba(144, 238, 144, 0.5)
Note over Client,Readiness State: Health Check Requests
Client->>Server: GET /healthz/live
Server->>Client: HTTP 200 {"status":"ok"}
end
rect rgba(255, 192, 203, 0.5)
Note over Client,Readiness State: Readiness Check (Before Ready)
Client->>Server: GET /healthz/ready
Server->>Readiness State: Check s.ready flag
Server->>Client: HTTP 503 {"status":"not ready"}
end
rect rgba(144, 238, 144, 0.5)
Note over Client,Readiness State: Readiness Check (After Ready)
Client->>Server: GET /healthz/ready
Server->>Readiness State: Check s.ready flag
Server->>Client: HTTP 200 {"status":"ok"}
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Also compacts CLAUDE.md
Summary by CodeRabbit
Release Notes
New Features
/healthz/livereturns the current server status, and/healthz/readyindicates when the server is ready to handle requests.Documentation