A site row whose opponent is a placeholder ("TBD", "TBA", "to be… #200
Loading…
Reference in a new issue
No description provided.
Delete branch "osf/204-duplicate-match-found-again"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What was done
make e2e, gated on headless Chromium, and was not part of the recorded unit lane.How to review
git fetch origin && git checkout osf/204-duplicate-match-found-again.backend/app/games.py(the join in both merges) andbackend/app/resolver/hub.py(the placeholder test, beside the other name-matching helpers).(npm --prefix frontend run build) && backend/.venv/bin/python -m pytest backend/tests -q -n auto --timeout=120— expect a full pass; the new tests are the ones matching-k placeholderinbackend/tests/test_games.pyandbackend/tests/test_thetvapp.py.make e2e— the new leg serves a "TBD" row beside a matching fake feed game and asserts the game is listed exactly once; it reports ok, or a clear skipped line if headless Chromium is absent.Code review
Reviewed the placeholder-join change (games.py, hub.py, three test files) against the live-game-list delta spec. Found and fixed a spec violation: the
takenset (which the placeholder join uses to skip entries that already hold a page from the site) was not tracking hub-only entries or entries joined by a placeholder/mascot row, so a second row for the same game could join an entry that already holds a page, violating 'holds no page from that source yet'. Fixed by adding those entries totakenin both merges (4 places). Also fixed two wrong-time comments in test_games.py (T0 is 8:30 PM ET, not 9:30/2:30 PM). All 178 tests pass.Left for you
backend/app/resolver/hub.py:407: is_placeholder(None) raises TypeError (norm_name calls .lower() on None). Never triggered in practice: both call sites (games.py:1158, 1302) pass parsed team-name strings. Not fixed.backend/app/resolver/hub.py:400: 'T.B.D.' (dotted acronym) normalizes to 't b d', not in the placeholder set. The spec's canonical forms ('TBD', 'TBA', 'to be determined') and their case/trailing-punctuation/spacing variants all match. Not fixed.backend/tests/test_thetvapp.py:451: monkeypatch.setattr(games, '_wall', lambda: NOW) is defensive but not exercised: every row is a pre-game row with a parsed start_ts, so the placeholder/mascot joins use row.start_ts, never _wall. Harmless and consistent with the #196 test. Not fixed.backend/tests/e2e_click_to_play.py:1753: The poll's httpx.get(...).json() has no try/except or status check; a transient error fails the leg instead of retrying (unlike wait_for_listed_games). Unlikely for a local subprocess (start_app waits until the app answers). Not fixed.backend/tests/e2e_click_to_play.py:399: strftime('%b') is locale-dependent; a non-English locale would break the parser's month lookup. Same pattern as existing test_thetvapp.py:441, so consistent with repo practice. Not fixed.backend/tests/e2e_click_to_play.py:1738: The feed mutation (append to FEED_SCOREBOARDS, removed in finally) is visible to the concurrently running channel leg's app (shared global feed server) during any overlap. No assertion depends on it (the channel leg's entry pick is always a live game, sorted first). Not fixed.Fixed before the commit
backend/app/games.py:1008: The hub merge's placeholder join did not add the joined entry's index totaken, so a second placeholder row for the same game could also join it, replacing the first row's URL. Violates 'holds no page from that source yet'. Fixed by addingtaken.add(place).backend/app/games.py:1031: The hub merge's hub-only emission did not add the entry's index totaken, so a later placeholder row could join a hub-only entry (which holds a page from the site), violating 'holds no page from that source yet'. Order-dependent: both-names row first let the placeholder row join it (wrong URL); placeholder row first listed the game twice. Fixed by addingtaken.add(len(merged)).backend/app/games.py:1318: The thetvapp merge's placeholder join did not add the joined entry's index totaken, so a second placeholder row for the same game could also join it, adding a second thetvapp source. Violates 'holds no page from that source yet'. Fixed by addingtaken.add(place).backend/app/games.py:1326: The thetvapp merge's mascot join did not add the joined entry's index totaken, so a later placeholder row could add a second thetvapp source to an entry already joined by a mascot row (the placeholder join checksi not in taken, not the thetvapp source directly). Fixed by addingtaken.add(place).backend/tests/test_games.py:664: Comment says '9:30 PM ET on Nov 4' but T0 = 2026-11-05 01:30 UTC is 8:30 PM ET (EST, DST ended 2026-11-01). Fixed the comment.backend/tests/test_games.py:762: Comment says 'live since T0 (2:30 PM)' but T0 is 8:30 PM ET. Fixed the comment.Tests
All 10 scenarios of
duplicate-match-found-again-i-have-tried-2yv88yhave a tagged test.The test lint recorded nothing in the run's tests.
Braid run
duplicate-match-found-again-i-have-tried-2yv88y(26 steps)osf/204-duplicate-match-found-againor on a pull request (.gitea/workflows: ci.yml, publish-image.yml); what only CI tests went unverifiedOpened by Braid.