Updates to intel and correlation

This commit is contained in:
Logan
2026-04-23 01:26:41 -04:00
parent bcd3406ae8
commit 317f9d2a9d
12 changed files with 468 additions and 150 deletions
@@ -46,7 +46,10 @@ async def _run_sweep_pass() -> None:
("status", "==", "ended"),
("ended_at", ">=", cutoff),
])
orphans = [c for c in recent_ended if not c.get("incident_id")]
orphans = [
c for c in recent_ended
if not c.get("incident_ids") and not c.get("incident_id")
]
if not orphans:
return
@@ -89,6 +92,7 @@ async def _recorrelate_orphan(call: dict) -> bool:
)
if incident_id:
await fstore.doc_set("calls", call_id, {"incident_ids": [incident_id]})
logger.info(
f"Re-correlation: linked orphaned call {call_id} → incident {incident_id}"
)