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

@ -169,3 +169,47 @@ def test_ingest_fire_row_correlates_from_hypertable_when_last_known_empty(monkey
assert len(correlated) == 1
assert correlated[0][1][0]["id"] == "acf001"
assert correlated[0][0][0]["lat"] == 39.45678
def test_ingest_fire_rows_one_execute_one_commit(monkeypatch):
"""93k FIRMS points must not be 93k commits."""
from ingestor import ingest_fire_rows
class _Session:
def __init__(self):
self.executes = 0
self.commits = 0
self.rowcount = 3
async def execute(self, *a, **k):
self.executes += 1
return self
async def commit(self):
self.commits += 1
async def __aenter__(self):
return self
async def __aexit__(self, *a):
return False
session = _Session()
import ingestor
monkeypatch.setattr(ingestor, "async_session", lambda: session)
msgs = [
make_fire_msg(latitude=39.1 + i * 0.01, longitude=-121.1)
for i in range(3)
]
async def no_corr(*a, **k):
return []
monkeypatch.setattr("fire_aircraft.correlate_and_notify", no_corr)
monkeypatch.setattr("geofence.record_and_notify", no_corr)
inserted = asyncio.run(ingest_fire_rows(msgs))
assert inserted == 3
assert session.executes == 1
assert session.commits == 1