feat(scoreboards): port other-games selection to the eight sibling lineages - #353
Merged
Conversation
Selection was purely chronological, so rotating harder just served more filler. On a real board's college schedule, 923 non-favourite upcoming games: 235 involve a nationally ranked team and the rest are matchups the viewer has never heard of. Two settings now decide what fills the slots left over after favourites, and neither ever touches favourites themselves -- follow a smaller-division school and its games always show. other_games_min_quality (default "ranked") uses the rankings table the plugin already fetches for the rank badge, so it costs no extra requests. That gating had to move: rankings were only fetched when show_ranking was on, which left the filter with an empty table and would have emptied the board. other_games_divisions (default ["fbs"]) needs ESPN's own group rosters -- two requests a day, cached. conferenceId cannot do this job: cross-division games put an FBS conference on an FCS slate, so the id sets overlap and Merrimack at Delaware classifies as FBS. The group rosters are disjoint (148 FBS ids, 130 FCS). Every participant must be in a checked division, so leaving FCS unchecked also removes a ranked side hosting an FCS school -- which is the actual complaint. Every check fails OPEN. A rankings table that did not load, or divisions that did not resolve, allows the game: a board showing filler is poor, a board showing nothing is broken. Three real defects found while testing this, all in the already-pushed commits of this PR: - SportsRecent is a SIBLING of SportsUpcoming, not a subclass, so its call to _favorites_first hit a method it did not have. AttributeError, swallowed by update()'s own try/except, recent games silently blank. The shared helpers now live on SportsCore and a test drives the real SportsRecent class rather than only Upcoming, which is what hid it. - nrl matches favourites by ESPN team id on purpose -- its abbreviations are not unique, "NEW" is both Newcastle Knights and New Zealand Warriors -- and the ported abbreviation-based matcher shadowed that on the upcoming path, where it would favourite the wrong club. Removed; nrl keeps its own. - The custom-league editor is an array-table, and array-table.js stringifies a list into "a,b" before submitting, so an array-typed property inside a row can never validate. The checkbox group is out of custom_leagues; the enum string stays. Class-level defaults for everything the selection path reads, because that read happens inside update()'s try/except: a missing attribute does not raise anywhere visible, it just blanks the board. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01STMbQE4YctTacQXfbYqKuW
Two defects found while re-checking the logic with the season a week out. Both are the same shape: nothing raises, nothing logs, the feature is just quietly not there. 1. None of the five new settings reached the code. Managers do not read the plugin config -- _adapt_config_for_manager translates it, and that translation is an explicit whitelist. Every one of the new keys was declared in the schema, rendered in the web UI, read by sports.py, and dropped in between. A user could set them, save, and nothing would change; the code kept its own defaults. All nine plugins, and the lineages disagree about where the values live: game_limits, filtering, or the league root, with hockey and lacrosse going through resolve_value instead. Each now reads from the same place its own schema declares them. test_settings_reach_the_manager.py guards it, using values that are NOT the defaults -- a fixture built from defaults passes against a translation that drops the key entirely. 2. Making "ranked" the default quality made every league fetch rankings, and only college leagues have them: NFL's endpoint 404s. _fetch_team_rankings only short-circuits on a NON-empty cache, so a failed fetch leaves it empty and the next update tries again -- roughly 2,900 dead requests a day per non-college league at a 30s interval. Gated on the league actually having a poll. Verified against the live API rather than assumed: the division lookup fetches 148 FBS and 130 FCS team ids, caches them, serves a second instance without touching the network, and is skipped entirely for NFL. college-football's rankings endpoint returns 25; nfl's returns 404. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01STMbQE4YctTacQXfbYqKuW
AP_TOP_5, AP_TOP_10 and AP_TOP_25 all resolve from the same poll and differ only in how far down it they slice -- and the value cached was the whole list. The key, though, named the pattern, so configuring two groups fetched the identical payload twice, stored it twice and expired it twice for no difference in the result. Seen on a real board: dynamic_teams_ncaa_fb_AP_TOP_10.json and dynamic_teams_ncaa_fb_AP_TOP_25.json side by side, both holding the same 25 teams. Keyed by sport instead. Five plugins carry a resolver with patterns; two key spellings between them. afl, nrl and soccer ship a stub with no patterns at all, so there is nothing to key. The test asserts one fetch PER SPORT rather than one overall: hockey and lacrosse declare groups across several sports, and those really are separate polls. It also skips the shared-cache assertion for lineages that pair a class-level dict with a per-instance freshness stamp, where a new instance refetches by construction -- pre-existing, and not what this change governs. Reverting the key in any of the five fails three checks. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01STMbQE4YctTacQXfbYqKuW
Driving the real NCAAFBUpcomingManager end to end -- which nothing had done --
showed the selection working and "rankings loaded: 0". The quality filter was
failing open on every board.
fetch_standings tried /standings first and fell back to /rankings only on a
404. College football answers /standings with HTTP 200 and no "rankings" key,
so the fallback never fired. Verified against the live API today:
football/college-football/standings 200, no "rankings" key
football/college-football/rankings 200, 3 ranking blocks
football/nfl/standings 200
football/nfl/rankings 404
Nothing ever failed. _fetch_team_rankings parsed a body with no rankings in
it and cached an empty table, so the AP rank badge never appeared however
show_ranking was set -- that part predates this PR -- and the new "ranked"
filter passed every game, because an empty table fails open.
The endpoint is now chosen by league rather than discovered by error code,
and a 200 without the key counts as a miss. After the fix the same end-to-end
run loads 25 rankings and fills the other slots with SJSU@USC (#14),
UTEP@OU (#10) and MIA@STAN (#7) instead of the next three unranked games.
Also verified end to end, both directions: NFL recent returns 2 TB games plus
2 others, newest first, and fetches 0 rankings -- no poll exists, and none is
requested.
Note on the baseball copy: the first attempt replaced from fetch_standings to
the next top-level class, which in that file swallowed fetch_game_summary,
fetch_player_details and _parse_player_details. Its own test_player_card
caught it. Redone bounded to the method, and targeted at ESPNDataSource
specifically -- the abstract declaration above it has the same signature.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01STMbQE4YctTacQXfbYqKuW
The SportsRecent defect survived every test because they all drove SportsUpcoming directly. This drives what the plugin actually instantiates -- live, recent and upcoming, for both leagues -- and asserts each carries every selection helper and setting. Favourite detection is checked in BOTH directions. Asserting only that a favourite returns True passes against a matcher that returns True for everything, which would sweep the whole league into the favourites bucket and quietly empty the other-games slots. Reverting the helpers to SportsUpcoming reproduces the original failure verbatim: 'NFLRecentManager' object has no attribute '_is_favorite_game'. Verified alongside, by driving the real managers end to end against live ESPN data rather than fixtures: - NCAA upcoming: 3 favourites (UGA, AUB) plus 3 ranked others -- SJSU@USC (#14), UTEP@OU (#10), MIA@STAN (#7) - NFL recent: 2 TB games plus 2 others, newest first, 0 rankings requested - both live managers update cleanly and resolve favourites - the config the web UI writes from schema defaults validates, a user-edited one validates, and a string where an array belongs is rejected Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01STMbQE4YctTacQXfbYqKuW
None of this was written down anywhere a user would look. The settings existed only as schema descriptions in the web UI, plus code comments and commit messages -- and the behaviour is not guessable, which is exactly why it kept being misread. The section leads with the thing that trips people up: upcoming_games_to_show is not "how many cards you see", it is the size of a POOL that the panel cycles, keeping its place between visits. Making it bigger lengthens the lap, so any one game appears LESS often -- the opposite of what people reach for it to do. Then the three modes as a table, because which one you are in depends on two settings at once, and the useful one (favourites first, then others) is the combination that until now did nothing. Facts in it are measured rather than described: ~950 upcoming college games of which ~250 involve a ranked team; 18 distinct matchups over three hours of rotation while the pool stays at 6 cards. Every default quoted was checked against the schema. The AP_TOP_n warning is in both this section and the Dynamic Team Resolution section that introduces those patterns, because that is where someone meets them: expanding a group into the favourites list makes your own teams compete with it, and on a real schedule UGA's next game was favourite-game #5 and Auburn's #8, so neither appeared with a limit of 3. Shorter version in the other eight READMEs, without the college-specific detail, and noting that the quality and division filters are inert for leagues with no poll and no divisions. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01STMbQE4YctTacQXfbYqKuW
The in-memory copy had no clock. _load_division_team_ids returned early on any non-None value, so the first result a process produced was the only one it ever used, and a board that happened to be offline for that first lookup ran with division filtering disabled until someone restarted the service -- on a display that stays up for weeks, indefinitely. A roster that changed between seasons was never picked up either. The copy now expires like the stored one: a day for a resolved lookup, ten minutes for one that came back empty, so a blip costs minutes rather than a day without retrying per frame. Also lower-cases the league before the "college" test -- the guard that decides whether to make the two requests at all was case-sensitive on a value the config supplies. The probe sets the freshness stamp alongside the pre-loaded ids: a populated cache with a zero stamp now reads as stale and goes back to the network, which is not what a test pre-loading divisions means. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014RRtqXDCnvnY6EQwhT5CV9
Nine minor bumps, one per sports plugin. The 1.32.0-generation entry that 1.32.0 already shipped under is restored to the text it was released with -- it had been edited in place while this work was still on the same branch, and it now described settings that version does not have. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014RRtqXDCnvnY6EQwhT5CV9
…ests
Six of CodeRabbit's thirteen comments were real. Three are behaviour, three
are the tests and docs that let the behaviour hide.
1. FBS/FCS is a college FOOTBALL taxonomy, and the lookup ran for any league
whose name contains "college". Checked against the live API, groups 80 and
81 exist for that one league:
football/college-football 200, 148 FBS + 130 FCS team ids
baseball/college-baseball 500
lacrosse/mens-college-lacrosse 500
basketball/mens-college-basketball 200, 0 items
basketball/womens-college-basketball 200, 0 items
hockey/mens-college-hockey 200, 0 items
An empty roster fails open, so the setting filtered nothing on those
leagues; it only cost two requests a day and two warnings in the log. The
group ids are now keyed by league, and the schema and READMEs say plainly
that the division filter is college football alone rather than implying
every college league has divisions to pick from.
2. With no favourite teams configured, selection took the next N games
chronologically and never called _passes_other_filters. Every game in that
branch is a non-favourite game, so both settings were inert for exactly the
boards that have nothing else narrowing the list -- ask for ranked games
only, get the next three kickoffs. Both branches now go through
_filtered_or_all, which fails open as a whole: a filter matching nothing
would blank the mode, and there is no favourite left to carry it.
3. afl and nrl declare these keys twice, at the config root and inside
game_limits, and the web UI renders both. afl's translation read the root,
nrl's read game_limits, so each plugin had a set of controls that accepted
input and dropped it. Both now read either, game_limits first, matching how
nrl already resolved the two older limits.
4. The division-filter assertion was vacuous in all nine test copies. The
fixture put home ids in the division sets and away ids nowhere, so every
away side classified as "other", the filter dropped the whole slate, and
all() over the empty result passed -- it would have passed just as well
against a filter that rejected everything. The sets now cover both sides,
one game straddles deliberately (and is the FIRST game, or selection never
reaches it), and the count is asserted. Ablating _game_divisions to the home
side only now fails two checks; before, it failed none.
5. test_settings_reach_the_manager now asserts that every location a plugin's
own schema offers actually reaches the manager -- root, game_limits or
filtering, whichever that schema declares -- rather than one fixture that
fills in all three and passes whichever the adapter happens to read.
Reverting the afl fallback fails five of its checks.
6. E731: the two assigned lambdas in the ranking-fetch tests are functions.
Skipped, with reasons:
- "Read broadcast data from `broadcasts`, not `broadcast`." The scoreboard
payload carries both, and `broadcast` is the string this code wants:
college-football "NBC", nfl "NFL Net", college-baseball "ESPN",
mens-college-lacrosse "ESPN", ufc "Paramount+". Where it is empty
(soccer/eng.1, nhl) `broadcasts` is an empty list too, so reading the other
key changes nothing.
- "Namespace the persistent cache keys by plugin." They are already keyed by
sport and by league, and the copies of the resolver store the same shape, so
a shared entry is the same data fetched once instead of twice.
- "Load deferred plugin modules under unique module names." Each test script
runs in its own process and puts only its own plugin directory on sys.path,
so there is no other plugin's module to collide with.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014RRtqXDCnvnY6EQwhT5CV9
Three gaps found reading the selection logic back, all the same shape: a
filter doing exactly what it was asked leaves the board with less than the
user expected, and nothing says why.
1. `_passes_other_filters` fails open per check -- a ranking table that could
not be fetched allows every game -- but the SET of filters had no such
guard on the favourites path. Favourites idle inside the schedule window
plus a quality bar nothing clears meant an empty list, which is a blank
mode rather than a short one. `_filtered_or_all` already made that
whole-list fallback for a board with no favourites; the favourites path now
makes the same one. `other_..._games_to_show` of 0 is an explicit
"favourites only" and is still honoured, blank or not.
2. "broadcast" was the one check that could not fail open, because the
scoreboard payload always carries the key -- it is simply empty in leagues
ESPN publishes no listings for. Measured today:
college-football "NBC" nfl "NFL Net" college-baseball "ESPN"
mens-college-lacrosse "ESPN" mma/ufc "Paramount+"
soccer/eng.1 "" hockey/nhl ""
So picking it on a hockey or soccer board removed every non-favourite game.
Coverage is now read off the slate rather than a hardcoded league list: no
game carrying a broadcaster means the data is absent, not that nothing is
on television, and the check allows everything.
3. The ranking table is keyed by the abbreviation the RANKINGS endpoint
returns and matched against the SCOREBOARD's. Nothing guarantees the two
agree, and if they stop agreeing the filter silently removes every
non-favourite game -- the same silence that let "rankings loaded: 0" run on
real boards until someone went looking. A loaded poll matching no game on
the schedule now warns, throttled to once an hour, and names the
abbreviations it holds so the mismatch is visible rather than inferred.
Ablating any one of the three fails its own check and no others.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014RRtqXDCnvnY6EQwhT5CV9
… schema
The division filter required EVERY participant to be in a checked division, so
the default ["fbs"] read as "FBS versus FBS only". Measured against the real
Week 2 slate, that silently removed five of the twenty ranked matchups --
Missouri, Utah, Tennessee, Texas Tech and BYU, each hosting an FCS school.
Those are games about a team the viewer checked the box for.
One side is now enough. FBS vs FCS is in; FCS vs FCS is still out unless `fcs`
is checked, which is what the setting is actually for. On the same slate, with
the same rotation, coverage of ranked matchups goes 15/20 -> 20/20, and the
longest gap between two showings of one game moves 40 -> 69 minutes because the
pool is five games larger. Favourites remain exempt from every filter, so a
favourite's own FCS tune-up game was showing before this change and still is.
The quality filter keeps this from becoming a flood: with the default "ranked",
an unranked FBS side hosting an FCS school is rejected on quality anyway, so
what the looser rule admits is specifically the ranked matchup.
Also, from an audit of all 31 selection blocks across the nine schemas:
- The five settings are declared in every block, each with a default, matching
types, and identical ranges (0-20 counts, 0-86400 seconds, the two enums).
The `other_*` counts default to their own block's limit, so an upgrade keeps
the games the board was already showing.
- scripts/check_selection_settings.py now enforces that, structurally: it finds
every properties-dict that declares a game limit, so a league added later is
covered without editing the checker. Its self-test asserts the repo passes
AND that five separate kinds of gap are caught, because a guard that cannot
fail is indistinguishable from one that passes.
- soccer's custom_leagues block is the one place a setting is legitimately
absent. array-table.js coerceValue() has no array branch: it submits "fbs"
where the schema wants ["fbs"], and jsonschema then rejects the entire save,
not just that field. Adding it there broke three cases in
test_custom_league_config.py, which is how the constraint was found. The
checker knows about row editors and does not demand arrays inside one.
- The reads are hardened. These land in update()'s own try/except, so a string
where an integer belongs surfaced as a mode that rendered nothing rather than
as an error. Counts and the interval clamp to their declared range,
other_games_min_quality is case-normalised, and a bare "fbs" becomes one
division rather than list("fbs") == ['f','b','s'] -- three names matching
nothing, which rejected every non-favourite game.
Ablating the division rule back fails two checks; ablating any of the schema
guarantees fails the guard's self-test.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014RRtqXDCnvnY6EQwhT5CV9
…hable Two findings from auditing the configuration surface, and they compound: the rotation interval was a setting that could not take effect, gated behind an interval that could not be changed. 1. `_other_games_window` only ever ran from update(), which returns early until `upcoming_update_interval` has passed -- an hour. So `other_rotation_interval_seconds: 240` did not produce fifteen slices an hour; it produced one jump of fifteen windows, once an hour. On a real board that reads as the same two matchups for six hours, which is exactly what ledpi's journal showed: 89 visits to ncaa_fb_upcoming, UNC@TCU and SJSU@USC every single time. Which games exist, and which are worth a slot, is a fetch concern. WHICH of them is on screen is a display concern. The composition is now split out of _favorites_first, and the two display paths re-cut the slice when the interval passes -- one list slice and a sort of a few games, no network. Same lesson `_advance_live_game_if_due` already carries a comment about, for the same reason: gating a display decision on the fetch quantises it to the refresh rate. The card on screen keeps its place if it survived the cut, so rotating changes what comes next rather than interrupting what someone is reading. 2. Five settings sports.py reads were unreachable: no schema declaration, no translation, permanently at their built-in defaults. Three are worth exposing and now are -- recent_update_interval, upcoming_update_interval and stale_game_timeout. The odds intervals are left internal: odds are already fetched per selected game, so the knob would be a second lever on the same behaviour. The shape of the gap differed per plugin, which is why one audit found all of it: afl, nrl and soccer DECLARED the two intervals and dropped them in translation -- controls the form rendered and the board ignored, the same bug this PR opened with. baseball, basketball, football and ufc had neither. hockey and lacrosse were already complete, under `update_intervals.recent` and `.upcoming`; only the staleness guard was missing there. `update_interval_seconds` stays undeclared deliberately: all three managers overwrite it with their own per-mode interval, so a control for it would do nothing in the place a user would expect it to. The propagation test now covers all eight settings rather than the five selection ones, and asserts each still arrives from every location its own schema offers. Removing any single adapter entry fails two of its checks. Also updates the empty-mode stand-in in three plugins, which builds a bare object carrying only what display() touches -- it binds the two real rotation methods rather than stubbing them, so a regression that made them raise is caught rather than hidden. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014RRtqXDCnvnY6EQwhT5CV9
`favorite_teams` was already empty by default; the counts were 1. With no favorites configured every card is a non-favorite card, so a fresh college install showed exactly one game and repeated it until the schedule moved on -- which is the state ledpi was in this morning, two games shown 89 times each over six hours. Five in each of the four counts. The `other_*` pair mirrors its own limit, as in every other block, so adding a favorite team later adds to what is there rather than replacing it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014RRtqXDCnvnY6EQwhT5CV9
The quality filter declares the poll to be the thing worth showing, and then selection ignored the number entirely. #1 against #2 and #25 against an unranked side were interchangeable: both passed the gate, and whichever kicked off sooner took the slot. Rank was fetched, cached, and used for nothing but the badge painted on the card -- the only sort touching it in the whole file was `sorted(rankings)[:8]`, for a log line. The non-favourite pool is now ordered by the better of the two sides' poll positions before the window slices it, with kickoff as the tie-break. The rotation still walks the entire pool, so coverage and the measured gaps are unchanged; it walks DOWN the ladder instead of along the clock. What changes is which games lead: the first window after a restart or an update holds the best game available rather than the earliest, and a board is far more often freshly started than three hours into a lap. Favourites keep kickoff order. Ordering your own teams by rank would put a week-8 fixture ahead of Saturday's, and for your own team the next game is the point -- a test pins that. A league with no poll keeps the chronological order it had, because there is nothing to sort on: `_by_importance` returns the list untouched when the rankings table is empty, which is also what happens on a failed fetch. Reverting the ordering fails the check that the first window holds the best game; the fixture puts the top-ranked matchup last chronologically so the two orderings cannot agree by accident. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014RRtqXDCnvnY6EQwhT5CV9
Shipping the rank ordering to a real board showed what the chronological order had been hiding: the upcoming pool is not a week of fixtures. For college football it is the whole season -- ledpi logged "Found 947 total upcoming games in data" -- so ordering by rank alone stacked all twelve of the #1 team's games above the #2 team's first one. The board went straight to KENT@OSU, ILL@OSU, then OSU@IOWA, MD@OSU: Ohio State's season, in order, before any other matchup. The pool now keeps one game per team, the soonest, and orders those by rank. It reads as "what each team has next, best matchup first", which is what an upcoming board means, and it is inherently near-term without a horizon setting to tune: a team's next game is by definition its closest one. Deduping happens on a soonest-first pass rather than on the rank-ordered one. Taking the first entry per team out of rank order would keep whichever game sorted first by rank, and for a game between two ranked sides that is not necessarily the one being played next. The ablation reproduces the board's symptom exactly -- top0, top1, top2, top3 -- so the test fails for the reason it was written. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014RRtqXDCnvnY6EQwhT5CV9
The other-games pool refuses to spend its slots on one team; favourites were still doing exactly that. `favorites[:limit]` takes the soonest N, and the upcoming list is a season, so a team that plays either side of another's bye takes both slots. Walked across a real 901-game season with UGA and AUB at a limit of 2: nine days showed Auburn twice and Georgia not at all. Round-robin instead -- each favourite team's next game before any team's second. Depth survives where there is room: one favourite with three slots still gets its next three games, because a team's second game only comes up once every team has had a first. A game between two favourites is picked once and counts for both. Which side of a game belongs to which favourite turned out to be a per-lineage question. NRL matches on ESPN team ids because its abbreviations are not unique -- "NEW" is both Newcastle and New Zealand -- while the other eight match on abbreviation. The first version assumed abbreviations and silently grouped nothing there: every queue empty, every favourite slot empty, and the nine plugins would have disagreed about what the setting does. It now asks for the lineage's own matcher. The fixture gives each team both spellings, as the existing one does, so a single test covers both styles -- and the ablation fails on the id-matching lineage too, which is what proves that path is really exercised. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014RRtqXDCnvnY6EQwhT5CV9
Nine plugins failed in CI with the same reason -- "ignoring unusable other_upcoming_games_to_show='not a number', using 3" -- which is a log line from a test that PASSES, emitted on stderr near the end of the script. The runner reported the last line of stdout+stderr, and for any script that warns on stderr that is the warning, whether the run passed or failed. The reason was therefore identical for every failure and named nothing. It now reports the checks that actually failed, up to three, and falls back to the exit code plus the last few lines when a script died without naming one -- a traceback, or an exit from somewhere unexpected. That case has to stay visible: it is the one where there is no check name to report and the tail is all the evidence there is. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014RRtqXDCnvnY6EQwhT5CV9
CI failed all nine plugins on "the mismatch is reported" and no machine here could reproduce it. The reason is uptime: monotonic() counts from an arbitrary origin, a few hundred seconds on a runner that just booted, and the throttle compared it against a stamp of 0. So "never logged" read as "logged at the epoch", and the first warning was suppressed for the first hour of uptime -- precisely when a misconfigured board is being watched. This machine has days of uptime, so monotonic() dwarfs the hour and it always passed. Zero now means never logged, as it already does for the rotation clock a few methods up. The test drives it at 120 seconds of uptime rather than trusting the host's, so the case is pinned on any machine. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014RRtqXDCnvnY6EQwhT5CV9
… this Main moved a long way under this branch. Resolving hunk by hunk showed the work splits cleanly in two, and the halves want opposite resolutions. **football-scoreboard is fully superseded.** What this branch does for football shipped as #335 and was then improved by #341, #343 and #344. Main is strictly ahead everywhere they overlap: it season-corrects the division roster lookup, str()-guards ESPN's broadcast field, catches OverflowError on a bare Infinity, routes the no-favourites branch through _favorites_first so it builds selection pools, and adds _attach_odds_to_rotated_games, which this branch does not have at all. Several of main's comments describe this branch's own approach as the old way. Every football hunk therefore takes main, and football's sports.py, manager.py, data_sources.py, tests and README now match origin/main byte for byte -- this branch no longer changes football in any way. **The other eight lineages still need all of it.** They have _favorites_first and nothing else: no _compose_selection, no rotation, no _passes_other_filters. Their settings were in the schema with nothing reading them. Those hunks take this branch. Three resolutions worth naming: - baseball, basketball, hockey and lacrosse: main re-adds _is_favorite_game beside the rotation methods this branch adds. Taking both would have defined it twice in one class, and Python takes the last -- main's copy would have silently shadowed this branch's. Kept one, plus main's _DRAWS_SCORE ClassVar. - nrl: main defines _is_favorite_game TWICE in SportsCore, at 320 and 2177, and they do not agree -- the first matches on ESPN team id, the second on abbreviation. #189 moved nrl to ids deliberately; #332 added the abbr copy, which shadowed and silently reverted that fix. This branch removes the duplicate, so the fix is restored. That is a live bug on main today. - Manifests and plugins.json take main, then the eight changed plugins are re-bumped on top of the versions main has since published. Football is not bumped, because nothing about it changed. READMEs: football takes main; afl, baseball and basketball keep both sections, since this branch documents selection and main documents the matchup separator. Verified: run_plugin_tests.py --all gives 222 passed, 2 skipped, 1 failed, and that one failure -- football's test_favorite_live_boost.py, "excluded team hidden from recent/final scores in default (no-favorites) path" -- reproduces identically on a clean origin/main worktree. It is main's, not this merge's: _favorites_first(games, 0, N) does not apply the exclude filter the old filter/sort/truncate path did. The eight apply excludes elsewhere and pass. check_selection_settings, check_manifest_version_fields, check_scroll_adoption and check_module_collisions all pass. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014RRtqXDCnvnY6EQwhT5CV9
B6, piloted on one plugin. B5 moved this scoreboard onto the core's src.common.sports_scroll behind a guarded import, keeping the frozen pre-adoption implementation as scroll_display_legacy.py so it still ran on a core that predated the module. That copy is now deleted and the import is plain. The guard goes with the copy, deliberately. Keeping try/except with nothing behind it would name the missing scroll_display_legacy rather than the core module that is actually absent -- and that name is the whole user-visible contract here, because PluginManager catches the ModuleNotFoundError and parks the plugin in ERROR with one log line. Get it wrong and the user is told the wrong thing about why their scoreboard vanished. Hockey first, alone, because B5 shipped four of eight plugins with scroll mode broken at once and every gate was green at the time. It is also the only adoption besides baseball exercised on real hardware. The floor rises to 3.2.0 -- the release that ships the module, not a later one: a floor describes what the plugin needs. compatible_versions moves to >=3.2.0 with it, since compatibility.check evaluates the range before the floor and leaving >=2.0.0 beside a 3.2.0 floor would be self-contradictory even though it changes no verdict. Behaviour is unchanged. The frozen copy and the live path were method-for-method identical for every content method, all 16 safety-harness renders pass across eight panel sizes, and the class-level separator-icon constants -- the exact thing B5 lost -- are byte-identical after the de-indent. 703 lines removed. test_core_fallback.py -> test_core_scroll.py, rewritten rather than deleted: its machinery has already caught two shipped bugs, and both were load-time bugs the harness cannot see because the core base catches exceptions out of prepare_scroll_content. It now asserts the sunset instead of the fallback -- the import is top-level and unguarded, no copy exists or is imported, the base is the core class by identity, an old core fails naming exactly src.common.sports_scroll, and the manifest floors at 3.2.0 or above. That last one is load-bearing: nothing else in either repo checks the floor's VALUE. The harness runs against core main, which has the module whatever the manifest says; check_manifest_version_fields checks the field's spelling, not its number; the registry carries no floor at all. A sunset shipping with a 2.0.0 floor would be green everywhere while the store handed it to a 3.1.0 core. The cross-path attribute diff that caught afl's unset _game_renderer has no second path left to diff against, so it is replaced by a static self-attribute audit: attributes a method reads that nothing in the class assigns and the built object does not carry. Same defect class, one path. check_scroll_adoption.py gains sunset_violations and a SUNSET_PLUGINS set. offending_classes is left byte-identical so its eleven pinned cases keep meaning what they mean. The existing check asks whether the fallback was INLINED and structurally cannot ask whether it still EXISTS -- it opens scroll_display.py and nothing else -- so a resurrected file or a returned guard would both pass. The set is listed rather than inferred: a plugin that never adopted legitimately has neither guard nor copy, so adding an id is the deliberate act of stating the sunset holds, in the same PR as the deletion. The self-test's most important new case is the negative one: an unrelated try/except must not read as the guard returning. This file already has two (ScrollHelper, the Pillow resample constant) and basketball has three, so a check that fired on any try/except would have failed all eight on day one. Also fixes the runner prefix: these scripts printed "FAIL name:", which run_plugin_tests.py does not match (it greps [FAIL] or FAILED), so CI reported the stream tail instead of naming the failing check. Now "[FAIL] name:". Verified both regressions are caught, by both the test and the gate: restoring the guard fails test_the_core_import_is_unguarded and trips the gate; restoring the copy fails test_the_bundled_copy_is_gone and trips it too. hockey 20/20; fleet 222 passed, 2 skipped, 1 failed -- unchanged, that failure being football's pre-existing test_favorite_live_boost.py, which reproduces on a clean origin/main. Claude-Session: https://claude.ai/code/session_014RRtqXDCnvnY6EQwhT5CV9 Co-authored-by: Claude <noreply@anthropic.com>
… here too Second resolution of this branch against main. Since the last one, #345, #347 and #348 landed, and #346 merged hockey's scroll sunset into here. Git flagged nine conflicts, all manifests and plugins.json -- no code conflicts this time. Each manifest had a new versions[] entry on BOTH sides (this branch's feature release, and main's bug-fix release on the same base), so they were merged rather than picked: every entry from both sides kept, sorted newest-first, version set to the higher of the two, and compatible_versions to the more restrictive -- which preserves hockey's >=3.2.0 from the sunset. Nothing else in any manifest differed. Verified main's recent work survived the auto-merge rather than assuming it: #347's _choose_poll is present in all eight sports.py, #345's _reset_dwell_on_reentry in football, and #348's recording logger, calendar 1.2.3/3.3.0 floor and flights script rename are all intact. **The conflict git did not flag.** check_selection_settings failed with 29 problems afterwards. Main retired the "broadcast" tier of other_games_min_quality in football-scoreboard 3.0.0 -- measured against a real Week 1 and Week 2 college slate it passed 174 of 175 games, because ESPN publishes a broadcaster for nearly everything now, ESPN+ included, so it read as a quality bar and behaved as "any". This branch predates that and still offered it in all eight lineages. The merge took main's checker and this branch's schemas, and they disagreed. Resolved by following main rather than restoring the tier: reinstating it would have shipped a setting main had already measured as useless across eight more plugins. Ported football 3.0.0's retirement verbatim -- _QUALITY_CHOICES, _normalise_quality migrating "broadcast" (and anything unusable) to "ranked" with a warning, the broadcast branch dropped from _passes_other_filters, and _note_broadcast_coverage/_broadcast_data_seen removed with it. All eight now carry exactly the six broadcast references football does, none of them a quality tier. The enum is gone from 29 schema blocks, and the eight test_favorites_are_prioritised.py files swap their broadcast-tier checks for football's migration checks. A board still holding "broadcast" gets "ranked" and a log line saying why, rather than silently getting no filtering at all. Verified: five repo gates pass, including check_selection_settings (9 plugins, 31 blocks) and both gate self-tests; fleet is 238 passed, 2 skipped, 0 failed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014RRtqXDCnvnY6EQwhT5CV9
…neages Football gained quality-filtered, rotating selection for its non-favourite slots; the eight sibling scoreboards never did. This merges that work from feat/other-games-worth-watching, keeping main's newer football fixes (#345, #347, #348) intact -- football is byte-identical to main here. Each sibling gains _passes_other_filters, _round_robin_favorites and _advance_other_games_if_due, and its _adapt_config_for_manager now passes the selection keys through. That translation is an explicit whitelist, so other_upcoming_games_to_show, other_recent_games_to_show and other_rotation_interval_seconds were declared in the schema, read by sports.py, and dropped in between -- a user could set them and nothing changed. test_settings_reach_the_manager.py guards each one. The ranked filter fails open where a league has no poll, so ufc, soccer, afl and nrl carry it inert rather than diverging from their lineage. Nine plugins soak-tested on a live board: hockey 1.22.0 has been running this code since 2026-08-31. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 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 |
Not up to standards ⛔🔴 Issues
|
| Category | Results |
|---|---|
| ErrorProne | 8 high |
🟢 Metrics 597 complexity
Metric Results Complexity 597
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.
The merged branch carried two feature versions. 1.21.0 is the selection work this PR is for; 1.22.0 is the B6 scroll-fallback sunset, which has its own PR (sunset/hockey-scroll-fallback) and raises the core floor to 3.2.0. Shipping them together would have floored every user at 3.2.0 to get a selection fix, and advertised a sunset in the manifest while the bundled copy was still present. Hockey drops to 1.21.0 at >=2.0.0; scroll_display.py, scroll_display_legacy.py and test_core_fallback.py return to main's copies; the sunset-only test_core_scroll.py and the SUNSET_PLUGINS edition of check_scroll_adoption.py go back to main's versions too. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
# Conflicts: # plugins.json # plugins/afl-scoreboard/manifest.json # plugins/baseball-scoreboard/manifest.json # plugins/basketball-scoreboard/manifest.json # plugins/hockey-scoreboard/manifest.json # plugins/lacrosse-scoreboard/manifest.json # plugins/nrl-scoreboard/manifest.json # plugins/soccer-scoreboard/manifest.json # plugins/ufc-scoreboard/manifest.json
…check
`(getattr(self, "_team_rankings_cache", None) or {}) and not ...` is
truth-identical to `getattr(...) and not ...` in all three cases -- None,
an empty dict, and a populated one -- since `{}` is falsy either way.
Codacy flagged it once per lineage, which is the whole of its "8 new
issues" on this PR.
Football expresses the same guard as `self._rankings_loaded()`; the
siblings have no such helper, so this keeps the inline form rather than
porting a method to eight copies for a one-line simplification.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
ChuckBuilds
pushed a commit
that referenced
this pull request
Sep 2, 2026
Hockey joins this PR so it is not stranded. Its sunset previously lived only in #346, which merged into #333's branch rather than main -- and #333 is superseded by #353, which does not carry the sunset. Closing #333 without this would leave hockey the one scoreboard of eight still shipping a fallback. Same change as the other seven: scroll_display_legacy.py deleted (703 lines), the guarded import collapsed to a plain one, floor raised to 3.2.0. test_core_fallback.py -> test_core_scroll.py, identical to afl's but for the Run: path. Bumped to 1.22.0 rather than 1.21.0 so it clears every version hockey currently holds anywhere: 1.20.3 on main, 1.21.0 on #353's branch. A floor is only meaningful on a version that can actually supersede what users have. SUNSET_PLUGINS now names all eight, which is the point of listing it rather than inferring it -- the set is a statement that the sunset holds, and it is now true of the whole fleet. Also brings docs/plugin-development/08-shared-sports-code.md up to date. Its sunset rule still read "Until condition 3 holds, keep the guarded try-core/except-local import", which was correct in August and is now the opposite of what the fleet does. Condition 3 holds for src.common.sports_scroll: the store refuses on all three routes in -- install_plugin (core #431/#433), the git-pull branch of update_plugin (#508) and install_from_url (#510). The rule now says to keep the guard for modules that have NOT been through a sunset, to drop it along with the copy for those that have, and to raise the floor in the same commit as the deletion. The instruction to keep it in step with the core doc "in the same PR" is corrected too: they are in different repositories, so that was never possible. Verified: all four separator-icon constants and every method survive the de-indent byte-for-byte; hockey 19 passed, 0 failed; 16 safety-harness renders pass; five repo gates pass, with check_scroll_adoption now reporting 8 sunset plugins free of a fallback; fleet 225 passed, 2 skipped, 0 failed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014RRtqXDCnvnY6EQwhT5CV9
ChuckBuilds
added a commit
that referenced
this pull request
Sep 2, 2026
…#351) * feat(sports): sunset the bundled scroll fallback in the last five afl, basketball, lacrosse, nrl and soccer. Same shape as hockey (#346), football (#349) and baseball (#350): scroll_display_legacy.py deleted, the guarded import of the core's src.common.sports_scroll collapsed to a plain one, manifests floored at 3.2.0. 3,622 lines of frozen copy removed. Checked before deleting, not after. Every orchestration method in all five frozen copies was diffed against the core's, looking for logic the core lacks: - `if not self.scroll_helper` guards -- unreachable in core, which imports ScrollHelper unguarded and always constructs one. Legacy needed them because its own import was guarded and it sets self.scroll_helper = None. - `get_dynamic_duration`'s `return 60` fallback -- same unreachable guard. - `_scroll_start_time` -- legacy reads it, core does not, but only to compute an average-FPS debug line that core produces from _fps_sample_start instead. - `get_current_leagues` returning `.copy()` vs `list()` -- identical. - `_log_scroll_progress` throttling -- core has it. - `clear()` -- core resets strictly more state. None is a behaviour the core is missing. Baseball's px/frame heuristic was the only real one across all eight, and it was handled in #350. Two tests were relying on the guard, and both are worth naming because the sunset is what exposed them: - lacrosse/test_lacrosse_plugin.py stubs the host `src` modules so the plugin imports without a core, and the list did not include src.common.sports_scroll -- the guard used to swallow that. Stubbed now, with real classes rather than None, since ScrollDisplay subclasses one at module level. - soccer/test_live_screens.py installs a stub `src` package to fake src.logo_downloader, which SHADOWED the core. So its guarded import had been falling back, and the test has been exercising the frozen copy rather than the class that ships -- since B5. The stub now carries a __path__ into the real core so only logo_downloader is faked. Driving the real class then surfaced a missing display_width on its hand-built object, which the legacy path never read. Verified: every method and class constant survives the de-indent byte-for-byte in all five, separator icons included; 112 safety-harness renders pass (24 each for afl, basketball, nrl and soccer, 16 for lacrosse); five repo gates pass; fleet is 225 passed, 2 skipped, 0 failed. SUNSET_PLUGINS names seven. Hockey is the eighth and its sunset (#346) merged into #333 rather than main, so it arrives with that branch. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014RRtqXDCnvnY6EQwhT5CV9 * feat(hockey): sunset the bundled scroll fallback, completing B6 Hockey joins this PR so it is not stranded. Its sunset previously lived only in #346, which merged into #333's branch rather than main -- and #333 is superseded by #353, which does not carry the sunset. Closing #333 without this would leave hockey the one scoreboard of eight still shipping a fallback. Same change as the other seven: scroll_display_legacy.py deleted (703 lines), the guarded import collapsed to a plain one, floor raised to 3.2.0. test_core_fallback.py -> test_core_scroll.py, identical to afl's but for the Run: path. Bumped to 1.22.0 rather than 1.21.0 so it clears every version hockey currently holds anywhere: 1.20.3 on main, 1.21.0 on #353's branch. A floor is only meaningful on a version that can actually supersede what users have. SUNSET_PLUGINS now names all eight, which is the point of listing it rather than inferring it -- the set is a statement that the sunset holds, and it is now true of the whole fleet. Also brings docs/plugin-development/08-shared-sports-code.md up to date. Its sunset rule still read "Until condition 3 holds, keep the guarded try-core/except-local import", which was correct in August and is now the opposite of what the fleet does. Condition 3 holds for src.common.sports_scroll: the store refuses on all three routes in -- install_plugin (core #431/#433), the git-pull branch of update_plugin (#508) and install_from_url (#510). The rule now says to keep the guard for modules that have NOT been through a sunset, to drop it along with the copy for those that have, and to raise the floor in the same commit as the deletion. The instruction to keep it in step with the core doc "in the same PR" is corrected too: they are in different repositories, so that was never possible. Verified: all four separator-icon constants and every method survive the de-indent byte-for-byte; hockey 19 passed, 0 failed; 16 safety-harness renders pass; five repo gates pass, with check_scroll_adoption now reporting 8 sunset plugins free of a fallback; fleet 225 passed, 2 skipped, 0 failed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014RRtqXDCnvnY6EQwhT5CV9 --------- Co-authored-by: Claude <noreply@anthropic.com>
ChuckBuilds
added a commit
that referenced
this pull request
Sep 2, 2026
* feat(football): sunset the bundled scroll fallback, floor at 3.2.0
scroll_display_legacy.py is deleted and the guarded import of the core's
src.common.sports_scroll collapses to a plain one, with the manifest floored at
3.2.0 to match. Keeping the try/except with nothing behind it would name the
missing scroll_display_legacy rather than the core module actually absent,
which is the single log line a user gets before the scoreboard stops appearing.
709 lines removed.
Football is the one plugin where this is not a pure deletion, and that deserved
measuring rather than asserting. Everywhere else the frozen copy and the live
path are method-for-method identical; here _default_game_card_width diverged.
The frozen one returns max(128, display_height * 2 + 40); the adopted one
measures the score gap with a throwaway GameRenderer and converges, which is
what stopped the score being drawn across the logos on tall cards.
Built both classes and compared across every supported panel:
panel legacy core delta
64x32 128 128 same
128x32 128 128 same
256x32 128 128 same
64x64 168 176 +8
128x64 168 176 +8
256x64 168 176 +8
128x96 232 240 +8
256x128 296 304 +8
Identical on every 32-tall panel, 8px wider on taller ones, in classic and
adaptive layout alike.
That difference only ever reached users on a pre-3.2.0 core, because everyone
on 3.2.0 or newer has been on the measured path since 2.29.0 -- the fallback
was never the modern path's behaviour. And those users keep the version they
have, since the new floor stops this one reaching them. So the population that
could observe the change is exactly the population that will not receive it: no
board changes what it draws. Recorded in the manifest notes anyway, because
"removed dead code" would be false and the next person deserves the real
answer.
test_core_fallback.py -> test_core_scroll.py, the same rewrite hockey got in
#346 (the two files were byte-identical but for the Run: path, so this is that
rewrite with one substitution). It asserts the sunset rather than the fallback:
the import is top-level and unguarded, no copy exists or is imported, the base
is the core class by identity, an old core fails naming exactly
src.common.sports_scroll, and the manifest floors at 3.2.0 or above.
check_scroll_adoption.py gains sunset_violations and SUNSET_PLUGINS, the same
gate #346 adds for hockey. offending_classes is left byte-identical so its
eleven pinned cases keep meaning what they mean. The existing check asks
whether the fallback was INLINED and structurally cannot ask whether it still
EXISTS -- it opens scroll_display.py and nothing else -- so a resurrected file
or a returned guard would both pass it silently. #346 and this PR each name
their own plugin; whichever lands second resolves a one-line conflict in the
set.
Verified: separator-icon constants and every method survive the de-indent
byte-for-byte (NFL_SEPARATOR_ICON, NCAA_FB_SEPARATOR_ICON, SCROLL_LEAGUE_KEYS,
_SCHEMA_CARD_WIDTH); 24 of 24 safety-harness renders pass across eight panel
sizes and three modes; the four repo gates pass; football's suite is 40 passed,
1 skipped, 0 failed.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014RRtqXDCnvnY6EQwhT5CV9
* feat(baseball): sunset the bundled scroll fallback, standardise on the core
The third B6 sunset, after hockey (#346) and football (#349). Same shape:
scroll_display_legacy.py deleted, the guarded import of the core's
src.common.sports_scroll collapsed to a plain one, manifest floored at 3.2.0.
Keeping the try/except with nothing behind it would name the missing
scroll_display_legacy rather than the core module actually absent, which is the
single log line a user gets before the scoreboard stops appearing. 764 lines
removed.
Baseball is the one plugin whose frozen copy carried orchestration logic the
core does not have, and that is the point of doing it deliberately rather than
by deletion. Its _configure_scroll_helper had an extra branch: when
scroll_speed * scroll_delay fell outside the 0.1-5.0 pixels-per-frame window
but scroll_speed alone sat inside it, it reinterpreted scroll_speed as
pixels-per-FRAME rather than the pixels-per-second the setting is documented
as. Verified by running both implementations:
scroll_speed delay legacy core
50.0 0.01 0.5 0.5 (the default -- agree)
1.0 0.01 1.0 0.1 10x
2.0 0.01 2.0 0.1 20x
0.5 0.01 0.5 0.1 5x
Checked across all eight lineages: baseball's was the only copy with it.
The core's behaviour is the one to keep. The branch silently ignored the unit
the setting is defined in and ran an order of magnitude faster than asked; the
core honours the configured pixels-per-second and clamps to the same window,
which is what every other scoreboard already does. Re-measured after the
collapse: baseball now matches the core exactly at every point in the range
above.
In practice this reaches nobody. The branch only ever ran on a pre-3.2.0 core;
everyone on 3.2.0 or newer has been on the core path since 1.22.0, and the new
floor stops this version reaching the rest. Recorded in the manifest anyway,
because a silently retired behaviour is worse than a documented one.
test_core_fallback.py -> test_core_scroll.py, the same rewrite hockey and
football got. SUNSET_PLUGINS grows to three.
Verified: all three separator-icon constants and every method survive the
de-indent byte-for-byte (MLB_SEPARATOR_ICON, MILB_SEPARATOR_ICON,
NCAA_BASEBALL_SEPARATOR_ICON, SCROLL_LEAGUE_KEYS, _SCHEMA_CARD_WIDTH); 24 of 24
safety-harness renders pass across eight panel sizes; the four repo gates pass;
baseball's suite is 26 passed, 0 skipped, 0 failed.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014RRtqXDCnvnY6EQwhT5CV9
* feat(sports): sunset the bundled scroll fallback in the remaining six (#351)
* feat(sports): sunset the bundled scroll fallback in the last five
afl, basketball, lacrosse, nrl and soccer. Same shape as hockey (#346),
football (#349) and baseball (#350): scroll_display_legacy.py deleted, the
guarded import of the core's src.common.sports_scroll collapsed to a plain one,
manifests floored at 3.2.0. 3,622 lines of frozen copy removed.
Checked before deleting, not after. Every orchestration method in all five
frozen copies was diffed against the core's, looking for logic the core lacks:
- `if not self.scroll_helper` guards -- unreachable in core, which imports
ScrollHelper unguarded and always constructs one. Legacy needed them because
its own import was guarded and it sets self.scroll_helper = None.
- `get_dynamic_duration`'s `return 60` fallback -- same unreachable guard.
- `_scroll_start_time` -- legacy reads it, core does not, but only to compute
an average-FPS debug line that core produces from _fps_sample_start instead.
- `get_current_leagues` returning `.copy()` vs `list()` -- identical.
- `_log_scroll_progress` throttling -- core has it.
- `clear()` -- core resets strictly more state.
None is a behaviour the core is missing. Baseball's px/frame heuristic was the
only real one across all eight, and it was handled in #350.
Two tests were relying on the guard, and both are worth naming because the
sunset is what exposed them:
- lacrosse/test_lacrosse_plugin.py stubs the host `src` modules so the plugin
imports without a core, and the list did not include src.common.sports_scroll
-- the guard used to swallow that. Stubbed now, with real classes rather than
None, since ScrollDisplay subclasses one at module level.
- soccer/test_live_screens.py installs a stub `src` package to fake
src.logo_downloader, which SHADOWED the core. So its guarded import had been
falling back, and the test has been exercising the frozen copy rather than
the class that ships -- since B5. The stub now carries a __path__ into the
real core so only logo_downloader is faked. Driving the real class then
surfaced a missing display_width on its hand-built object, which the legacy
path never read.
Verified: every method and class constant survives the de-indent byte-for-byte
in all five, separator icons included; 112 safety-harness renders pass (24 each
for afl, basketball, nrl and soccer, 16 for lacrosse); five repo gates pass;
fleet is 225 passed, 2 skipped, 0 failed.
SUNSET_PLUGINS names seven. Hockey is the eighth and its sunset (#346) merged
into #333 rather than main, so it arrives with that branch.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014RRtqXDCnvnY6EQwhT5CV9
* feat(hockey): sunset the bundled scroll fallback, completing B6
Hockey joins this PR so it is not stranded. Its sunset previously lived only in
#346, which merged into #333's branch rather than main -- and #333 is
superseded by #353, which does not carry the sunset. Closing #333 without this
would leave hockey the one scoreboard of eight still shipping a fallback.
Same change as the other seven: scroll_display_legacy.py deleted (703 lines),
the guarded import collapsed to a plain one, floor raised to 3.2.0.
test_core_fallback.py -> test_core_scroll.py, identical to afl's but for the
Run: path.
Bumped to 1.22.0 rather than 1.21.0 so it clears every version hockey currently
holds anywhere: 1.20.3 on main, 1.21.0 on #353's branch. A floor is only
meaningful on a version that can actually supersede what users have.
SUNSET_PLUGINS now names all eight, which is the point of listing it rather
than inferring it -- the set is a statement that the sunset holds, and it is
now true of the whole fleet.
Also brings docs/plugin-development/08-shared-sports-code.md up to date. Its
sunset rule still read "Until condition 3 holds, keep the guarded
try-core/except-local import", which was correct in August and is now the
opposite of what the fleet does. Condition 3 holds for src.common.sports_scroll:
the store refuses on all three routes in -- install_plugin (core #431/#433),
the git-pull branch of update_plugin (#508) and install_from_url (#510). The
rule now says to keep the guard for modules that have NOT been through a
sunset, to drop it along with the copy for those that have, and to raise the
floor in the same commit as the deletion. The instruction to keep it in step
with the core doc "in the same PR" is corrected too: they are in different
repositories, so that was never possible.
Verified: all four separator-icon constants and every method survive the
de-indent byte-for-byte; hockey 19 passed, 0 failed; 16 safety-harness renders
pass; five repo gates pass, with check_scroll_adoption now reporting 8 sunset
plugins free of a fallback; fleet 225 passed, 2 skipped, 0 failed.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014RRtqXDCnvnY6EQwhT5CV9
---------
Co-authored-by: Claude <noreply@anthropic.com>
* fix(tests): drop a dead import, and name the missing core where it is missed
Two review findings, both valid.
**`import types` was unused** in every copy of test_core_scroll.py. Inherited
rather than introduced: the original test_core_fallback.py never used it
either, and football's copy already on main carries it too. Removed from all
eight, football's included, so the eight stay byte-identical bar the `Run:`
path -- that identity is the property that makes them one rewrite replicated
rather than eight files to keep in step. It was the only F401 in the set.
**test_live_screens.py stubbed `src` even when it could not find a core.** The
stub only receives a `__path__` when discovery succeeds; without one it shadows
the real package, and scroll_display's now-unguarded import fails with
"'src' is not a package" -- naming `src` rather than the core module, which is
exactly the misleading symptom the comment three lines above warns about. It
now says so at the discovery point instead.
Skips rather than fails, exit 2 per run_plugin_tests.py's convention: no core
on the path is a "cannot run here", not a broken plugin. Verified both ways --
with a core the file passes as before, without one it exits 2 and the message
names the real cause and the fix.
Fleet 246 passed, 2 skipped, 0 failed; four gates pass.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014RRtqXDCnvnY6EQwhT5CV9
---------
Co-authored-by: Claude <noreply@anthropic.com>
ChuckBuilds
added a commit
that referenced
this pull request
Sep 2, 2026
… renders Re-lands #356, which merged but never reached main: I based it on docs/7-segment-clock-readme so it could use the render tooling before that tooling existed on main, and #355 squash-merged that branch to main *before* at since. This is the same content, cut from main instead. Documentation only; no behaviour change. The README covered roughly fifteen of the plugin's 120-odd settings, had no images, and its "Key settings" table had drifted from the schema -- it listed show_favorite_teams_only as defaulting to false (it is true), display_duration as 30 (it is 15), and showed show_odds: false in an example labelled as the defaults. Game selection gets its own section, because it is the part that surprises people. There are three distinct code paths -- no favourites, favourites exclusively, and favourites-first-then-others -- and which one runs depends on whether favorite_teams is empty and whether show_favorite_teams_only is on. Most importantly, upcoming_games_to_show and recent_games_to_show mean a per-team budget in the exclusive path and a total in the other two, so three favourites and a value of 3 is nine cards or three depending on one unrelated checkbox. Four dead ends are recorded, each verified rather than assumed: show_odds is a no-op for AFL because ESPN publishes no odds block for the league (a full finals-week payload contains zero) though it still issues one odds request per selected game; show_ranking has no poll to read; and dynamic_duration.min_duration_seconds and background_service.max_workers are in the schema but never applied. Re-verified against main rather than assumed still-current: every documented default still matches config_schema.json after #353 and #354, and the committed images re-render byte-identical against main's sports.py, which those PRs changed. The harness passes 24/24. Version bumped from main's current 1.19.0 rather than the 1.17.3 the stranded branch carried. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
ChuckBuilds
added a commit
that referenced
this pull request
Sep 2, 2026
* docs(afl-scoreboard): document every setting, with real finals-series renders Re-lands #356, which merged but never reached main: I based it on docs/7-segment-clock-readme so it could use the render tooling before that tooling existed on main, and #355 squash-merged that branch to main *before* at since. This is the same content, cut from main instead. Documentation only; no behaviour change. The README covered roughly fifteen of the plugin's 120-odd settings, had no images, and its "Key settings" table had drifted from the schema -- it listed show_favorite_teams_only as defaulting to false (it is true), display_duration as 30 (it is 15), and showed show_odds: false in an example labelled as the defaults. Game selection gets its own section, because it is the part that surprises people. There are three distinct code paths -- no favourites, favourites exclusively, and favourites-first-then-others -- and which one runs depends on whether favorite_teams is empty and whether show_favorite_teams_only is on. Most importantly, upcoming_games_to_show and recent_games_to_show mean a per-team budget in the exclusive path and a total in the other two, so three favourites and a value of 3 is nine cards or three depending on one unrelated checkbox. Four dead ends are recorded, each verified rather than assumed: show_odds is a no-op for AFL because ESPN publishes no odds block for the league (a full finals-week payload contains zero) though it still issues one odds request per selected game; show_ranking has no poll to read; and dynamic_duration.min_duration_seconds and background_service.max_workers are in the schema but never applied. Re-verified against main rather than assumed still-current: every documented default still matches config_schema.json after #353 and #354, and the committed images re-render byte-identical against main's sports.py, which those PRs changed. The harness passes 24/24. Version bumped from main's current 1.19.0 rather than the 1.17.3 the stranded branch carried. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * chore(afl-scoreboard): re-bump to 1.19.2 after the logo fix landed #357 took the plugin to 1.19.1 while this was open, so the docs bump moves to 1.19.2 and sits on top of it. Images re-verified byte-identical after the rebase; plugins.json regenerated. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
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.
Supersedes #333. Football gained quality-filtered, rotating selection for its
non-favourite slots; the eight sibling scoreboards never did. This takes #333's
sibling work and drops its football changes, which main has since moved past.
Why not just merge #333
#333 branched before #345, #347 and #348. Merging it as-is would revert
football by ~970 lines and delete four of its test files
(
test_lookahead_window_is_enforced.py,test_poll_choice.py,test_odds_text_formatting.py,test_schedule_note_uses_game_dates.py).Here football is byte-identical to main — verified on
sports.py,manifest.json, and the whole plugin tree. Only the eight siblings change.What each sibling gains
_passes_other_filters,_round_robin_favorites,_advance_other_games_if_dueother_games_min_quality/other_games_divisionsreaching the managerThat last one was a silent bug.
_adapt_config_for_manageris an explicitwhitelist, so
other_upcoming_games_to_show,other_recent_games_to_showandother_rotation_interval_secondswere declared in the schema, rendered in theweb UI, read by
sports.py, and dropped in between — a user could set them,save, and nothing changed. An AST audit across all nine plugins now reports
zero dropped selection keys;
test_settings_reach_the_manager.pyguards each.The ranked filter fails open where a league has no poll, so ufc, soccer, afl
and nrl carry it inert rather than diverging from their lineage (doc 08).
Baseball also gets the rankings-endpoint fix football took in #347: its
fetch_standingstried/standingsfirst, which college baseball answers 200with no
rankingskey, so the/rankingsfallback never fired and NCAAbaseball rankings never loaded. It now selects the endpoint by league.
Verification
lacrosse 16/16, and 24/24 each for baseball, basketball, ufc, soccer, afl,
nrl. Zero failures.
mainproduces, all pre-existing and unrelated (missingRGBMatrixEmulator,an interactive prompt, and two untouched plugins). No regressions.
check_selection_settings.py: OK, 9 plugins, 31 selection blocks.check_module_collisions.py: OK across 43 plugins.versionin sync withversions[0];plugins.jsonregenerated by
update_registry.py.2026-08-31, driving the busiest mode on the display.
Follow-ups, not in scope here
fetch_standingscopies still disagree on how they pick anendpoint — football and baseball now select by league, hockey and lacrosse
always hit
/rankings, and basketball/soccer/afl/nrl use a hardcoded collegeallowlist. All of them work today; converging them is a separate change.
capabilities/rotation.py, absorbed during B5 adoption. Core's B4compatibility gate is not shipped and B5 has not started, so that does not
block this.
🤖 Generated with Claude Code