A hub-only game seen live stays listed through its breaks (#181) #183

Merged
cmoriarty merged 1 commit from hub-live-through-break into main 2026-11-16 17:09:59 -05:00
Owner

Fixes #181.

The fault

On 2026-11-16 three UEFA Nations League games listed only by sportsurge left the site's list as halftime began. The hub read went from 51 rows to 41, and the games never came back.

  • Their background channels closed, and Emby's and Jellyfin's guides dropped them.
  • Swap and Play answered "the game is over".
  • A watched channel would have been torn down mid-second-half, when its post-game grace ran out.

The site's page was not read, so whether the site removed the rows or relabelled them is not known. This fix holds either way.

The fix

The list remembers the hub-only games it has listed as live. Such a game stays listed as live, keeping its id, start and sources, in two cases:

  • its row leaves the page;
  • its row shows a label that does not say the game is over, a break such as "HT". hub.says_over is true only for a full-time label, a score, or a word for a game called off.

The hold ends at the game's start plus its sport's usual length, unless a feed reports it final or its row says it is over. The usual length comes from the guide's table, which moved from feed.py to games.ESTIMATED_LENGTHS: soccer 2 h 15 min, three hours for a sport the app does not know. While a game is remembered, the merged list is also rebuilt each minute, so a kept game leaves on time.

  • The parser still counts every label as finished. A hub row now keeps the label it read (HubGame.label).
  • ESPN-listed games were never affected: their row match ignores finished.
  • The live-game-list spec says so:
    • a new requirement, "A hub-only game seen live stays listed when its row leaves the page";
    • a new requirement, "A break keeps a game seen live listed";
    • the label requirement keeps the exception for a break;
    • the rebuild requirement names the minute.

Checks

  • Three new tests in test_hub.py, each failing on main's code:
    • a row that leaves the page keeps its game listed until soccer's usual length after its start;
    • an "HT" label keeps the game listed, and "FT" ends it;
    • a feed's final ends a kept game.
  • openspec validate live-game-list --type spec --strict: the same three warnings as on main (requirements longer than 500 characters there already), none added.
  • make test: 1,491 passed, 1 skipped.

🤖 Generated with Claude Code

Fixes #181. ## The fault On 2026-11-16 three UEFA Nations League games listed only by sportsurge left the site's list as halftime began. The hub read went from 51 rows to 41, and the games never came back. - Their background channels closed, and Emby's and Jellyfin's guides dropped them. - Swap and Play answered "the game is over". - A watched channel would have been torn down mid-second-half, when its post-game grace ran out. The site's page was not read, so whether the site removed the rows or relabelled them is not known. This fix holds either way. ## The fix The list remembers the hub-only games it has listed as live. Such a game stays listed as live, keeping its id, start and sources, in two cases: - its row leaves the page; - its row shows a label that does not say the game is over, a break such as "HT". `hub.says_over` is true only for a full-time label, a score, or a word for a game called off. The hold ends at the game's start plus its sport's usual length, unless a feed reports it final or its row says it is over. The usual length comes from the guide's table, which moved from `feed.py` to `games.ESTIMATED_LENGTHS`: soccer 2 h 15 min, three hours for a sport the app does not know. While a game is remembered, the merged list is also rebuilt each minute, so a kept game leaves on time. - The parser still counts every label as finished. A hub row now keeps the label it read (`HubGame.label`). - ESPN-listed games were never affected: their row match ignores `finished`. - The live-game-list spec says so: - a new requirement, "A hub-only game seen live stays listed when its row leaves the page"; - a new requirement, "A break keeps a game seen live listed"; - the label requirement keeps the exception for a break; - the rebuild requirement names the minute. ## Checks - Three new tests in `test_hub.py`, each failing on `main`'s code: - a row that leaves the page keeps its game listed until soccer's usual length after its start; - an "HT" label keeps the game listed, and "FT" ends it; - a feed's final ends a kept game. - `openspec validate live-game-list --type spec --strict`: the same three warnings as on `main` (requirements longer than 500 characters there already), none added. - `make test`: 1,491 passed, 1 skipped. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
On 2026-11-16 three Nations League games listed only by sportsurge left
the site's list as halftime began (the hub read went from 51 rows to 41)
and never came back. Their background channels closed, the media
servers' guides dropped them, Swap answered "the game is over", and a
watched channel would have been torn down mid-second-half when its
post-game grace ran out.

The list now remembers the hub-only games it listed as live. Such a
game stays listed, live, with its id, start and sources:
- when its row leaves the page;
- when its row shows a label that does not say the game is over (a
  break such as "HT": hub.says_over is false for anything but a
  full-time label, a score or a word for a game called off);
until its start plus its sport's usual length (the guide's table, moved
from feed.py to games.ESTIMATED_LENGTHS), unless a feed reports it final
or its row says it is over. While a game is remembered the merged list
is rebuilt each minute as well, so a kept game leaves on time.

The parser still counts every label as finished; the hub row now keeps
the label it read. The live-game-list spec says so, with scenarios and
their tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
cmoriarty/sports-breaker!183
No description provided.