Hotfix: complete the rematch-decline protocol (main is uncompilable)#65
Merged
Conversation
PRs #54 and #55 were each green on their own branches but never built combined: #55 added ClientMessage.declineRematch (and client handling for a ServerMessage.rematchDeclined that never existed) while #54 rewrote the same coding switches — the textual merge kept the enum case but none of the switch arms, leaving main uncompilable (non-exhaustive switches in ChessOnline and the coordinator, missing enum case for the client). - ChessOnline: declineRematch wired through Kind/decode/encode; ServerMessage.rematchDeclined added (explicit "no", distinct from rematchUnavailable meaning the opponent left); round-trip tests cover both. - Server: coordinator handles declineRematch — drops the slot and sends rematch_declined to the requester; new integration test. - Client: #55's existing decline UI now has the real message it was written against. Verified: ChessOnline 6/6, server 25/25, app builds for testing. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Owner
Author
|
Heads-up: this is a duplicate of #63 (opened ~2 min earlier) — same 4 files, functionally identical protocol/server/test changes; neither includes the #39 offer-expiry TTL, which stays open. To save review cycles I'd suggest consolidating on #63 and closing this one, but the root-cause analysis here is the best writeup of the incident (semantic merge race between #54 and #55, each green on stale branches), and the |
This was referenced Jul 10, 2026
testtest126
added a commit
that referenced
this pull request
Jul 10, 2026
The rematch slot used to live until a player disconnected, declined, queued elsewhere, or closed the sheet — an ignored offer left the requester waiting forever against an idle-but-connected opponent. Each slot now carries an expiry task (60s, injectable for tests like the clock override). On expiry both players get rematch_unavailable: the requester stops waiting and an unanswered offer leaves the opponent's sheet — the app already handles that message, so no client changes are needed. Any other slot teardown cancels the task. Completes the optional-hardening item of #39; the decline action itself landed in #55/#65. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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.
Summary
Main is currently red — #54 and #55 were each green on their own stale branches but never built combined: #55 added
ClientMessage.declineRematch(plus client handling for aServerMessage.rematchDeclinedthat never existed anywhere) while #54 rewrote the same coding switches. The textual merge kept the enum case but no switch arms: non-exhaustive switches inChessOnlineand the coordinator, and a missing enum case for the client. Nothing on main compiles.This completes the protocol across all layers with real semantics rather than just silencing the compiler:
declineRematchwired through Kind/decode/encode;ServerMessage.rematchDeclinedadded — an explicit "no" that resets the requester's waiting state, distinct fromrematchUnavailable(opponent left). Round-trip tests cover both.declineRematch— drops the rematch slot and sendsrematch_declinedto the requester; integration test included.Process note: this is the second merge-order race today (#55+#57 was benign; #54+#55 was not).
strict: trueon required status checks — requiring branches to be up to date before merging — would prevent the class entirely, at the cost of re-running CI after each merge.Test plan
🤖 Generated with Claude Code