Skip to content

feat(#613): the duel between two regulars, on the TV lobby - #646

Open
mholzi wants to merge 1 commit into
mainfrom
feat/head-to-head-613
Open

feat(#613): the duel between two regulars, on the TV lobby#646
mholzi wants to merge 1 commit into
mainfrom
feat/head-to-head-613

Conversation

@mholzi

@mholzi mholzi commented Aug 23, 2026

Copy link
Copy Markdown
Owner

Closes #613.

The code asked for this

get_player_standing justifies the lobby line in its own docstring: it is "supposed to start a rivalry". Only the solo view was ever built.

It reverses #371 on purpose

#371 sends each player only their own standing, and #624 kept that posture this afternoon β€” per-player, not broadcast, with the reasoning in the code.

A head-to-head on the TV puts two people's record in front of the whole room. That is a reversal, not an extension, and it is a taste call rather than a technical one: at home it is exactly the fun; at a party with colleagues "Ben 0–5" can be the moment someone stops playing. Markus made the call.

So the reversal is bounded:

  • TV and admin only. The phones never receive it β€” a plain broadcast would have been one word shorter and would have undone House Championship β€” persistent all-time leaderboard on lobby + TVΒ #371 everywhere.
  • Lobby only. Mid-game it would compete with the question for the same screen.
  • Silent until a pair has met twice. "1–0" after one shared game reads like a record and is a coincidence.

Details that are decisions

The winner of a meeting is between those two. Not the game's overall winner β€” Cara topping the table settles nothing between Anna and Ben.

A draw counts as a meeting and goes to nobody.

The most-met pair wins when several regulars are present, with ties broken alphabetically so the TV does not flicker between equals when someone rejoins.

"Last 90 days" is stated, not implied. The detailed history prunes at RETENTION_DAYS / MAX_DETAILED_RECORDS, so an all-time claim would be one the data cannot support. Extending it needs a pairwise rollup in the unpruned map, growing quadratically in players β€” not worth it for a lobby line.

Tests

tests/test_head_to_head_613.py: the single-meeting silence, the duel itself, the meeting winner vs the game winner, draws, the most-met pair among three, games only one of them played, a lobby of one, the lobby-and-TV-only wiring including the absent plain broadcast, the 90-day label in three languages, and name escaping.

Run against the unfixed code: 10 of 10 failed.

Suite 2103, ruff clean, mypy clean.

The code asked for this itself: `get_player_standing` justifies the lobby line
by saying it is "supposed to start a rivalry", and only the solo view existed.

This is a deliberate reversal of #371, not an extension. That issue sends each
player only their own standing, and #624 kept that posture this afternoon. A
head-to-head on the TV puts two people's record in front of the whole room.
At home that is the fun; at a party with colleagues "Ben 0-5" can be the moment
someone stops playing. Markus made the call, so the reversal is bounded: TV and
admin only, never the phones, and lobby only β€” mid-game it would compete with
the question for the same screen.

The winner of a meeting is decided between those two, not by the game's overall
winner: Cara topping the table settles nothing between Anna and Ben. A draw
counts as a meeting and goes to nobody. With several regulars present, the
most-met pair wins, ties broken alphabetically so the TV does not flicker
between equals on rejoin.

Silent until a pair has met twice. "1-0" after a single shared game reads like
a record and is a coincidence.

Scope is the detailed history, which prunes at RETENTION_DAYS /
MAX_DETAILED_RECORDS, so the line says "last 90 days" rather than implying an
all-time record the data cannot support. A pairwise rollup in the unpruned map
would extend it at a cost growing quadratically in players β€” not worth it for a
lobby line.

Adds `tests/test_head_to_head_613.py`. Run against the unfixed code:
10 of 10 failed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HV1RUt8kNtQ3piawKGbUAf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Head-to-head teaser in the lobby: "Anna vs Ben 3-2"

2 participants