Skip to content

fix(sports): repair scroll mode broken by the core-scroll adoption - #251

Merged
ChuckBuilds merged 1 commit into
mainfrom
fix/scroll-adoption-missing-attributes
Aug 5, 2026
Merged

fix(sports): repair scroll mode broken by the core-scroll adoption#251
ChuckBuilds merged 1 commit into
mainfrom
fix/scroll-adoption-missing-attributes

Conversation

@ChuckBuilds

@ChuckBuilds ChuckBuilds commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Scroll mode does not work on a 3.2.0 core in four of the eight plugins that adopted the core scroll orchestration. The restructure lifted the content methods verbatim but left behind state their bodies read off self.

plugin what was left behind symptom on a 3.2.0 core
hockey, basketball, lacrosse separator-icon path constants AttributeError in __init__ — the scroll display could not be constructed at all
afl _game_renderer / _game_renderer_card_width prepare_scroll_content raised on its first line

afl is the one with no visible symptom: the core base catches exceptions out of prepare_scroll_content, so scroll mode simply rendered nothing.

Switch mode and the pre-3.2.0 fallback path were never affected — which is why all 168 harness renders are byte-for-byte identical across this change.

Why every gate missed it

The safety harness renders the scoreboard screens, not scroll mode. test_core_fallback.py checked that methods existed and that their globals resolved — but self.NHL_SEPARATOR_ICON is an attribute read, invisible to an AST scan for Name loads. Both gates were green on code that could not draw.

So the fallback test stops proving things about the source and builds the object instead:

  • construct ScrollDisplay and ScrollDisplayManager on both paths and compare the separator icons they end up with — catches anything that makes __init__ raise;
  • assert the adopted class ends up with every instance attribute the bundled one sets — construction alone cannot catch the afl bug, since the object builds fine and only fails later.

Both checks were mutation-tested: removing each constant, and removing the renderer-cache initialisation, makes that plugin's suite fail with the attribute named.

Verification

  • 8/8 fallback suites pass. The 5 remaining plugin-test failures are the known pre-existing stale-test tranche, none scroll-related.
  • 168/168 harness renders byte-identical to before the fix.
  • Scroll strips rendered from identical synthetic games are pixel-identical between the core and fallback paths in all 8 plugins.
  • Driven end to end against live data, the two paths agree on frames drawn, cached game types, dynamic duration, separator icons and Vegas item counts in all 6 plugins that had games available.

Versions: hockey 1.7.1, basketball 1.10.1, lacrosse 1.7.1, afl 1.3.1 carry the fix; baseball 1.22.1, football 2.11.1, soccer 2.6.1, nrl 1.3.1 are test-only.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Udr6MfaFLUPhX5Fgo67Jf5

Summary by CodeRabbit

  • Bug Fixes

    • Fixed scroll-mode startup issues on LEDMatrix 3.2.0 across supported scoreboard plugins.
    • Improved separator-icon handling for basketball, hockey, lacrosse, and AFL displays.
    • Preserved existing switch-mode and fallback behavior.
  • Tests

    • Added coverage validating display construction, separator icons, and initialization across supported display paths.
  • Chores

    • Updated the plugin catalog timestamp and incremented versions for eight scoreboard plugins.

Scroll mode did not work on a 3.2.0 core in four of the eight plugins that
adopted the core orchestration. The restructure lifted the content methods
verbatim but left behind state their bodies read off `self`:

  hockey, basketball, lacrosse  separator-icon path constants stayed on the
                                legacy class. `_load_separator_icons` reads
                                them, and the core base calls it from
                                `__init__` -- so the scroll display could not
                                be constructed at all.

  afl                           the game-renderer cache (`_game_renderer`,
                                `_game_renderer_card_width`) was seeded by the
                                legacy `__init__` and by nothing in the new
                                one. `prepare_scroll_content` opens by reading
                                it, so it raised on its first line.

afl is the one that had no symptom: the core base catches exceptions out of
`prepare_scroll_content`, so scroll mode just rendered nothing and logged.

Switch mode and the fallback path were never affected, which is why all 168
harness renders stay byte-for-byte identical across this change.

Why every gate missed it
------------------------
The safety harness renders the scoreboard screens, not scroll mode.
`test_core_fallback.py` checked that methods existed and that their *globals*
resolved -- but `self.NHL_SEPARATOR_ICON` is an attribute read, invisible to an
AST scan for Name loads. Both gates were green on code that could not draw.

So the fallback test now stops proving things about the source and builds the
object instead:

  * construct ScrollDisplay and ScrollDisplayManager on the core path and on
    the fallback path, and compare the separator icons they end up with. This
    catches anything that makes `__init__` raise.
  * assert the adopted class ends up with every instance attribute the bundled
    one sets. Construction alone cannot catch the afl bug -- the object builds
    fine and only fails later, when a lifted method reads what was never set.

Both checks were mutation-tested: removing each constant, and removing the
renderer-cache initialisation, makes the corresponding plugin's suite fail with
the attribute named.

Verification
------------
  * 8/8 fallback suites pass; the 5 remaining plugin-test failures are the
    known pre-existing stale-test tranche, none scroll-related.
  * 168/168 harness renders byte-identical to before the fix.
  * Scroll strips rendered from identical synthetic games are pixel-identical
    between the core and fallback paths in all 8 plugins.
  * Driven end to end against live data, core and fallback agree on frames,
    cached game types, dynamic duration, separator icons and Vegas item counts
    in all 6 plugins that had games available.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Udr6MfaFLUPhX5Fgo67Jf5
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 3e9662aa-334d-4695-9a38-4fc37972e1b7

📥 Commits

Reviewing files that changed from the base of the PR and between d8db5b2 and 702a4e0.

📒 Files selected for processing (21)
  • plugins.json
  • plugins/afl-scoreboard/manifest.json
  • plugins/afl-scoreboard/scroll_display.py
  • plugins/afl-scoreboard/test_core_fallback.py
  • plugins/baseball-scoreboard/manifest.json
  • plugins/baseball-scoreboard/test_core_fallback.py
  • plugins/basketball-scoreboard/manifest.json
  • plugins/basketball-scoreboard/scroll_display.py
  • plugins/basketball-scoreboard/test_core_fallback.py
  • plugins/football-scoreboard/manifest.json
  • plugins/football-scoreboard/test_core_fallback.py
  • plugins/hockey-scoreboard/manifest.json
  • plugins/hockey-scoreboard/scroll_display.py
  • plugins/hockey-scoreboard/test_core_fallback.py
  • plugins/lacrosse-scoreboard/manifest.json
  • plugins/lacrosse-scoreboard/scroll_display.py
  • plugins/lacrosse-scoreboard/test_core_fallback.py
  • plugins/nrl-scoreboard/manifest.json
  • plugins/nrl-scoreboard/test_core_fallback.py
  • plugins/soccer-scoreboard/manifest.json
  • plugins/soccer-scoreboard/test_core_fallback.py
 ___________________________________________________________
< GPU shortage? The only thing I fear is a carrot shortage. >
 -----------------------------------------------------------
  \
   \   \
        \ /\
        ( )
      .( o ).
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/scroll-adoption-missing-attributes

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 128 complexity

Metric Results
Complexity 128

View in Codacy

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.

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 3e9662aa-334d-4695-9a38-4fc37972e1b7

📥 Commits

Reviewing files that changed from the base of the PR and between d8db5b2 and 702a4e0.

📒 Files selected for processing (21)
  • plugins.json
  • plugins/afl-scoreboard/manifest.json
  • plugins/afl-scoreboard/scroll_display.py
  • plugins/afl-scoreboard/test_core_fallback.py
  • plugins/baseball-scoreboard/manifest.json
  • plugins/baseball-scoreboard/test_core_fallback.py
  • plugins/basketball-scoreboard/manifest.json
  • plugins/basketball-scoreboard/scroll_display.py
  • plugins/basketball-scoreboard/test_core_fallback.py
  • plugins/football-scoreboard/manifest.json
  • plugins/football-scoreboard/test_core_fallback.py
  • plugins/hockey-scoreboard/manifest.json
  • plugins/hockey-scoreboard/scroll_display.py
  • plugins/hockey-scoreboard/test_core_fallback.py
  • plugins/lacrosse-scoreboard/manifest.json
  • plugins/lacrosse-scoreboard/scroll_display.py
  • plugins/lacrosse-scoreboard/test_core_fallback.py
  • plugins/nrl-scoreboard/manifest.json
  • plugins/nrl-scoreboard/test_core_fallback.py
  • plugins/soccer-scoreboard/manifest.json
  • plugins/soccer-scoreboard/test_core_fallback.py

📝 Walkthrough

Walkthrough

The pull request fixes core scroll-display initialization and separator-icon compatibility across scoreboard plugins. It adds cross-path construction tests, broadens test failure handling, updates plugin versions, and records the releases.

Changes

Scroll display compatibility

Layer / File(s) Summary
Core scroll-display initialization and assets
plugins/afl-scoreboard/scroll_display.py, plugins/basketball-scoreboard/scroll_display.py, plugins/hockey-scoreboard/scroll_display.py, plugins/lacrosse-scoreboard/scroll_display.py
AFL initializes renderer cache attributes before content preparation. Basketball, hockey, and lacrosse define separator-icon paths required by core scroll-display loading.
Core and fallback construction tests
plugins/*-scoreboard/test_core_fallback.py
The tests construct core and fallback displays, trigger manager creation, compare separator icons, check initialized attributes, and report all exceptions as failures.
Catalog and release metadata
plugins.json, plugins/*-scoreboard/manifest.json
The catalog date and affected plugin versions are updated. Manifest release entries document the scroll-display fixes and test coverage.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the primary change: repairing sports-plugin scroll mode after core-scroll adoption.
Docstring Coverage ✅ Passed Docstring coverage is 90.32% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/scroll-adoption-missing-attributes

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ChuckBuilds
ChuckBuilds merged commit 99b8c99 into main Aug 5, 2026
4 checks passed
@ChuckBuilds
ChuckBuilds deleted the fix/scroll-adoption-missing-attributes branch August 5, 2026 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants