fix(mcp): a failing router in get_overview says since when, as the page does (#5860)
CI / lint (push) Successful in 2s
CI / unit (push) Successful in 1m27s
CI / integration (push) Successful in 1m33s
CI / publish (push) Successful in 19s

router_findings never passed `since`, so every failing router read as
brand new and sorted last among the criticals. The overview now reads
the failing routers' last day of history and dates each one with
problem_since, as the dashboard widget does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-15 15:40:35 -04:00
co-authored by Claude Opus 5.5
parent 80674603bc
commit c625528191
2 changed files with 27 additions and 2 deletions
+8
View File
@@ -37,6 +37,14 @@ def test_only_a_failing_router_is_an_overview_finding():
[f] = t.router_findings(routers)
assert f["severity"] == "critical" and f["subject"] == "app@swarm"
assert "Mostly 502" in f["summary"] and f["next"] == 'get_router(router="app@swarm")'
assert f["since"] is None
def test_a_failing_router_says_since_when():
began = NOW - timedelta(hours=2)
[f] = t.router_findings([{"name": "app@swarm", "state": "crit", "why": "12.0% of responses are 5xx",
"since": began}])
assert f["since"] == "2026-10-15T10:00:00Z" and f["age_s"] > 0
def test_a_router_is_found_with_or_without_its_provider():