climate: stop dropping the current day from the Open-Meteo bundle #92
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Jinemi/thermograph#92
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/recent-current-day"
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 the bug reported in #bug-reports ("Unable to select today's data"): the current day is missing from the daily strip on both beta and prod. Reporter's screenshot shows the columns running
Wed 22/07, Thu 23/07, Fri 24/07, Sun 26/07, …— the 25th skipped entirely. A hole in the middle, not a stale tail.Cause
_fetch_recent_forecast_omexcluded the cell's in-progress local day, added yesterday in "Drop the in-progress local day from the Open-Meteo recent/forecast fallback". The stated premise was that Open-Meteo's daily high/low for today aggregates only the hours elapsed so far, so grading it would read a still-unfolding day as complete.That premise holds for MET Norway — its series genuinely starts mid-day, and the diurnal-coverage gate in
_metno_to_frame(#63) is the correct fix for it. It does not hold for the Open-Meteo forecast endpoint, which backfills the rest of today from the model run. The guard was generalised across by analogy and never checked against the API.Evidence
Live API, exact request the code makes, four cells between 01:00 and 19:00 local. The reported daily max always equals the max over all 24 hourly values, and diverges from the elapsed-hours-only max wherever the day still has hours left:
Los Angeles is the decisive one: 10 hours elapsed, and the value reported is the whole-day 93.9F, not the 76.1F the morning had reached.
FORECAST_DAYS = 8is commented "today + 7 days ahead", which the drop directly contradicted — the window returned 25 past + 7 forward with a gap where today belonged.Blast radius on prod
861 of 1004 cells had lost the 25th. Splitting by sync time: every cell synced today (00:04–14:16 UTC) has the hole; the 143 that still had today are stale caches synced before the change landed. As their 4h TTL expired, today was disappearing fleet-wide.
Change
Today is kept unconditionally. A day that truly cannot be graded — no high/low returned — is already dropped upstream by
_to_frame(there is a test asserting exactly that), so no separate guard is needed here and_om_local_todayhas no remaining caller.The MET Norway coverage gate is deliberately left alone: it is correct, and that path genuinely lacks whole-day coverage for today.
Also drops a verbatim duplicate of both Open-Meteo day-window tests that the main-into-dev reconciliation (#91) left in the file — the second copy shadowed the first, so only one of each was ever running.
Verification
make test— 429 passed, 8 skipped.