fix(traefik): a problem card works out its kind when it wasn't graded on the page (#5712)
CI / lint (push) Successful in 2s
CI / integration (push) Successful in 1m28s
CI / unit (push) Failing after 1m29s
CI / publish (push) Skipped

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-14 21:08:19 -04:00
co-authored by Claude Opus 5.5
parent 685850e681
commit 7c424a0398
+2 -1
View File
@@ -203,7 +203,8 @@ def explain_problems(problems: list[dict], services: list[str]) -> None:
`meaning` (meaning.explain's) and `service`, the swarm service behind
the router when Steward can tell which."""
for r in problems:
r["meaning"] = meaning.explain(r["kind"], r.get("codes", []),
kind = r.get("kind") or meaning.problem_kind(r["state"], r["why"])
r["meaning"] = meaning.explain(kind, r.get("codes", []),
getattr(r["latest"], "latency_p50_ms", None),
getattr(r["latest"], "latency_p95_ms", None),
r.get("normed", False))