From 834de600dfae479bd860510c27ff74ff0f5027fe Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 29 Mar 2026 16:50:42 +0000 Subject: [PATCH 1/2] Initial plan From 42d93e7f84dd037d499c9d0213f73a335053e1ed Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 29 Mar 2026 16:52:55 +0000 Subject: [PATCH 2/2] feat: add /health and /healthz root-level endpoints for Kubernetes probes Agent-Logs-Url: https://github.com/christianlouis/dmarq/sessions/74214dce-9171-424f-bafb-ee7032870801 Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com> --- backend/app/main.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/backend/app/main.py b/backend/app/main.py index 169e51a..76ebefe 100644 --- a/backend/app/main.py +++ b/backend/app/main.py @@ -244,6 +244,13 @@ async def upload_page(request: Request): return templates.TemplateResponse("upload.html", {"request": request}) +@app.get("/health", status_code=200, tags=["health"]) +@app.get("/healthz", status_code=200, tags=["health"], include_in_schema=False) +async def health(): + """Root-level health check endpoint for Kubernetes liveness/readiness probes.""" + return {"status": "ok", "service": "dmarq"} + + # API endpoint to manually trigger IMAP polling @app.post("/api/v1/admin/trigger-poll") async def trigger_imap_poll(auth: dict = Depends(require_admin_auth)):