update_odds_current_week does not guard against a locked week #446
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#446
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?
update_odds_current_weekfetches and writes lines unconditionally:The write barrier lives entirely in dispatcher rule 4's guard
(
week.odds_state == OddsState.PRELIMINARY). Anything that reaches the jobanother way -- an admin button, a manual run during an incident, a future
caller -- overwrites a locked week's spreads and says nothing.
What that costs:
OddsState.LOCKEDmeans every pick in a week was made againstthe same number. Moving a spread after picks are open scores two players
against different lines for the same game, silently and unrecoverably.
The guard belongs in the job as well as the rule. Rule 4 decides when to
refresh; the job should refuse to write a week that has been frozen, whoever
asked.
Split out of #435, which was closed as an accepted risk -- that was about the
timing of the lock, this is about the barrier itself.
This was resolved in
73f68ed5c9