Skip to content

fix: plugin asset paths that miss on the Pi's case-sensitive filesystem (leaderboard 1.5.6, baseball 1.57.1, basketball 1.42.1, hockey 1.42.3) - #614

Merged
ChuckBuilds merged 1 commit into
mainfrom
fix/case-sensitive-asset-paths
Oct 4, 2026
Merged

ChuckBuilds merged 1 commit into
mainfrom
fix/case-sensitive-asset-paths

Conversation

@ChuckBuilds

Copy link
Copy Markdown
Owner

What was broken

On the Pi (ext4), nfl.png and NFL.png are different files. Windows and macOS treat them as the same file, so these paths worked on a dev box and missed on every board.

Plugin Path it named What the core ships Seen on
leaderboard nfl_logos/nfl.png, mlb_logos/mlb.png, nhl_logos/nhl.png, nba_logos/nba.png NFL.png, MLB.png, NHL.png, NBA.png hdpi: 3 warnings/hour, blank logo column
leaderboard ncaa_womens_logos/ncaaw.png nothing (latent)
baseball milb_logos/MiLB.png, ncaa_logos/ncaa_baseball.png nothing ledpi: warning on every load
basketball ncaa_logos/NCAA.png, wnba_logos/WNBA.png ncaam.png (NCAA basketball badge); no WNBA icon (latent)
hockey ncaa_logos/ncaa_hockey.png ncaah.png (NCAA hockey badge) silent: NCAA hockey had no separator

Why the leaderboard broke: core shipped both spellings until ChuckBuilds/LEDMatrix#506 (in v3.3.0) dropped the lowercase copies. That PR checked core's own tree, but the leaderboard lives in this repo. Uppercase has shipped since April 2025, so the fix works on every core at or above the leaderboard's 3.4.0 floor.

Fixes

  • leaderboard 1.5.6: league logos are spelled as shipped. NCAA women's basketball borrows the NCAA basketball badge (ncaam.png), the same one the men's poll uses. A missing league logo now warns once per path, then logs at debug. Before, every rebuild warned, because misses are deliberately not cached.

  • baseball 1.57.1 — the separator decision: the missing separators are skipped quietly at debug, which matches afl/nrl/soccer's existing (will skip separator). I ruled out the other two options:

    • Point at an existing asset: there isn't a fitting one. Core's NCAA badges show a basketball player (ncaam.png) or a hockey player (ncaah.png), which would mislabel a baseball league. Using MLB.png for MiLB or college games would mislabel them too.
    • Ship an icon: that means drawing a MiLB/NCAA-baseball mark in this repo, which is a design task, not a path fix.

    The paths stay as drop-ins, so adding either file to the LEDMatrix install turns that separator on. The README says so.

  • basketball 1.42.1 / hockey 1.42.3: these are the sibling copies of the same separator code. Their NCAA separators now use the badges core actually ships, so college slates get a separator again. Basketball's missing WNBA icon drops to debug, the same as baseball's.

  • docs/assets/ledmatrix-leaderboard/shots.json and test_pixel_perfect.py had the same nfl.png. Neither needs re-rendering: the docs images were made on a case-insensitive host, so they already show the logo.

Tests

Every new test fails on main and passes here. All were checked against a fresh git archive of core main.

  • scripts/test_core_asset_paths.py (a repo-level guard, so it runs on every PR):
    • Fails on any quoted assets/... literal in plugin code/JSON or docs fixtures that exists in core (or the plugin dir) only under a different case. It compares against os.listdir(), so it catches this on Windows too. On main it flags all four leaderboard paths and shots.json.
    • Fails on any *_SEPARATOR_ICON that neither ships with core nor appears in UNSHIPPED_SEPARATOR_ICONS. That's the hockey case: it was silent and could only be caught by a declaration. An allowlist entry that core starts shipping also fails, so the list only shrinks.
  • ledmatrix-leaderboard/test_league_logo_paths.py: every league's logo matches a shipped file's exact case (ncaa_baseball is the declared exception), and three rebuilds with two missing paths produce exactly two warnings.
  • {baseball,basketball,hockey}-scoreboard/test_separator_icons.py: each builds the real ScrollDisplay with cwd at core and asserts:
    • which separators load, at height - 4
    • which are skipped
    • that nothing about separators is logged above debug

Verification

  • On ext4 (WSL Ubuntu) against core main's files: all 7 old paths miss and all 6 new ones resolve. This is the Pi's behaviour, which a Windows run can't show.
  • Safety harness (check_plugin.py, core main): all four plugins PASS at every size. The leaderboard render now shows the NFL shield.
  • run_plugin_tests.py on the four plugins: 139 pass, 1 fail. The failure is baseball-scoreboard/test_odds_placement.py (2 cases, y=8 at 64x32). It fails the same way on unpatched main against the same core, so it isn't from this PR.
  • check_version_bump.py --base origin/main with the four ids: PASS. update_registry.py --check, check_module_collisions.py, check_manifests_ascii.py and check_sports_drift.py: all pass.

Not in this PR

ufc-scoreboard still warns on load about ufc_logos/UFC.png. Core doesn't ship it; the plugin's generate_placeholder_icon.py has to be run by hand. It's declared in the guard's allowlist and left for a separate change.

🤖 Generated with Claude Code

leaderboard 1.5.6: league_config named nfl.png, nba.png, mlb.png and
nhl.png while the core ships NFL.png etc. Core 3.3.0 (#506) dropped the
lowercase duplicates, so on a Pi those leagues drew a blank logo column
and warned on every rebuild (hdpi: three warnings an hour). A Windows
checkout finds either spelling, which hid it. NCAA women's basketball now
uses the core's NCAA basketball badge (ncaaw.png never shipped). The core
has no NCAA baseball logo, so that column stays blank. A missing league
logo is now warned once per path, then logged at debug.

baseball 1.57.1: the core ships no MiLB or NCAA baseball icon, and its
NCAA badges show a basketball or hockey player, so those separators are
skipped at debug instead of warning on every load (ledpi). Adding the file
at either path still turns that separator on.

basketball 1.42.1 and hockey 1.42.3 had the same bug. Their NCAA
separators named NCAA.png and ncaa_hockey.png, neither of which the core
has ever shipped. They now use the core's ncaam.png and ncaah.png badges.
Basketball's missing WNBA icon drops to debug as well.

Tests: scripts/test_core_asset_paths.py fails on any assets/ literal that
exists in the core only under another case (it compares against listdir,
so it works on Windows too). It also fails on any separator icon that
neither ships with the core nor is declared as a drop-in. Per-plugin
tests cover the leaderboard's logo paths and warn-once behaviour, and
build each scoreboard's real ScrollDisplay. Every one of them fails on
main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d392bc2a-7163-4944-b8b6-a8084a1a0220
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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 144 complexity

Metric Results
Complexity 144

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.

@ChuckBuilds
ChuckBuilds merged commit c202cd9 into main Oct 4, 2026
5 checks passed
@ChuckBuilds
ChuckBuilds deleted the fix/case-sensitive-asset-paths branch October 4, 2026 17:12
ChuckBuilds added a commit that referenced this pull request Oct 4, 2026
#614 (case-sensitive asset paths) released baseball-scoreboard 1.57.1
while this branch was open. Keep its 1.57.1 entry and put this change's
comment fix on top as 1.57.2; plugins.json regenerated with
update_registry.py.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant