Skip to content

lacrosse-scoreboard: defaults.display_duration fallback disagrees with the schema, and game_display_duration is undeclared #429

Description

@ChuckBuilds

Two small gaps in plugins/lacrosse-scoreboard/manager.py, both in the defaults block handling.

1. display_duration fallback is 30, schema says 15

# manager.py:146
self.display_duration = float(defaults.get("display_duration", config.get("display_duration", 30)))

config_schema.json declares defaults.display_duration with "default": 15. The fallback only fires when the key is absent — a hand-written or partial config, or a fresh install before settings have been saved once — and then games hold the screen for twice as long as the schema promises.

2. game_display_duration is read but never declared

# manager.py:147
self.game_display_duration = float(defaults.get("game_display_duration", config.get("game_display_duration", 15)))

There is no defaults.game_display_duration (or root game_display_duration) anywhere in config_schema.json, so it never appears in the web UI and its value is always the hardcoded 15. defaults does not set additionalProperties: false, so a hand-edited config could set it, but nothing documents that it exists.

Either declare it in the schema so the UI can offer it, or drop the lookup and use the constant — whichever matches the intent. The sibling scoreboards declare game_display_duration at the config root, which suggests this one was meant to as well.

Fix for both is PATCH; the schema is the documented contract and neither path is reachable from a UI-written config.

Found while documenting the plugin (#428). Related: #427, the same class of drift in nrl-scoreboard.

🤖 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