Freshness banner permanently degraded: SPC day 4–8 text fetch targets nonexistent SWODY4–8 products #161
Labels
No labels
area:ai
area:ci-cd
area:notifications
area:observability
area:public-pages
backlog
bug
duplicate
enhancement
help wanted
invalid
question
type:decision
type:feature
type:infra
type:maintenance
type:security
v1.0.1
v1.1.0
v1.2.0
v1.3.0
v2.0.0
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
rbrooks/WeatherBot#161
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Symptom (reported on prod, 2026-08-01): the dashboard shows a data-freshness warning even though the last update was one minute ago.
Root cause
app/services/nws.pyfetches SPC outlook narrative text per day for days 1–8 using_SPC_OUTLOOK_AWIPS_IDS = {…, 4: "SWODY4", …, 8: "SWODY8"}(nws.py:686). SPC does not issue per-day text products for days 4–8 — it issues one combined product, AWIPSSWOD48(WMOACUS48). Verified against the live NWS API tonight: recentSWOproducts carry onlySWODY1,SWODY2,SWODY3, andSWOD48.So
spc:text_swody4–spc:text_swody8have never succeeded. Prod log tonight:~26k consecutive failures at the 5-minute cadence ≈ 90 days — this predates the registry migration by months; the migration just prompted a close look at the dashboard.
Why the banner contradicts itself
dashboard_freshness_summary()(observability.py:225) marks the wholespc_fetchcategory unhealthy when any row hasfailure_count > 0, but displays the category-widemax(last_success_at)— which is minutes old thanks to the healthy day-1/2/3 keys. Hence "degraded" next to "last update 1 min ago".Suggested fix
SWOD48(AWIPSSWOD48, WMOACUS48) once and reuse it for any day-4–8 context; track it under a single freshness key (e.g.spc:text_swod48).ai_context.py:151key derivation to match.spc:text_swody4..8ProductFreshnessrows (or they trip the banner until deleted — no fetch will ever reset them once the keys are retired).detailline name the failing key so "degraded" and "last update" can't read as contradictory.Source: post-migration prod verification; investigation in Claude session 2026-08-01.