test(relay): cross-version qmux WebSocket backward-compat#1813
Closed
kixelated wants to merge 1 commit into
Closed
test(relay): cross-version qmux WebSocket backward-compat#1813kixelated wants to merge 1 commit into
kixelated wants to merge 1 commit into
Conversation
Guard against the qmux 0.0.8 -> 0.2.0 bump (and future bumps) silently breaking already-deployed clients over WebSocket: - `old_qmux_client_interops_over_websocket`: an actual qmux 0.0.8 client (added as a renamed dev-dependency) connects to a server using the current qmux and the relay's real advertised subprotocols. They must converge on the newest lite ALPN over the legacy qmux-00 wire, and a uni stream must round-trip — exercising qmux-00 frame encode (old) -> decode (current). Both qmux versions share web-transport-trait 0.3, so one trait drives both sides. - `advertises_legacy_subprotocols_for_old_clients`: asserts the relay keeps advertising the bare `webtransport`/`qmux-00` fallbacks and `qmux-00.<lite>`, the subprotocols old clients depend on. Co-Authored-By: Claude Opus 4.8 <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.
Stacked on #1810 (needs the qmux 0.2.0 bump from that PR). Merge #1810 first, then rebase this onto
main.Why
The qmux 0.0.8 → 0.2.0 upgrade in #1810 touches the only transport with clients already deployed in the wild: WebSocket. These tests prove old clients still interop, and lock that in so a future qmux bump can't silently break them.
QUIC/WebTransport is unaffected (not qmux), and
tcp:///unix://are brand-new with no old peers — so WebSocket is the whole compatibility surface.What's added
old_qmux_client_interops_over_websocket— the real test. Adds qmux 0.0.8 as a renamed dev-dependency (qmux_old) and connects an actual old client to a server running the current qmux with the relay's realsupported_subprotocols(). Asserts:b"hello"— exercising qmux-00 frame encode (old) → decode (current) across the version gap.Both qmux versions depend on
web-transport-trait = "0.3", so a single unified trait drives both sides — no two-trait plumbing.advertises_legacy_subprotocols_for_old_clients— asserts the relay keeps advertising the barewebtransport/qmux-00fallbacks andqmux-00.<newest-lite>, the subprotocols old browser/native clients depend on. A regression guard so a refactor (or version bump) can't drop them unnoticed.Notes
@moq/watchagainst a branch-built relay; canary deploy) is operational and not in this PR.Test plan
cargo test -p moq-relay --lib websocket— both new tests pass alongside the existing negotiation testcargo fmt --check+clippy --all-targets -D warnings🤖 Generated with Claude Code
(Written by Claude)