Skip to content

fix(football): has_live_content() gates celebrations on live_priority - #630

Merged
ChuckBuilds merged 1 commit into
mainfrom
fix/football-celebration-gate
Oct 5, 2026
Merged

ChuckBuilds merged 1 commit into
mainfrom
fix/football-celebration-gate

Conversation

@ChuckBuilds

Copy link
Copy Markdown
Owner

Problem

Follow-up to #629. In football-scoreboard, get_live_modes() returns a celebrating league's live mode only when that league is enabled with live_priority on. has_live_content(), though, counted a celebration in any enabled league. With live priority off for that league, the controller saw live content with no football live mode to go with it, and fell back to whichever *_live mode name it was scanning.

Fix

has_live_content() now calls _get_active_celebration_manager(live_priority_only=True), which skips leagues whose registry live_priority is off. Baseball and hockey got the same gate in #629. The default is False, matching football's config default. needs_high_fps and the display takeover still use the ungated lookup, so nothing changes there. A test stub in test_live_content_log_throttle.py that overrode the helper now accepts the new keyword.

Version

  • football-scoreboard 3.18.8 -> 3.18.9, with a new versions[] entry and a CHANGELOG entry. plugins.json is regenerated.

Tests

The new test_celebration_is_a_live_mode.py has 10 cases, parametrized over NFL and NCAA FB:

  • a celebration with an empty live list returns that league's live mode, and has_live_content() agrees;
  • a celebration plus a live game lists the mode once;
  • with the league disabled, or live_priority off, neither method reports the celebration.

Mutation checks: each change, removed on its own, fails the new tests.

Change removed Failing tests
new gate 2
football's existing celebration branch 3
football's existing dedupe 2

run_plugin_tests.py (core main c20c0be), branch vs main:

Branch Main
66 pass, 1 fail 65 pass, 1 fail

The failure is test_football_plugin.py on both: it stops at an interactive "run a 30-second emulator test? (y/n)" prompt.

Guards:

  • All 48 scripts/test_*.py pass.
  • check_sports_drift passes with no baseline change.
  • These checks also pass: module collisions, scroll adoption, display contract, secrets template, manifests ascii, min-core, helpers parity, selection settings, team pickers, UI companion keys, core API signatures, readme previews, manifest version fields, update_registry.py --check, check_version_bump.py --base origin/main football-scoreboard.
  • The core check_plugin.py safety harness passes.

🤖 Generated with Claude Code

get_live_modes() only returns a celebrating league's live mode when that
league is enabled with live_priority on, but has_live_content() counted a
celebration in any enabled league. With live priority off for that league
the controller saw live content and got no mode of this plugin for it.

has_live_content() now asks _get_active_celebration_manager(
live_priority_only=True), the same gate baseball and hockey got in #629.
needs_high_fps and the display takeover keep the ungated lookup.

football-scoreboard 3.18.9.

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

coderabbitai Bot commented Oct 5, 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: b7eef814-430a-4a59-8b95-49acfe183b1b
  • 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 13 complexity

Metric Results
Complexity 13

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 7b23293 into main Oct 5, 2026
5 checks passed
@ChuckBuilds
ChuckBuilds deleted the fix/football-celebration-gate branch October 5, 2026 14:18
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