A game that misses its live window can never reach FINAL #442
Labels
No labels
Kestra
bug
enhancement
someday
subtask
☁️ api
🎛️ infrastructure
🐞 sentry
📆 2025 Season
📝 pages
allpicks
📝 pages
picks
📝 pages
standings
🚀 performance
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
johnsturgeon/tgfp-web#442
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?
_in_live_windowmeasures from the scheduled kickoff:with
lead5 minutes andtail5 hours. Rule 7 is the only caller ofupdate_scores_current_week, so once that window closes a game can neverreach
FINAL.Two ways in
Bootstrapping into the past. A week whose games have already been played
gets its rows inserted with
insert_game's default ofSCHEDULED, and thewindow is already shut. Confirmed on production after the Aug 2026 rebuild:
preseason week 4, all 16 games
SCHEDULED, week stuck atPREGAME, and noupdate_scores_current_weekrow injobstateat all.A delayed kickoff. NFL games slip for weather and for the game before them,
and
start_timedoes not move when they do. A 90-minute delay plus a 3.5-hourgame puts the final whistle outside a 5-hour tail measured from the scheduled
start.
What it costs
The game never settles, so the week never reaches
ALL_FINAL. Rule 5 thenre-fetches the schedule every 45 minutes forever, and rules 8 and 9 never fire
for that week -- no record recalculation, no awards.
Shape of the fix
The window is the wrong guard for catching up. It answers "is this game
probably live right now", which is right for the 5-minute cadence but wrong as
the only path to a final score.
Something like: while the week is not
ALL_FINALand any game isstarted-but-unsettled, poll on a slow cadence -- the existing watermark
machinery already gives a natural way to express that without re-running every
tick. Keep the fast window for games actually in progress.
Note this is the scores half of the same shape as #435, which is the odds half:
both rules only reconcile forward, and neither can recover a week that arrived
after the moment it was watching for.
Urgency
Before Tank01 rolls
getNFLCurrentInfoto regular-season week 1. Any weekcreated mid-flight, or any deploy onto a fresh database during a game day, lands
in the first case.