Repository navigation
scoreboards: one game-over check across all nine, with a FINAL_PERIOD seam (family 5 reconcile) - #625
Merged
Merged
Conversation
…ith FINAL_PERIOD (family 5)
Step 4 of LEDMatrix docs/SPORTS_UNIFICATION.md ("reconcile, then promote")
for the game-over check. The nine SportsLive._is_game_really_over copies
were five bodies; they are now one, byte-identical, and the drift report
shows one variant. The per-sport fact is a class attribute on each
plugin's SportsLive, FINAL_PERIOD: the period from which a 0:00 clock ends
a game -- hockey 3; basketball, football, lacrosse 4; None (the clock never
does) for afl, nrl, soccer (clocks count up), baseball (innings) and ufc.
Differences, classified:
- Fix ported: only a non-empty clock string counts for the clock rule
(baseball/ufc read a missing/None/non-string clock as 0:00).
- Owner decision: a score level at 0:00 is not over -- the game stays live
through the break before overtime; a game that really ends tied still
ends on its final text/status. A missing or unreadable score leaves the
decision to the clock, as before.
- Owner decision: ufc has no clock rule (FINAL_PERIOD None); a bout ends
only on ESPN's final.
- Noise: one docstring and one log wording; the [LIVE_PRIORITY_DEBUG]
lines in the football/baseball/ufc copies are gone (nothing reads them).
- Baseball's BaseballLive postponed/suspended override is unchanged.
scripts/test_game_over_check.py (#621) tables regenerated with --print.
Of 3,115 cells only these changed, all over -> not over: ufc 65 (no clock
rule), baseball 53 (FINAL_PERIOD None; every one a game with a period,
which baseball's games never carry, so dormant in practice), and the tie
guard's 5 (basketball 1, football 1, lacrosse 1, hockey 2). Harness
renders of all nine against core main: 192 PNGs byte-identical.
Plugin tests follow the decisions: the null-period stand-ins carry
FINAL_PERIOD; each clock sport pins a tie at 0:00; baseball/ufc pin that
0:00 no longer ends a game; the vegas tie tests (basketball, hockey,
lacrosse) now expect the level game to stay live; ufc's derived "R5 0:00"
fight stays live until ESPN calls it final.
Patch bump for all nine (released 2026-10-05, floors unchanged),
CHANGELOG entries, registry updated, drift baseline drops the entry.
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 | 0 |
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 5, 2026
ChuckBuilds
added a commit
that referenced
this pull request
Oct 5, 2026
…ly 5 adopt) (#631) * scoreboards: inherit core's SportsGameOverMixin; drop the game-over copies (family 5) Core 3.8.1 ships src.common.sports_game_over, whose SportsGameOverMixin._is_game_really_over is the body the nine copies were reconciled to in #625. Each plugin's SportsLive now inherits it, listed before SportsLiveSharedMixin (the order core documents and tests), keeps its FINAL_PERIOD declaration and deletes its copy. The import is plain; the next commit floors every plugin on 3.8.1. Baseball keeps BaseballLive._is_game_really_over, the postponed/suspended check; its super() call now reaches core's method. No behaviour change: scripts/test_game_over_check.py gives the same 3,115 answers, and every harness render is byte-identical. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * scoreboards: floor on core 3.8.1 (minor bumps) afl 1.36.0, baseball 1.58.0, basketball 1.43.0, football 3.19.0, hockey 1.43.0, lacrosse 1.37.0, nrl 1.35.0, soccer 2.40.0, ufc 1.20.0. versions[0].ledmatrix_min_version and compatible_versions rise to 3.8.1, the first release that ships src.common.sports_game_over, which the previous commit imports plainly. A floor raise is a minor bump, as for the 3.7.0 and 3.8.0 raises before it. plugins.json regenerated with update_registry.py. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * scripts: sunset guard for the game-over copies scripts/test_game_over_mixin_copies.py, in the shape of the stage 3 and stage 4 guards. For each of the nine scoreboards it fails when: - a runtime file defines _is_game_really_over again (any class, or module level), except baseball's BaseballLive, which must call super(); - sports.py's import of SportsGameOverMixin is missing, aliased or inside a try that catches ImportError; - SportsLive does not inherit the mixin, or lists it after SportsLiveSharedMixin; - SportsLive's FINAL_PERIOD is not the owner's value (hockey 3; basketball, football and lacrosse 4; the rest None), or another class sets it; - with a core checkout, the mixin defines anything but the method and FINAL_PERIOD. A self-check plants each failure. CI picks it up through the scripts/test_*.py glob in test-plugins.yml. The shared sports code page records the 3.8.1 convergence. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * scripts: date the modules core v3.8.1 ships Core v3.8.1 (a669d781) is tagged. Every None entry in the min-core table is in it (checked with git show v3.8.1:<path>): fetch_service, sports_game_over, display_arbiter, screen_runner and plugin_local_files are now "3.8.1", and the test's tag list gains 3.8.1, so its tag section checks them. v3.8.1 reports __version__ "3.8.1"; REPORTED_AS needs no entry. This clears check_min_core_version for the scoreboards' plain import of src.common.sports_game_over. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.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.
Step 4 of the "reconcile, then promote" procedure for family 5, the game-over check
SportsLive._is_game_really_over. All nine copies are now byte-identical; the drift report shows one variant. Each plugin declares the per-sport fact asFINAL_PERIOD: Optional[int]on itsSportsLive:None, meaning the clock never ends a gameOwner decisions (2026-10-04)
FINAL_PERIODonly. TheCLOCK_COUNTS_DOWNdescribed in core's docs was never in code; the companion core PR removes it.-) nor a ticking 0:00 ends it.BaseballLive.[LIVE_PRIORITY_DEBUG]lines are dropped from the three copies that had them; nothing tested or documented them.What changes
All changes go from over to not-over, in the 3,115 cells pinned by
scripts/test_game_over_check.py(#621):FINAL_PERIOD = None. Every changed cell is a synthetic game with aperiodkey, which real baseball games never carry, so nothing changes in practiceScores arrive as strings. A missing, empty or non-integer score counts as "not a tie", so the clock decides as before.
Tests updated for the decided changes:
test_null_period_really_overstand-ins.test_vegas_elementscases that had pinned "a tied game is dropped from live".Versions: patch bumps with
versions[]entries; the minimum core version stays at 3.8.0. afl 1.35.3, baseball 1.57.3, basketball 1.42.2, football 3.18.8, hockey 1.42.4, lacrosse 1.36.4, nrl 1.34.3, soccer 2.39.5, ufc 1.19.5.Verification
All runs use core main.
run_plugin_tests.pygives the same result per test as main, 346 passed. The 2 failures happen on main too: baseballtest_baseball_activityand the interactivetest_football_plugin.scripts/test_*.pypass.check_sports_driftpasses, with only this method's baseline entry removed.check_version_bump --base origin/mainpasses naming all nine ids, and the registry is updated.The next step is the core PR, which adds
src/common/sports_game_over.py(SportsGameOverMixin) with this body and a parity test against these copies.🤖 Generated with Claude Code