Skip to content

feat(ops): public health probes for uptime monitoring (v5.2.9) - #141

Merged
Ingwalde merged 3 commits into
mainfrom
feat/health-probes
Oct 21, 2026
Merged

Ingwalde merged 3 commits into
mainfrom
feat/health-probes

Conversation

@Ingwalde

Copy link
Copy Markdown
Owner

Adds health endpoints a monitor can actually use.

/health is answered by the SPA with 200 HTML (Caddy sends non-/api paths to nginx), so a monitor there reads as "up" even when the API or DB is down. These reach the backend:

  • GET /api/v1/health — liveness ({"status":"ok"}).
  • GET /api/v1/health/ready — readiness: SELECT 1 + Redis ping → 200 {"status":"ready"} or 503 {"status":"degraded"}. Reports only the overall state (no dependency names, errors or versions), so it is safe to expose. The internal /health/ready keeps its per-dependency detail.
  • nginx /healthz — plain ok from the static site, to monitor the frontend independently of the API.

Readiness logic refactored into one _readiness() helper. Added ops tests and a docs/deploy.md monitoring section. Bump to v5.2.9.

UptimeRobot after deploy: …/api/v1/health/ready (keyword ready) and …/healthz (keyword ok).

🤖 Generated with Claude Code

A monitor pointed at /health gets 200 HTML from the SPA (Caddy routes
non-/api paths to nginx), so it reads as "up" even when the API or
database is down. Add proxy-reachable probes that actually reach the
backend:

- GET /api/v1/health — liveness ({"status":"ok"}).
- GET /api/v1/health/ready — readiness; runs SELECT 1 and a Redis ping,
  returns {"status":"ready"} or 503 {"status":"degraded"}. It reports
  only the overall state, never which dependency failed, so exposing it
  leaks nothing. The internal /health/ready keeps its per-dependency
  detail for the container healthcheck and same-host ops.
- nginx /healthz — a plain "ok" from the static site, so the frontend can
  be monitored independently of the API.

Refactored the readiness logic into one _readiness() helper shared by the
internal and public probes. Added ops tests and a docs/deploy monitoring
section. Bump to v5.2.9.
pip-audit flagged 14 advisories against PyJWT 2.13.0 (the JWT library the
auth tokens rely on); 2.15.0 clears them. Auth/security suites pass on the
new version.
Transitive bumps only (vitest/undici chain); package.json unchanged,
237 frontend tests and the build pass.
@Ingwalde
Ingwalde merged commit dd79a67 into main Oct 21, 2026
10 checks passed
@Ingwalde
Ingwalde deleted the feat/health-probes branch October 21, 2026 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant