Parse NOAA's compact SPC timestamps, and take the fire issue time from the file date (#201) #202
No reviewers
Labels
No labels
area:ai
area:ci-cd
area:notifications
area:observability
area:public-pages
backlog
bug
duplicate
enhancement
help wanted
invalid
question
security
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!202
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/spc-issue-time"
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?
Fixes #201, using option 1 as decided by @rbrooks on 2026-10-13. Option 2 (use NOAA's
expirefield instead of deriving expiry) is left as a possible follow-up.The bug
NOAA's MapServer sends SPC issue times as twelve digits (
202610131252)._parse_datetimeonly trieddatetime.fromisoformat, which rejects that shape, soissued_athas been NULL on every outlook since SPC support was written: 0 of 75 rows on production, 0 of 194 on dev. The dashboard shows the request time as the "issued" time, public and impact pages show it blank, and each host logs about 1,900 warnings a day.The change
_parse_datetimereads the compactYYYYMMDDHHMMform as UTC. An impossible date returnsNonerather than raising.idp_filedateinstead ofvalid.The second part is why this is not a one-line fix. Expiry is derived as issue date at 0800Z plus N days, and has only been roughly right because a NULL issue time fell back to "now".
issue(real field)issue, elsevalid(unchanged)idp_filedate(wasvalid)The fire layers have no
issuefield.validis when the outlook period starts, which for Day 2 is tomorrow, so had it simply started parsing, a Day 2 Critical/Extreme record would have been held a day too long.idp_filedatesits within minutes of issuance: 05:45:21Z for both fire products on 2026-10-13, against a Day 2 convectiveissueof 05:15Z and file date of 05:30Z.If
idp_filedateis ever missing, fire falls back to no issue time, which is today's behaviour.What does not change
product_idfor all three families. Dedup identity is untouched, so no existing record is re-sent.What does change, visibly
Existing rows are not backfilled. They age out, and
product_idembeds the raw issue string if a backfill is ever wanted.Verification
New tests use property shapes copied from live MapServer responses, and cover: the compact format; a convective feature getting its issue time; a Day 2 fire outlook expiring on issue date + 2 rather than
valid+ 2; and the no-file-date fallback.Correction to the record: my comment on #201 gave the fire file time as 07:45Z. It is 05:45Z. The reasoning there is otherwise unchanged.
🤖 Generated with Claude Code
issued_atis NULL on every row, and "issued" times shown are the fetch time #201issued_atis NULL on every row, and "issued" times shown are the fetch time #201