fix: complete intelligence layer refreshes and UAP fallback

This commit is contained in:
BigBodyCobain
2026-08-23 20:14:07 -06:00
parent 2461756da4
commit cd6395f5ee
11 changed files with 389 additions and 26 deletions
+16 -9
View File
@@ -326,6 +326,21 @@ class GT_EarlyWarning:
if item_id:
self._seen_item_ids.add(item_id)
# Keep geolocated feed items plottable even when they do not contain a
# costly-signal keyword. The prior placement below only stored coords
# after a positive classification, so most derived-OSINT regions were
# emitted at [0, 0] and correctly discarded by the map builder.
if isinstance(coords, (list, tuple)) and len(coords) >= 2:
try:
lat = float(coords[0])
lng = float(coords[1])
except (TypeError, ValueError):
pass
else:
with self._lock:
state = self._region_state(region)
state.coords = [lat, lng]
signals = self.classify_signals(text, source)
total_strength = float(sum(signals.values()))
@@ -362,14 +377,6 @@ class GT_EarlyWarning:
)
posteriors[domain] = posterior
if isinstance(coords, (list, tuple)) and len(coords) >= 2:
with self._lock:
state = self._region_state(region)
try:
state.coords = [float(coords[0]), float(coords[1])]
except (TypeError, ValueError):
pass
self._update_graph(region, entities, total_strength, coords if isinstance(coords, list) else None)
composite = self.composite_risk(region)
@@ -590,4 +597,4 @@ class GT_EarlyWarning:
"graph_nodes": self.G.number_of_nodes(),
"graph_edges": self.G.number_of_edges(),
"processed_items": len(self._seen_item_ids),
}
}