feat(backend): add /api/v1/ping liveness endpoint #634

Merged
bot-reviewer merged 1 commit from feat/633-ping-endpoint into main 2026-05-29 15:53:30 +00:00
Collaborator

Summary

  • Add GET /api/v1/ping returning {"pong": true} (noop liveness probe)
  • Register ping.router in main.py under /api/v1
  • Add /api/v1/ping to _PUBLIC_PATHS so it bypasses RBAC like /health (public liveness probe; monitoring has no Caddy creds)
  • Add unit test via FastAPI TestClient

Test plan

  • ruff check + ruff format --check on changed files -> pass (local, uv py3.12)
  • pre-commit hooks on commit -> all pass
  • ping endpoint verified in isolation (FastAPI + ping.router, no app.main): GET /api/v1/ping -> 200 {"pong": true}
  • full tests/test_ping.py (imports app.main) -> runs in CI; not run locally (weasyprint/GTK libgobject-2.0-0 missing on Windows dev box, same as tests/test_rbac.py note)

Closes #633

## Summary - Add `GET /api/v1/ping` returning `{"pong": true}` (noop liveness probe) - Register `ping.router` in `main.py` under `/api/v1` - Add `/api/v1/ping` to `_PUBLIC_PATHS` so it bypasses RBAC like `/health` (public liveness probe; monitoring has no Caddy creds) - Add unit test via FastAPI `TestClient` ## Test plan - [x] `ruff check` + `ruff format --check` on changed files -> pass (local, uv py3.12) - [x] pre-commit hooks on commit -> all pass - [x] ping endpoint verified in isolation (FastAPI + ping.router, no app.main): `GET /api/v1/ping` -> 200 `{"pong": true}` - [ ] full `tests/test_ping.py` (imports `app.main`) -> runs in CI; not run locally (weasyprint/GTK `libgobject-2.0-0` missing on Windows dev box, same as tests/test_rbac.py note) Closes #633
bot-backend added 1 commit 2026-05-28 21:29:03 +00:00
Noop liveness probe returning {"pong": true}. Registered as a public
path (no Caddy/RBAC auth) like /health so external monitoring can reach
it. Adds unit test via FastAPI TestClient.

Closes #633
bot-reviewer approved these changes 2026-05-29 15:51:09 +00:00
bot-reviewer left a comment
Collaborator

Trivial liveness endpoint. Clean: new router registered, /api/v1/ping added to _PUBLIC_PATHS (auth bypass correct for liveness), test present, conventions match. No data exposure, vault anti-regression clean. APPROVE + merge.

<!-- gendesign-review-bot: sha=dc8f3f2 verdict=approve --> Trivial liveness endpoint. Clean: new router registered, /api/v1/ping added to _PUBLIC_PATHS (auth bypass correct for liveness), test present, conventions match. No data exposure, vault anti-regression clean. APPROVE + merge.
bot-reviewer merged commit aa8ca9bcfc into main 2026-05-29 15:53:30 +00:00
bot-reviewer deleted branch feat/633-ping-endpoint 2026-05-29 15:53:30 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lekss361/gendesign#634
No description provided.