From e8d5c38f238cd28139ccac874eebd0b98505cb10 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Thu, 1 Oct 2026 21:19:07 -0700 Subject: [PATCH 1/3] chore: claim qmux credit quest From f9e891a3326975a4e5cccfe1cff3682980bd739f Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Thu, 1 Oct 2026 21:46:24 -0700 Subject: [PATCH 2/3] docs(quest): record qmux fixes and release prerequisites Co-Authored-By: GPT-6 --- quest/m0/qmux-credit.md | 60 +++++++++++++++++++---------------------- 1 file changed, 27 insertions(+), 33 deletions(-) diff --git a/quest/m0/qmux-credit.md b/quest/m0/qmux-credit.md index eaf72e9e079..d31efc34149 100644 --- a/quest/m0/qmux-credit.md +++ b/quest/m0/qmux-credit.md @@ -12,39 +12,33 @@ within the close bound. Both hold on the 0.5 line that ## Plan -Facts from moq-dev/web-transport `rs/qmux/src/session.rs` (0.5.1 and main): - -- Credit returns only through `RecvStream::report_consumed` on reads. - `Drop for RecvStream` sends STOP_SENDING and returns stream-count credit, - but never consumes bytes still buffered or queued in `inbound_data`. -- On STOP_SENDING the writer removes the recv entry, so later STREAM data is - dropped before the connection-credit check, and a later RESET_STREAM - returns early, so its final-size gap is never consumed. The peer counts all - of it against MAX_DATA. -- A new stream's entry is inserted only after `accept_uni`/`accept_bi` hands - it over, so a stream dropped in that window leaves a stale entry that keeps - charging the connection window. -- `close()` queues APPLICATION_CLOSE and marks the session closed at once. A - writer that is mid-write treats that as interrupted and drops the frame. - 0.6 made `close()` idempotent and keeps the first reason, but not the order. - -Work: - -- Consume credit for unread bytes on drop, for STREAM data and the RESET - final-size gap after STOP_SENDING (keep enough of a retired stream's state - to account for its final size), and close the accept gap. -- Mark the session closed only once the writer has sent the close frame, with - a bound so a stalled transport still drops. -- Tests in `rs/qmux`: a session that drops many unread streams keeps - delivering past its initial window, and a peer reads the close code after a - close issued mid-write. -- Release on both lines (0.5.x after 0.5.2, and 0.6.x), then bump - `main`'s pin to that 0.5.x. `main` stays on 0.5: 0.6 needs - web-transport-trait 0.5, a breaking change that belongs on `dev`, which - picks up 0.6.x. - -Why m0: the WebSocket fallback and the planned edge-to-core `tls://` links -both run on qmux, and MoQ drops streams constantly. +The source fixes are prepared as upstream drafts: + +- [0.6 line](https://github.com/moq-dev/web-transport/pull/412), targeting `main`. +- [0.5 line](https://github.com/moq-dev/web-transport/pull/413), targeting + `qmux-v0.5.x` and retaining web-transport-trait 0.4. + +Both return unread connection credit on stop/drop, retain stopped stream +accounting through FIN/RESET, and register the first receive frame before +publishing its frontend. Shared stream-count ownership bounds retained state. +The writer drains the first requested close before publishing teardown, with a +one-second bound including any in-flight write. Paused-time regressions cover +these paths, plus byte-stream peers across drafts 00, 01, and 02. + +The two end-to-end regressions fail on unmodified qmux 0.5.2. Focused suites pass +on both fixes: 189 tests on 0.6 and 181 on 0.5, including doctests. Upstream CI +still needs to finish; these are draft PRs, not released fixes. + +Remaining work: + +- Merge the upstream fixes after review and CI. +- Publish patched 0.5.x newer than 0.5.2 and patched 0.6.x newer than 0.6.1. + The upstream release workflow only runs on `main`; the 0.5 release needs the + maintainer's release process. +- Bump `main`'s current 0.5.2 pin to the released 0.5 fix and validate the + WebSocket fallback. Update `dev` to the released 0.6 fix. Keep `main` on 0.5, + since web-transport-trait 0.5 is a breaking change reserved for `dev`. +- Delete this quest only after both release and pin steps are complete. Public API: none. Wire: none. From fa3f1472a1cf62accd986363d3b37ca9caec6219 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Thu, 1 Oct 2026 21:54:56 -0700 Subject: [PATCH 3/3] docs(quest): require releases containing the qmux fixes Co-Authored-By: GPT-6 --- quest/m0/qmux-credit.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/quest/m0/qmux-credit.md b/quest/m0/qmux-credit.md index d31efc34149..efb8f4c8881 100644 --- a/quest/m0/qmux-credit.md +++ b/quest/m0/qmux-credit.md @@ -32,7 +32,8 @@ still needs to finish; these are draft PRs, not released fixes. Remaining work: - Merge the upstream fixes after review and CI. -- Publish patched 0.5.x newer than 0.5.2 and patched 0.6.x newer than 0.6.1. +- Publish patched 0.5.x newer than 0.5.2 containing #413, and patched + 0.6.x newer than 0.6.2 containing #412. The upstream release workflow only runs on `main`; the 0.5 release needs the maintainer's release process. - Bump `main`'s current 0.5.2 pin to the released 0.5 fix and validate the