Repository navigation
fix(net): withdraw PUBLISH_NAMESPACE by reset on draft-17+ (release backport) - #6518
Conversation
…ackport) Backports the js/net half of #5483. On drafts 17 and later a withdrawal was a plain FIN, which drafts 17+ allow only on SUBSCRIBE_NAMESPACE and SUBSCRIBE_TRACKS. Cloudflare's draft-18 relay and aiomoqt ignore it, so their subscribers never see NAMESPACE_DONE until the publisher's session ends. Withdraw by cancelling both directions instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f6b2d39681
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
The withdrawal is now a CANCELLED reset, so a release subscriber reading it failed the bidi stream: it logged an error and answered with INTERNAL_ERROR on every routine unpublish. Treat the reset as the end of the request, as main's RequestStream does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5d7cf83b60
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Any other reset is the peer failing, so keep it on the error path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merging after one iteration round.
(Written by Claude Opus 5.5) |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@moq/net 0.4.4 withdraws a PUBLISH_NAMESPACE on drafts 17+ with a FIN, which draft-22 §6.4.2.2 says is not a cancellation, so a relay that follows it keeps the namespace and the subscriber never gets NAMESPACE_DONE: subscribe-namespace-lifecycle timed out against moq-go, moxygen, moq-rs-draft-18, quic-zig and quiche-moq in the nightly. 0.4.6 carries moq-dev/moq#6518 and withdraws with a reset. Against the moq-go relay the client built from this commit passes all eight tests, subscribe-namespace-lifecycle included (0.4.4: seven). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Backports the
js/nethalf of moq-dev/moq#5483 torelease, so it ships in the next@moq/netpatch release. The 0.4.5 bump (moq-dev/moq#6501) already shipped without it.Problem
On drafts 17+ the published
@moq/net0.4.4 withdraws a PUBLISH_NAMESPACE with FIN plus STOP_SENDING. Draft-18 §3.3.2 cancels a request by terminating every open direction abruptly, and a FIN is allowed only on SUBSCRIBE_NAMESPACE and SUBSCRIBE_TRACKS. Cloudflare's draft-18 relay and aiomoqt (draft-22) act only on the reset, so their subscribers never see NAMESPACE_DONE until the publisher's session ends.That is why the interop runner's moq-dev-js
subscribe-namespace-lifecyclecase fails against them (englishm/moq-interop-runner#173). It passed from two processes only because the publisher process exiting closes the session.Reproduced with the runner's client against each signal on its own:
main)Our sender was out of spec, so nothing goes upstream.
Changes
#withdrawon drafts 17+ now aborts both directions withCANCELLEDand returns, as onmain. Drafts 14-16 keep PUBLISH_NAMESPACE_DONE then FIN, unchanged fromrelease(it never waited for the FIN ack there).CANCELLEDreset of a PUBLISH_NAMESPACE as the end of the request on drafts 17+, retracting and returning; any other reset code still fails the request. Without it, areleasesubscriber reading this withdrawal from another@moq/netfailed the bidi stream: it loggederror processing bidi streamand answered with INTERNAL_ERROR on every routine unpublish.mainalready ends a request this way throughRequestStream.Cancelreset. The two "a replacement waits until its predecessor's FIN is acknowledged/rejected" tests are removed, since that ordering no longer exists. The republish integration cycle also runs on drafts 17 and 19.moq-tokio0.19.28 runner client passes the same cells against both relays over WebTransport and raw QUIC, soreleaseRust is unaffected in practice.Public API and wire impact
CANCELLED) instead of FIN + STOP_SENDING. Drafts 14-16 and moq-lite are unchanged. Matchesmainsince fix(net): withdraw PUBLISH_NAMESPACE by reset on draft-17+ #5483.main.Tests
publisher.test.tscases fail without the fix and pass with it.subscriber.test.tscases: aCANCELLEDreset withdraws without an error (fails without the subscriber change), and anINTERNAL_ERRORreset still fails the request.just check origin/releasepasses.just test interop --all: every cell passes except the browserjspublisher and subscriber, which fail to launch Chromium (release's lockfile pins a Playwright that does not match the dev shell's browsers).js-native-nodeandjs-native-bunpass. The harness runs moq-lite, which this change does not touch, so the live relay runs below are the real coverage.subscribe-namespace-lifecycleagainst this branch: passes on Cloudflare d18, aiomoqt d22, imquic d22, moxygen d16, cdn.moq.dev, and stitcher-moq. Cloudflare's draft-14 endpoint times out waiting for the first NAMESPACE on 0.4.4 too, so it is unrelated.Decisions
releasein the next@moq/netpatch; no Rust backport (maintainer).releasesubscriber. OnlyCANCELLEDis quiet, so a genuine peer failure still surfaces (narrower thanmain'sRequestStream, which ends on any reset).Tracked by the quest PR moq-dev/moq#6503.
(Written by Claude Opus 5.5)
🤖 Generated with Claude Code