Duplicate match found again #199

Closed
opened 2026-11-19 14:54:52 -05:00 by cmoriarty · 2 comments
Owner

I have tried to fix this problem multiple times now:

image

And another one (2026-11-20, still listed as of writing):

image

What happens

The same game is listed twice: once as an ESPN feed entry, and again as a hub-only entry from the site's list. In both screenshots the second row is the site's, and it names one team TBD (to be determined):

  • 2026-11-19: the site's row "Florida Gators vs. TBD" (live, 2:30 PM) beside the feed entry "West Virginia vs. Florida".
  • 2026-11-20: the site's row "TBD vs. NC State Wolfpack" (9:30 PM) beside the feed entry "NC State vs. Seton Hall".

The merge joins a site row to a feed entry only when both team names match, in either order. "TBD" is a placeholder, not a team name, and matches nothing, so the row can never join the feed entry and the game is listed twice.

What is known (read from the running app, 2026-11-20)

From the live game list (GET /api/games), two pairs, each one game:

Site row (hub-only) Feed entry Start (both)
sportsurge-70567 "TBD vs. NC State Wolfpack" mens-college-basketball-401921691 "NC State vs. Seton Hall" 2026-11-21T02:30Z
sportsurge-70539 "TBD vs. Murray State Racers" mens-college-basketball-401921692 "Murray St vs. Wisconsin" 2026-11-21T00:00Z

In each pair the site's row and the feed entry start at the same time, and the row names the same team the entry names (NC State, Murray State) while calling the opponent "TBD". The rows are the site's (sportsurge) hub rows — the sportsurge- id prefix — not thetvapp's; thetvapp's list read the same day carries no "TBD" row. ESPN's own 2026-11-19 scoreboard carried only "West Virginia vs. Florida" (WVU/FLA), so that day's "TBD" row is the site's too, not the feed's.

Why the #196 fix did not catch this

#196 (merged 2026-11-19) taught the merge to join a thetvapp row that no entry matches by both names to the one entry of its sport that names one of its teams and has the other's mascot. It does not reach these rows, for two reasons:

  • It applies to thetvapp rows only (the thetvapp merge). These duplicates are sportsurge hub rows, and the hub merge has no such fallback: a hub row no feed entry matches by both names becomes its own entry, full stop.
  • Even for a thetvapp row, the mascot join requires the row's other team to end in the entry's other team's mascot word. "TBD" is one word and carries no mascot, so it would join nothing.

So #196 fixed thetvapp writing a school out in full or under an older name (LSU Tigers, BYU, IUPUI). It did not fix a row that names one team "TBD".

What is not known

  • How often the site lists a "TBD" opponent, and whether it later corrects the row (the duplicate lives as long as the row reads "TBD").
  • Whether thetvapp will list "TBD" rows too (it does not today).

The idea

Generalize #196's join to a row whose one team is a placeholder for an opponent the site does not know yet (observed: "TBD"). A site row (hub or thetvapp) that no entry matches by both names joins the one entry of its sport that names the row's known team, starts at the row's time, and holds no page from that source yet.

Three decisions to pin down:

  • Both merges. The fallback must be added to the hub merge — it has none today (an unmatched hub row just becomes its own entry, which is why these duplicates exist) — and extended to thetvapp's existing mascot join (#196).
  • Join on the placeholder, not on "matches nothing". The row's non-matching team must be a placeholder for an unknown opponent (observed: "TBD"; allow a small set — "TBA", "to be determined"). Do not join when the non-matching team is a real team the feed simply does not list: that row may be a different game (the known team playing someone else), and listing it separately is correct. A placeholder unambiguously means "opponent unknown", so the row is the same game as the entry that names the known team at that time.
  • A tighter window than #196. #196 allows four hours because it has two signals (one team name plus the other team's mascot). A placeholder row has one signal (one team name), so the rule is "same start time" (a small tolerance for rounding) — in both cases above the row's start equals the feed entry's. A live row uses now, as #196 does.

With no such entry, or more than one (a doubleheader, a tournament day), the row stays its own entry, as #196 does.

When the row joins, its page upgrades the entry's own reference for that source (the hub row's real match page for the sportsurge reference), as a row matched by both names already does — so the game lists once and keeps its proven page.

Spec: live-game-list, a requirement beside #196's "A thetvapp row joins its game by one team and the other's mascot".

Done when

In the unit lane, with a hub row and a thetvapp row each naming one team "TBD":

  • One candidate: the row joins the one entry of its sport that names the known team and starts at the row's time; the list shows the game once, and the row's page is the entry's source for that site.
  • No candidate: the row stays its own entry.
  • Two candidates (two entries of its sport naming the known team, both at the row's time): the row stays its own entry, joining neither.
  • A different time: the known team has an entry, but not at the row's time (outside the window) — the row stays its own entry (the tight window prevents the wrong join).
  • A real, unlisted opponent: the row's non-matching team is a real team (not a placeholder) the feed does not list — the row stays its own entry (it may be a different game).
  • A row whose both teams are named joins as today (both names, else #196's mascot), unchanged.
  • Both merges: the hub merge (no fallback today) and the thetvapp merge each apply the join.

Live: the two 2026-11-20 duplicates (NC State, Murray State) each list once.

I have tried to fix this problem multiple times now: ![image](/attachments/448ae450-a318-4bda-99ef-fef4cb4cb52d) And another one (2026-11-20, still listed as of writing): ![image](/attachments/8cdf5d27-673d-4308-bb6d-9ccaab52ac37) ## What happens The same game is listed twice: once as an ESPN feed entry, and again as a hub-only entry from the site's list. In both screenshots the second row is the site's, and it names one team **TBD** (to be determined): - 2026-11-19: the site's row "Florida Gators vs. TBD" (live, 2:30 PM) beside the feed entry "West Virginia vs. Florida". - 2026-11-20: the site's row "TBD vs. NC State Wolfpack" (9:30 PM) beside the feed entry "NC State vs. Seton Hall". The merge joins a site row to a feed entry only when **both** team names match, in either order. "TBD" is a placeholder, not a team name, and matches nothing, so the row can never join the feed entry and the game is listed twice. ## What is known (read from the running app, 2026-11-20) From the live game list (`GET /api/games`), two pairs, each one game: | Site row (hub-only) | Feed entry | Start (both) | | --- | --- | --- | | `sportsurge-70567` "TBD vs. NC State Wolfpack" | `mens-college-basketball-401921691` "NC State vs. Seton Hall" | 2026-11-21T02:30Z | | `sportsurge-70539` "TBD vs. Murray State Racers" | `mens-college-basketball-401921692` "Murray St vs. Wisconsin" | 2026-11-21T00:00Z | In each pair the site's row and the feed entry start at the same time, and the row names the same team the entry names (NC State, Murray State) while calling the opponent "TBD". The rows are the site's (sportsurge) hub rows — the `sportsurge-` id prefix — not thetvapp's; thetvapp's list read the same day carries no "TBD" row. ESPN's own 2026-11-19 scoreboard carried only "West Virginia vs. Florida" (WVU/FLA), so that day's "TBD" row is the site's too, not the feed's. ## Why the #196 fix did not catch this #196 (merged 2026-11-19) taught the merge to join a **thetvapp** row that no entry matches by both names to the one entry of its sport that names one of its teams and has the other's mascot. It does not reach these rows, for two reasons: - It applies to thetvapp rows only (the thetvapp merge). These duplicates are **sportsurge hub** rows, and the hub merge has no such fallback: a hub row no feed entry matches by both names becomes its own entry, full stop. - Even for a thetvapp row, the mascot join requires the row's other team to end in the entry's other team's mascot word. "TBD" is one word and carries no mascot, so it would join nothing. So #196 fixed thetvapp writing a school out in full or under an older name (LSU Tigers, BYU, IUPUI). It did not fix a row that names one team "TBD". ## What is not known - How often the site lists a "TBD" opponent, and whether it later corrects the row (the duplicate lives as long as the row reads "TBD"). - Whether thetvapp will list "TBD" rows too (it does not today). ## The idea Generalize #196's join to a row whose one team is a placeholder for an opponent the site does not know yet (observed: "TBD"). A site row (hub or thetvapp) that no entry matches by both names joins the one entry of its sport that names the row's known team, starts at the row's time, and holds no page from that source yet. Three decisions to pin down: - **Both merges.** The fallback must be *added* to the hub merge — it has none today (an unmatched hub row just becomes its own entry, which is why these duplicates exist) — and *extended* to thetvapp's existing mascot join (#196). - **Join on the placeholder, not on "matches nothing".** The row's non-matching team must be a placeholder for an unknown opponent (observed: "TBD"; allow a small set — "TBA", "to be determined"). Do *not* join when the non-matching team is a real team the feed simply does not list: that row may be a different game (the known team playing someone else), and listing it separately is correct. A placeholder unambiguously means "opponent unknown", so the row is the same game as the entry that names the known team at that time. - **A tighter window than #196.** #196 allows four hours because it has two signals (one team name plus the other team's mascot). A placeholder row has one signal (one team name), so the rule is "same start time" (a small tolerance for rounding) — in both cases above the row's start equals the feed entry's. A live row uses now, as #196 does. With no such entry, or more than one (a doubleheader, a tournament day), the row stays its own entry, as #196 does. When the row joins, its page upgrades the entry's own reference for that source (the hub row's real match page for the sportsurge reference), as a row matched by both names already does — so the game lists once and keeps its proven page. Spec: `live-game-list`, a requirement beside #196's "A thetvapp row joins its game by one team and the other's mascot". ## Done when In the unit lane, with a hub row and a thetvapp row each naming one team "TBD": - **One candidate:** the row joins the one entry of its sport that names the known team and starts at the row's time; the list shows the game once, and the row's page is the entry's source for that site. - **No candidate:** the row stays its own entry. - **Two candidates** (two entries of its sport naming the known team, both at the row's time): the row stays its own entry, joining neither. - **A different time:** the known team has an entry, but not at the row's time (outside the window) — the row stays its own entry (the tight window prevents the wrong join). - **A real, unlisted opponent:** the row's non-matching team is a real team (not a placeholder) the feed does not list — the row stays its own entry (it may be a different game). - **A row whose both teams are named** joins as today (both names, else #196's mascot), unchanged. - **Both merges:** the hub merge (no fallback today) and the thetvapp merge each apply the join. Live: the two 2026-11-20 duplicates (NC State, Murray State) each list once.
image.png
142 KiB
Author
Owner

and another one image

and another one ![image](/attachments/8cdf5d27-673d-4308-bb6d-9ccaab52ac37)
Author
Owner

Shipped in cmoriarty/sports-breaker#200, merged into main as 2d0cd54ded.

The OpenSpec change is archived as 2026-11-20-duplicate-match-found-again-i-have-tried-2yv88y.

Braid run: http://openspecflow.internal.underthere.xyz/run/run_01M7X2V1PJ3DQA4QXG0P2YV88Y

Shipped in [cmoriarty/sports-breaker#200](https://forgejo.underthere.xyz/cmoriarty/sports-breaker/pulls/200), merged into `main` as `2d0cd54ded`. The OpenSpec change is archived as `2026-11-20-duplicate-match-found-again-i-have-tried-2yv88y`. Braid run: http://openspecflow.internal.underthere.xyz/run/run_01M7X2V1PJ3DQA4QXG0P2YV88Y
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#199
No description provided.