fix aggregate search

This commit is contained in:
larssand
2026-06-30 11:47:47 +02:00
parent 4d669be66d
commit 1b38aa5704
3 changed files with 30 additions and 2 deletions

View File

@@ -93,7 +93,7 @@ def _stream_coverage(runtime_values: dict[str, object], stream_profiles: dict[st
"latest_event_time": str(status.get("latest_event_time", "")),
"truncated": bool(status.get("truncated")),
"partial": bool(status.get("partial")),
"error": str(status.get("error", "")),
"error": str(status.get("error", "") or status.get("aggregate_error", "")),
"health": "not_enabled" if not enabled else "partial_fetch" if status.get("partial") else "missing_profile" if not profile else "no_events" if int(status.get("events_fetched", 0) or 0) == 0 else "learning" if total_fields and ready_fields < total_fields else "ready" if total_fields else "profile_needs_fields",
})
return rows
@@ -171,7 +171,7 @@ def build_status(
if truncated_streams:
warnings.append(f"{len(truncated_streams)} stream(s) hit max_events_per_stream; high EPS means the analysis window is only partially sampled.")
mcp_status = {
"status": "partial" if partial_streams else "connected",
"status": "partial" if partial_streams or aggregate_errors else "connected",
"streams": stream_statuses,
"events_fetched": len(events),
"raw_events_fetched": len(events),