fix: pipeline reliability — WS, summarizer, ingest, health

Stop the live HUD reconnect storm (nginx WS snippet + backoff), copy
intel/nous_client into the summarizer image, and make event ingest
idempotent on URL. GDELT uses the DOC API; NWS no longer sends bbox;
FIRMS is one ON CONFLICT batch; GET /api/aircraft serves last-known.
Health reports freshness without 503ing docker. EONET + CISA KEV added.
This commit is contained in:
Sirius DevOps 2026-08-28 21:49:05 -04:00
commit d81ea68dec
26 changed files with 1164 additions and 110 deletions

View file

@ -0,0 +1,33 @@
"""Liveness stays up; readiness/freshness is explicit."""
from __future__ import annotations
import asyncio
import httpx
from main import app
BASE = "http://test"
async def _get(path: str) -> httpx.Response:
transport = httpx.ASGITransport(app=app)
async with httpx.AsyncClient(transport=transport, base_url=BASE) as client:
return await client.get(path)
def test_health_includes_checks_even_when_db_ok(monkeypatch):
"""HUD must be able to show degraded without docker killing the container."""
body = asyncio.run(_get("/api/health")).json()
assert "status" in body
assert "checks" in body
assert "db" in body["checks"]
def test_ready_endpoint_exists():
resp = asyncio.run(_get("/api/ready"))
assert resp.status_code in (200, 503)
body = resp.json()
assert "checks" in body
assert "status" in body