Add dependency-aware health, operator detail and redacted telemetry (F07, #12) #54
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
primatekuntech/rag-rust!54
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/12-health-telemetry"
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?
Refs #12 (F07).
What this adds
/health/liveis unchanged./health/readyreturns onlystatusand one of four reason codes:ready,starting,draining,dependency_unavailable. Postgres is the only registered dependency today.GET /admin/health/detail, behind the existing administrator check (401 without a session, 403 for non-administrators or a stale re-authentication,no-store). It shows per-dependency status and latency.x-request-idand is the same ID used for audit correlation. Logs carry the route template, never the raw path, query, cookies, headers, body or a client-supplied method. APhaseTimeris the interface for later phase timing.drainingis set first, then a fixed 3 s grace before the pool refuses work, so probes can see503 draining.docs/operations/health.md.Not in this PR
Enforcer::resource/search_scopedecision rows carry a per-call id while their failure rows carry the request id. No route calls them yet; R02 must reconcile this.Verification
cargo fmt --check,cargo clippy --workspace --all-targets --locked -- -D warnings: clean.cargo test --workspace --locked: 191 passed, 0 failed.bash scripts/test-postgres.sh --local: 234 passed, 0 failed (includes real database loss/recovery viaALLOW_CONNECTIONS+pg_terminate_backend, draining, stale administrator). One run hit the known flakyaudit_postgresconcurrent-append test; it passed 3/3 alone and on re-run.bash scripts/coverage.sh rust= 93.61% total lines (minimum 80%);health.rs95.61%,telemetry.rs94.64%.🤖 Generated with Claude Code