Matchmaker: play short-handed games instead of freezing the ladder#131
Open
byte-the-bot wants to merge 2 commits into
Open
Matchmaker: play short-handed games instead of freezing the ladder#131byte-the-bot wants to merge 2 commits into
byte-the-bot wants to merge 2 commits into
Conversation
When enabled entries drop below MATCH_SIZE (4), the matchmaker now creates games sized to the pool, down to MIN_MATCH_SIZE (2). Below that it pauses with a warn-level log instead of the old silent debug no-op. The leaderboard page's 'Next matchmaker run' stat now says why matchmaking is paused instead of showing an ever-staler timestamp. A health-disabled snake dropped the Standard 11x11 ladder to 3 enabled snakes on Jul 5 and the 4-or-nothing check silently froze ranked play for 10 days.
… in loose text locators
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.
Fixes the silent matchmaker starvation that froze ranked play Jul 5–15 (root cause of the "no ranked games in days" report).
What happened
The health sweeper (correctly) disabled a dead snake on Jul 5, dropping the Standard 11x11 ladder to 3 enabled entries.
run_matchmaker_for_leaderboardrequired exactlyMATCH_SIZE(4) and returnedOk(())with only adebug!log — invisible at prod's info level. The matchmaker no-opped every 2 minutes for 10 days.Changes
MIN_MATCH_SIZE = 2: the matchmaker sizes games tomin(pool, MATCH_SIZE), so a 2–3 snake pool keeps playing instead of freezing (Weng-Lin ratings handle variable player counts).warn!instead ofdebug!.Tests
select_matchunit tests for short-handed pools (2 and 3, uniqueness preserved)Companion PR (health sweeper auto-recovery) coming separately.
🤖 Generated with Claude Code