Skip to content

nrl-scoreboard: four manager.py fallbacks disagree with their schema defaults #427

Description

@ChuckBuilds

plugins/nrl-scoreboard/manager.py translates the plugin config into the sub-managers' config, and four of its .get() fallbacks differ from what config_schema.json declares:

Key Schema default manager.py fallback
recent_games_to_show 1 5
upcoming_games_to_show 1 10
show_odds true False
update_interval_seconds 3600 300

The fallback only applies when the key is absent, and the web UI writes schema defaults on save, so a config written through the UI never hits it. It bites a hand-written or partial config — and a fresh install before the settings have been saved once.

show_odds and update_interval_seconds are the ones that change behaviour: odds off when the schema says on, and a 5-minute fetch cadence when the schema says an hour.

Fix is to make the fallbacks match the schema. Whether that is PATCH or MINOR depends on whether anyone is relying on the current behaviour for a partial config; I'd call it PATCH since the schema is the documented contract.

Found while documenting the plugin (#425). Worth checking the sibling scoreboards for the same drift — they share the translation shape.

🤖 Generated with Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions