Re-apply codec tracker after reconnect channel swap#10565
Merged
tool4ever merged 1 commit intoCard-Forge:masterfrom Apr 29, 2026
Merged
Re-apply codec tracker after reconnect channel swap#10565tool4ever merged 1 commit intoCard-Forge:masterfrom
tool4ever merged 1 commit intoCard-Forge:masterfrom
Conversation
When RemoteClient.swapChannel replaces the channel for a reconnecting client, the new channel's pipeline starts with no Tracker on its encoder/decoder. Without it, IdRef markers in client→server messages never resolve back to CardView/PlayerView, and Method.invoke fails with IllegalArgumentException for every protocol method that takes a tracked argument (selectCard, selectPlayer, getAbilityToPlay, ...). Argless methods (selectButtonOk, passPriority) keep working — matching the <!-- -->Card-Forge#10562 report of "can only click OK or End Turn" after reconnect. Cache the tracker on RemoteClient so swapChannel can re-apply it to the new pipeline. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
tool4ever
approved these changes
Apr 29, 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.
Fixes #10562.
Cause
PR #10343 (Apr 24) added a per-channel codec
Trackerto the encoder/decoder pipeline so client→server protocol args can travel asIdRefmarkers. PR #9708 (Feb 12) had earlier introducedRemoteClient.swapChannelfor the reconnect handshake. The two never met:swapChannelreplaces the underlying channel but doesn't re-apply the tracker to the new pipeline.After reconnect, the server-side decoder has no tracker, so
IdRefmarkers in client→server messages never resolve back toCardView/PlayerView.Method.invokethen fails withIllegalArgumentExceptionfor every protocol method that takes a tracked argument (selectCard,selectPlayer,getAbilityToPlay, …). Argless methods (selectButtonOk,passPriority) keep working — matching the report of "can only click OK or End Turn" after reconnect.Fix
Cache the tracker on
RemoteClientsoswapChannelcan re-apply it to the new pipeline.🤖 Generated with Claude Code