fix(awooop): mark inbound-only truth chains received
This commit is contained in:
@@ -305,6 +305,7 @@ def _truth_status(
|
||||
gateway_mcp_total: int,
|
||||
legacy_mcp_total: int,
|
||||
outbound_visible_total: int,
|
||||
inbound_visible_total: int = 0,
|
||||
auto_repair_executions: list[dict[str, Any]] | None = None,
|
||||
) -> dict[str, Any]:
|
||||
"""Derive the current operator-visible truth-chain stage."""
|
||||
@@ -324,6 +325,10 @@ def _truth_status(
|
||||
if confidence in (0, 0.0):
|
||||
blockers.append("drift_ai_confidence_zero")
|
||||
|
||||
if incident is None and drift is None and inbound_visible_total > 0:
|
||||
stage = "inbound_received"
|
||||
stage_status = "observed"
|
||||
|
||||
if incident is not None:
|
||||
incident_status = str(incident.get("status") or "unknown")
|
||||
repair_rows = auto_repair_executions or []
|
||||
@@ -1284,6 +1289,7 @@ async def fetch_truth_chain(source_id: str, project_id: str = "awoooi") -> dict[
|
||||
gateway_mcp_total=len(gateway_mcp_rows),
|
||||
legacy_mcp_total=legacy_mcp_summary["total"],
|
||||
outbound_visible_total=len(outbound_rows),
|
||||
inbound_visible_total=len(inbound_rows),
|
||||
auto_repair_executions=auto_repair_executions,
|
||||
)
|
||||
if incident is None and drift is None and not runs and gateway_mcp_rows:
|
||||
|
||||
Reference in New Issue
Block a user