seam(api): wire OSRM reachability into /healthz and /metrics #102
No reviewers
Labels
No labels
in-progress
in-review
ready-for-agent
seam-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
patrick/Polaris!102
Loading…
Reference in a new issue
No description provided.
Delete branch "seam/wire-osrm-health-metrics"
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?
Description
Resolves seam request #89: wires OSRM reachability (
polaris.core.health.check_osrm(), shippedby PH6.1/#42) into
GET /healthzand/metrics, which #42 could not touch itself — neitherfile was in its owned paths.
What changed
api/routers/platform/health.py:CheckStatuswidens fromLiteral["green", "red"]toLiteral["green", "yellow", "red"].checks.osrmreportsgreen/yellowfromcheck_osrm();overallis the worst check by severity, so OSRM down alone reachesyellow(200, not 503 — the engine'''s haversine fallback means this isn'''t an outage) while
dbdownstill forces
red/503 (no fallback exists for the database).api/metrics.py:polaris_osrm_reachablegauge (1/0), same live-probe-per-scrape style asthe existing task/solver gauges.
still outranks osrm-yellow.
Test Plan
Full backend suite green: 682 unit + 9 integration tests,
ruff/ruff format --check/mypy --strictall clean.Checklist
polaris.domainNote
Keycloak JWKS reachability has the identical shape of problem per #89'''s own notes, but is left
for a follow-up — out of scope for what was actually blocking #42.
Closes #89
🤖 Generated with Claude Code
https://claude.ai/code/session_01LoNrSy7Reyp7evkfcdHeLX