Repository navigation
fix(sports): offer the idle back-off only the kickoffs each board would show - #628
Merged
Merged
Conversation
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 | 128 |
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.
ChuckBuilds
force-pushed
the
claude/espn-canonical-scoreboard-keys
branch
2 times, most recently
from
October 5, 2026 14:26
c7c0124 to
405814b
Compare
ChuckBuilds
force-pushed
the
claude/sports-kickoff-filter-all
branch
from
October 5, 2026 14:35
3302f44 to
f2492d6
Compare
ChuckBuilds
force-pushed
the
claude/espn-canonical-scoreboard-keys
branch
from
October 5, 2026 15:16
405814b to
b148ccf
Compare
…ld show Football 3.18.7 (#622) stopped a favourites-only board from waking for other teams' kickoffs: the live loop offered every game on the scoreboard to core's idle back-off, and each kickoff holds the poll at the live cadence for 15 minutes, so the board fetched the whole scoreboard about every 30 s on a busy slate for games it then filtered out. The same rule now applies in the other eight scoreboards that offer kickoffs: afl, baseball, basketball, hockey, lacrosse, nrl, soccer and ufc. Each uses its own live filter (_classify_live_game; hockey's _is_live_game_included; basketball keeps tournament games in tournament mode; nrl matches team IDs). Baseball, lacrosse and ufc filtered inline in update(), so that chain moves into a _classify_live_game() both sites call. Boards showing every live game are unchanged. odds-ticker offers no kickoffs and is untouched. Replays under frozen time (fake gzipped ESPN): baseball, Fri 2026-09-25, favourite LAD: 927 -> 620 scoreboard requests, 19.6 -> 13.1 MB wire; hockey, Sat 2026-10-03, favourite LA: 645 -> 513, 12.7 -> 10.1 MB. Show-all boards make the same requests and show the same games. Versions (next patch above main): afl 1.37.1, baseball 1.59.1, basketball 1.44.1, hockey 1.44.1, lacrosse 1.37.1, nrl 1.36.1, soccer 2.41.1, ufc 1.20.1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ChuckBuilds
force-pushed
the
claude/sports-kickoff-filter-all
branch
from
October 5, 2026 15:26
f2492d6 to
7a26ac3
Compare
ChuckBuilds
marked this pull request as ready for review
October 5, 2026 15:32
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.
What
Football 3.18.7 (#622) stopped a favourites-only board from waking for other teams' kickoffs. Before that, the live loop offered every game on the scoreboard to core's idle back-off. Each kickoff holds the poll at the live cadence for 15 minutes, so on a busy slate the board fetched the whole scoreboard about every 30 s for games it then filtered out.
This PR applies the same rule to every other scoreboard that offers kickoffs. Each one now offers only the games its own live filter would show, and excluded teams are honoured the same way. Since core #772 (in 3.8.1) every offered kickoff gets its own grace, so offering only the games a board shows matters more than it did.
_classify_live_game(home_abbr, away_abbr)_classify_live_game()(was an inline chain inupdate())_classify_live_game(..., is_tournament=...): tournament games still offered in tournament mode_is_live_game_included()_classify_live_game()(was inline)_classify_live_game(home_id, away_id): team IDs, since NRL abbreviations collide_classify_live_game(home_abbr, away_abbr)_classify_live_game()(was inline; ufc has no excluded list)update(). That chain moved into a_classify_live_game()that both the live list and the kickoff offer call, so there is one rule per plugin. The behaviour is identical; only theLIVE_PRIORITY_DEBUGreason string is simpler.test_favourite_matching.py(test(scoreboards): pin every plugin's favourite matching before family 6 reconciles it #634) is unchanged: all 204 rows pass.update_registry.pyhas been run and--checkpasses.Proof
All results below are against plugins main 19fc4a2 and core main e745ae80 (3.8.1 + #774).
Unit tests. Each plugin has a new
test_kickoff_offer_follows_the_live_filter.py. It runs a realSportsLive.update()over a canned payload and records what gets offered. It checks that:basketball adds checks for tournament mode. For nrl, the favourite and the other game share abbreviations, so matching on abbreviations instead of IDs fails.
Mutation check:
sports.pyis_tournamentReplay. This reuses football's frozen-time fake-ESPN harness, generalised, on recorded payloads served gzipped. Each run covers 18 h (09:00-03:00 ET). Counts are scoreboard requests.
The favourites' games were seen live within one poll of going live in every run.
Guards.
check_version_bump.py --base origin/mainwith all 8 ids passes.check_*passes, including drift.scripts/test_*.py, includingtest_favourite_matching.py, pass against a fresh core main.Plugin tests.
run_plugin_tests.pyfor each touched plugin, branch vs main, withPYTHONIOENCODING=utf-8on Windows:test_baseball_activity.py(KeyError 'plays' on a real-feed fixture).Previously stacked on #620, which has now merged; this PR has been rebuilt on main.
Related core PR: ChuckBuilds/LEDMatrix#772 (merged).
🤖 Generated with Claude Code