A game is listed twice when thetvapp spells a school otherwise (BYU, UL Monroe, IUPUI) #196

Closed
opened 2026-11-18 20:33:38 -05:00 by cmoriarty · 1 comment
Owner

What happens

The owner, 2026-11-18, with a screenshot of the Games page: "Looks like there's a duplicate. This has happened 2 other times now."

The live game list at about 01:15Z on 2026-11-19 showed three games twice. Each time, a thetvapp row was listed as its own entry beside the ESPN game it names:

thetvapp's row (its own entry) ESPN's entry Where the names differ
thetvapp-9287915560 LSU Tigers vs. Louisiana-Monroe Warhawks mens-college-basketball-401917982 LSU vs. UL Monroe Louisiana-Monroe / UL Monroe
thetvapp-9287972120 Brigham Young Cougars vs. Northern Colorado Bears mens-college-basketball-401921742 BYU vs. N Colorado Brigham Young / BYU
thetvapp-9287745880 Penn St Nittany Lions vs. IUPUI Jaguars mens-college-basketball-401917181 Penn State vs. IU Indy IUPUI / IU Indianapolis (renamed in 2024)

The thetvapp entry has no logos (the tile shows initials, "LT" and "LMW"), and its stream is not among the ESPN game's links.

Why

_merge_tvapp_list (backend/app/games.py) joins a row to an entry only when both team names match (hub.matchup_matches, hub.team_match).

Thetvapp writes schools out in full, or by an older name, where ESPN abbreviates or renames. Each time one of these showed up so far, the matcher was taught one more spelling:

  • UConn and LIU (_SCHOOL_NAMES, PR #89);
  • Hawai'i (apostrophes, 2026-11-10).

There will be more: USC, UCF, UNLV, UTEP, SMU, TCU, VCU, UMass, Pitt…

The idea

A row that no entry matches by both names joins the one entry of its sport that meets all of these:

  • it names one of the row's teams;
  • its other team ends with the same word as the row's other team: the mascot (Warhawks, Cougars, Jaguars);
  • it has no thetvapp page yet;
  • it starts within 4 hours of the row's time. A live row's time is now: the list gives a live row no start, and its "start" is when the app first saw it live, which was 79 minutes after the game's start for Penn State.

With two such entries (a doubleheader, a tournament day), the row stays its own entry, as today.

Done when

  • The three rows above, replayed in tests, join their ESPN games, and the list shows each game once.
  • A row whose other team has another mascot, or that two entries fit, stays its own entry.
  • Live: the next such row joins its game.

Specs: live-game-list.

## What happens The owner, 2026-11-18, with a screenshot of the Games page: "Looks like there's a duplicate. This has happened 2 other times now." The live game list at about 01:15Z on 2026-11-19 showed three games twice. Each time, a thetvapp row was listed as its own entry beside the ESPN game it names: | thetvapp's row (its own entry) | ESPN's entry | Where the names differ | | --- | --- | --- | | `thetvapp-9287915560` LSU Tigers vs. Louisiana-Monroe Warhawks | `mens-college-basketball-401917982` LSU vs. UL Monroe | Louisiana-Monroe / UL Monroe | | `thetvapp-9287972120` Brigham Young Cougars vs. Northern Colorado Bears | `mens-college-basketball-401921742` BYU vs. N Colorado | Brigham Young / BYU | | `thetvapp-9287745880` Penn St Nittany Lions vs. IUPUI Jaguars | `mens-college-basketball-401917181` Penn State vs. IU Indy | IUPUI / IU Indianapolis (renamed in 2024) | The thetvapp entry has no logos (the tile shows initials, "LT" and "LMW"), and its stream is not among the ESPN game's links. ## Why `_merge_tvapp_list` (`backend/app/games.py`) joins a row to an entry only when both team names match (`hub.matchup_matches`, `hub.team_match`). Thetvapp writes schools out in full, or by an older name, where ESPN abbreviates or renames. Each time one of these showed up so far, the matcher was taught one more spelling: - UConn and LIU (`_SCHOOL_NAMES`, PR #89); - Hawai'i (apostrophes, 2026-11-10). There will be more: USC, UCF, UNLV, UTEP, SMU, TCU, VCU, UMass, Pitt… ## The idea A row that no entry matches by both names joins the one entry of its sport that meets all of these: - it names one of the row's teams; - its other team ends with the same word as the row's other team: the mascot (Warhawks, Cougars, Jaguars); - it has no thetvapp page yet; - it starts within 4 hours of the row's time. A live row's time is now: the list gives a live row no start, and its "start" is when the app first saw it live, which was 79 minutes after the game's start for Penn State. With two such entries (a doubleheader, a tournament day), the row stays its own entry, as today. ## Done when - The three rows above, replayed in tests, join their ESPN games, and the list shows each game once. - A row whose other team has another mascot, or that two entries fit, stays its own entry. - Live: the next such row joins its game. Specs: `live-game-list`.
Author
Owner

Merged in PR #197 (merge 0b05249) and fixed in PR #198 (merge 893c50f), live as 893c50f since 2026-11-19 16:21Z.

The first deploy did not work. PR #197 went live at 02:29Z, and LSU vs. UL Monroe and BYU vs. N Colorado stayed listed twice. The rule takes a live row's time as now, and it read now from games._now(). That is time.monotonic(), the clock of the list's cache, so comparing it with the entry's unix start never matched any live row. The tests had stubbed _now with a unix time, which hid it.

The fix. PR #198 reads games._wall(). The tests now stub the wall clock only; with the old clock put back, the live-row tests fail. Replayed on the list read right after the first deploy, both rows join their games.

What the live list shows now.

  • At 16:21Z no game is listed twice.
  • The one thetvapp row still on its own, Wake Forest vs. Western Carolina, is for 2026-11-21, a day ESPN's scoreboards do not list yet.

Not seen live yet: LSU's and BYU's games had ended by the deploy, so no live row has been seen joining by its mascot. The next game a list spells otherwise is the test.

Merged in PR #197 (merge 0b05249) and fixed in PR #198 (merge 893c50f), live as 893c50f since 2026-11-19 16:21Z. **The first deploy did not work.** PR #197 went live at 02:29Z, and LSU vs. UL Monroe and BYU vs. N Colorado stayed listed twice. The rule takes a live row's time as now, and it read now from `games._now()`. That is `time.monotonic()`, the clock of the list's cache, so comparing it with the entry's unix start never matched any live row. The tests had stubbed `_now` with a unix time, which hid it. **The fix.** PR #198 reads `games._wall()`. The tests now stub the wall clock only; with the old clock put back, the live-row tests fail. Replayed on the list read right after the first deploy, both rows join their games. **What the live list shows now.** - At 16:21Z no game is listed twice. - The one thetvapp row still on its own, Wake Forest vs. Western Carolina, is for 2026-11-21, a day ESPN's scoreboards do not list yet. **Not seen live yet:** LSU's and BYU's games had ended by the deploy, so no live row has been seen joining by its mascot. The next game a list spells otherwise is the test.
Sign in to join this conversation.
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#196
No description provided.