feat(#613): the duel between two regulars, on the TV lobby - #646
Open
mholzi wants to merge 1 commit into
Open
Conversation
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
This was referenced Aug 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #613.
The code asked for this
get_player_standingjustifies 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:
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,
ruffclean,mypyclean.