fix(football): a favourites-only board wakes only for its own kickoffs (3.18.7) - #622
Merged
Merged
Conversation
…s (3.18.7) The live loop offered every game on the scoreboard to the idle back-off as a kickoff to wake for. Each kickoff holds the poll at live cadence for 15 minutes, so on a college Saturday a favourites-only board fetched the whole 54-game scoreboard about every 30 s all day for games it then filtered out, and a kickoff already being waited on kept a favourite's later kickoff from being stored until its grace ran out (UGA 12:45 noticed at 12:59 in a replay of 2026-10-03). Only games the live filter would show are offered now. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 5 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
This was referenced Oct 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
football-scoreboard 3.18.7. Only games the board would actually show now count as kickoffs that wake the live poll.
What was wrong. The live loop passed every game on the scoreboard to core's idle back-off (
_note_scheduled_start_candidate) as a kickoff to wake for. After each kickoff, the poll stays atlive_update_interval(30 s) for 15 minutes. A college Saturday has a kickoff about every half hour from late morning to midnight. So a favourites-only board (show_favorite_teams_only, the schema default) fetched the whole 54-game scoreboard (865 KB decoded, 63 KB gzipped) about every 30 s all day, for games it then filtered out.It was also late for the favourite. A stored kickoff is kept for its 15-minute grace period, and a later kickoff can't replace it until that ends. In the replay below, the 12:30 games blocked UGA's 12:45 kickoff, so the game was first shown at 12:59.
Fix. A game is offered only if
_classify_live_gamewould include it once live. That also honoursexclude_teams. Boards that show every live game (show_all_live, orshow_favorite_teams_onlyoff) offer every game, exactly as before.Where the 643 MB on ledpi came from
bytesislen(response.content). ESPN sends the scoreboard gzipped: 865,068 bytes decoded, 63,275 on the wire (13.7x).show_favorite_teams_only: false, so every live FBS game is shown. Its journal for 2026-10-03 shows 107–121 polls an hour from 11:00 to 03:00 ET, with 1–18 games live the whole time. 120 polls × 865 KB ≈ 104 MB/h decoded, which matches 643 MB in 6 h. On the wire that is about 7.6 MB/h, or ~45 MB per 6 h.groups=80returns the same 54 events.status=in,state=in,live=1,enable=/disable=are ignored (same bytes).limitabove 500 truncates to 25 events.scoreboard/headerendpoint lists only 16 events.wire_bytescounter so fetch-stats reports what actually crosses the network.Test plan
update()every 5 s and ESPN's 400 for date ranges. Old =main, new = this branch.main: 09–12h 9/10/37/62, 120 during the games, then 62/33/37/37/39.mainhad, the only differences are three 20 s phase offsets at kickoff/final between two 30 s pollers.test_kickoff_wakes_the_idle_poll.pyhas four new checks: favourites-only offers only favourites,show_all_liveoffers all, all-live boards offer all, excluded teams are never offered. Two of them fail againstmain'ssports.py.run_plugin_tests.py football-scoreboard: 65 pass. The one failure istest_football_plugin.py, an interactive prompt that also fails onmain.check_version_bump.py --base origin/main football-scoreboard,check_manifest_version_fields,check_sports_drift,check_sports_helpers_parity,check_module_collisions,check_min_core_version,test_check_min_core_version,test_espn_dates_copies,test_stage3_mixin_copies,update_registry.py --check: all pass, run against core main.Notes for reviewer
_classify_live_gamesignatures differ (bool vs tuple, ids vs abbreviations), so this PR leaves them alone._note_scheduled_start_candidatekeeps one stored kickoff through its grace period, which is what hid the favourite's kickoff. With this change, a favourites-only board only hits that when two favourites kick off within 15 minutes of each other._fetch_todays_games/ cache-key lines thatclaude/espn-canonical-scoreboard-keyschanges. Whichever merges second will conflict only inmanifest.json,CHANGELOG.mdandplugins.json.🤖 Generated with Claude Code