tunnel: preserve connection_id on resume URL for affinity routing#54
Merged
joelgwebber merged 1 commit intomainfrom May 5, 2026
Merged
Conversation
The resume reconnect was deleting connection_id from the WebSocket URL along with the spent token. The relay's affinity router hashes on that connection_id to route the WS to the pod that owns the chromium browser context; without it, the router minted a fresh UUID and the reconnect landed on a random pod. The new tunnel registered there with the (correct, preserved) connection_id, but the chromium-side forward proxy on the original pod still couldn't see it — so the next navigation got ERR_TUNNEL_CONNECTION_FAILED and chromium showed chrome-error://chromewebdata/. Companion fix to cowpaths/mn#103915 (preserve connection_id in the trace row across resume): both are needed end-to-end. Bumps to 0.1.14. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
3 tasks
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
The resume reconnect was deleting
connection_idfrom the WebSocket URL along with the spent token. The relay's affinity router hashes on thatconnection_idto route the WS to the pod that owns the chromium browser context. Without it, the router minted a fresh UUID and the reconnect landed on a random pod.The new tunnel registered there with the (correct, preserved)
connection_id, but the chromium-side forward proxy on the original pod still couldn't see it — so the next navigation gotERR_TUNNEL_CONNECTION_FAILEDand chromium showedchrome-error://chromewebdata/. Symptom in the field: tunnel-status reportsstate=ready, the new tunnel really is registered, but it's on a pod the chromium browser doesn't know about — so any subsequentlive-view-*call's navigation fails with a blank chrome-error page.This is the companion to cowpaths/mn#103915 (preserve
connection_idin the trace row across resume). Both are needed end-to-end:connection_idto issue, but the WS reconnect has no affinity hint and lands on the wrong pod.Together they keep the WS pinned to the chromium-owning pod across reconnect.
Tracked in SUBTEXT-338. Bumps to 0.1.14.
Test plan
resume reconnect strips spent token but preserves connection_id(inverted from the prior assertion that connection_id was stripped — that assertion was the bug, not the spec). Asserts the post-readyvalue (server-cid) appears on the reconnect URL.🤖 Generated with Claude Code