fix(monitor): clarify workbench read-model root causes

This commit is contained in:
Codex
2026-06-27 05:40:17 +00:00
parent 8d4565448e
commit c833294ab0
6 changed files with 33 additions and 17 deletions
@@ -1636,10 +1636,10 @@ def root_cause_candidates(http_summary, agentrun, read_model, lag_summary, error
})
if lag_summary.get("status") == "confirmed":
candidates.append({
"code": "hwlab_projection_stale",
"label": "HWLAB projection stale",
"code": "projection_read_model_stale",
"label": "projection/read-model stale",
"confidence": 0.94,
"summary": "HWLAB projection stale: read model sequence is behind the caller/requested event window.",
"summary": "Projection/read-model stale: read model sequence is behind the caller/requested event window.",
"evidence": {
"sourceEventCount": read_model.get("sourceEventCount"),
"requestedSinceSeq": read_model.get("requestedSinceSeq"),
@@ -1649,10 +1649,10 @@ def root_cause_candidates(http_summary, agentrun, read_model, lag_summary, error
})
elif lag_summary.get("status") == "suspected":
candidates.append({
"code": "hwlab_projection_lag_suspected",
"label": "HWLAB projection stale",
"code": "projection_read_model_lag_suspected",
"label": "projection/read-model stale",
"confidence": 0.64,
"summary": "HWLAB projection stale is suspected because AgentRun is terminal but HWLAB read-model evidence is incomplete.",
"summary": "Projection/read-model stale is suspected because AgentRun is terminal but HWLAB read-model evidence is incomplete.",
"evidence": lag_summary.get("reasons", []),
})
failure_kind = str(agentrun.get("failureKind") or "")
@@ -1976,7 +1976,7 @@ if terminal_status in ("failed", "error", "timeout", "blocked", "cancelled"):
if terminal_status == "completed":
facts.append("AgentRun completed")
if lag.get("status") in ("confirmed", "suspected"):
facts.append("HWLAB projection stale")
facts.append("projection/read-model stale")
if idle_warning_spans and terminal_status in (None, ""):
facts.append("AgentRun runner idle warnings active")
if not facts: