From b2101c8b51ce52347579e4f766756247fc60f694 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Fri, 6 Nov 2026 13:30:34 -0800 Subject: [PATCH 1/2] chore(quest): claim quest/m1/retry-interval-overload.md Quest-Claim: a9d75b2ff282646b From daaa13009c0ddf047c2d57ca9f6345076f894f7a Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Fri, 6 Nov 2026 13:36:58 -0800 Subject: [PATCH 2/2] fix(moq-net): the over-limit PUBLISH refusal invites a retry EXCESSIVE_LOAD may pass once the peer unlists a track, so the refusal carries RETRY_INITIAL through the shared retry_interval rule instead of 0. Co-Authored-By: Claude Opus 5.5 --- quest/m1/README.md | 1 - quest/m1/retry-interval-overload.md | 26 ------------------------ rs/moq-net/src/ietf/error.rs | 5 +++-- rs/moq-net/src/ietf/subscriber/tracks.rs | 26 +++++++++++++++++++++++- 4 files changed, 28 insertions(+), 30 deletions(-) delete mode 100644 quest/m1/retry-interval-overload.md diff --git a/quest/m1/README.md b/quest/m1/README.md index ebc75594efe..3e8825704d2 100644 --- a/quest/m1/README.md +++ b/quest/m1/README.md @@ -56,7 +56,6 @@ the same reason, gates the cut through the - [MoQ on rind](/quest/m1/rind/README.md) - every MoQ crate takes its crypto from rind, a pure-Rust graviola fork, so no build compiles C crypto - [VAAPI encode and decode](/quest/m1/video-vaapi.md) - H.265 encode and decode, pre-generated bindings, and pooled resize surfaces, including the moq-dev/vaapi release that carries them - [Read a texture back without an encoder](/quest/m1/video-readback.md) - moq-video copies a wgpu texture into packed RGBA with no encoder probe, for the studio's Linux virtual camera -- [The over-limit PUBLISH refusal invites a retry](/quest/m1/retry-interval-overload.md) - `EXCESSIVE_LOAD` sends the may-pass retry interval, not 0 - [A relay forwards an upstream refusal's retry interval](/quest/m1/retry-interval-forward.md) - a forwarded SUBSCRIBE refusal keeps the upstream's retry interval - [Tests run on a mocked clock](/quest/m1/mock-clock-tests/README.md) - about 300 tests stop proving nothing happened by waiting, sleeping to settle, or asserting on elapsed time diff --git a/quest/m1/retry-interval-overload.md b/quest/m1/retry-interval-overload.md deleted file mode 100644 index 1306ad1652c..00000000000 --- a/quest/m1/retry-interval-overload.md +++ /dev/null @@ -1,26 +0,0 @@ -# [XS] The over-limit PUBLISH refusal invites a retry - -## Goal - -The moq-transport refusal of a PUBLISH over the listed-track limit -(`EXCESSIVE_LOAD`, "too many listed tracks", `rs/moq-net/src/ietf/subscriber/tracks.rs`) -carries a non-zero retry interval, as draft-18 section 10.6.2 says it -SHOULD, instead of 0, which asks the peer never to retry. - -## Plan - -Decided 2026-11-06 (maintainer, /quest-complete, a follow-up of -[moq-dev/moq#7993](https://github.com/moq-dev/moq/pull/7993), which kept it -out of scope): - -- ✅ **Send the may-pass interval.** Over-limit is a refusal that may pass - once the peer unlists a track, so it sends the same interval #7993 sends - every refusal that may pass (`RETRY_INITIAL`, 1 s), from the same rule - rather than a new constant. Not chosen: keeping 0 and documenting the - deviation; a separate, longer constant for load refusals. -- ✅ m1: additive, no semver break. - -Starts once #7993 lands. A test asserts the refusal's decoded retry interval -on each moq-transport version that has one. - -Public API: none. Wire: the field's value only. diff --git a/rs/moq-net/src/ietf/error.rs b/rs/moq-net/src/ietf/error.rs index cb13f6c23ce..6b23f7942d4 100644 --- a/rs/moq-net/src/ietf/error.rs +++ b/rs/moq-net/src/ietf/error.rs @@ -253,9 +253,10 @@ pub(crate) mod request { /// A refusal asking again may pass invites the backoff a refused token starts from. 0 asks the /// peer never to retry a verdict, which would repeat. The code must leave the request open /// too: a failed session can carry a verdict (UNAUTHORIZED, NOT_SUPPORTED), and UNINTERESTED - /// tells an offer to stop. + /// tells an offer to stop. EXCESSIVE_LOAD may pass whatever the error, once the load drops. pub(crate) fn retry_interval(err: &Error, code: u64) -> u64 { - match err.retryable() && matches!(code, INTERNAL_ERROR | DOES_NOT_EXIST | GOING_AWAY) { + match code == EXCESSIVE_LOAD || err.retryable() && matches!(code, INTERNAL_ERROR | DOES_NOT_EXIST | GOING_AWAY) + { true => crate::auth::RETRY_INITIAL.as_millis() as u64, false => 0, } diff --git a/rs/moq-net/src/ietf/subscriber/tracks.rs b/rs/moq-net/src/ietf/subscriber/tracks.rs index e98ac98db9f..d5a917e7371 100644 --- a/rs/moq-net/src/ietf/subscriber/tracks.rs +++ b/rs/moq-net/src/ietf/subscriber/tracks.rs @@ -524,7 +524,11 @@ impl Subscriber { let error = ietf::RequestError { error_code: code, reason_phrase: reason.into(), - retry_interval: 0, + // The rule judges the refusal as the peer reads it. + retry_interval: request::retry_interval( + &request::from_code(code, request::Kind::Publish, self.version), + code, + ), }; request_stream::Reject::new(stream, error) } @@ -2122,6 +2126,26 @@ mod tests { } } + /// A PUBLISH over the listed-track limit is refused as EXCESSIVE_LOAD, which may pass once + /// the peer unlists a track, so it invites a retry (draft-18 section 10.6.2). + #[kio::test] + async fn an_over_limit_publish_invites_a_retry() { + for version in [Version::Draft18, Version::Draft20, Version::Draft22] { + let mut h = harness(version); + h.subscriber.announces = crate::session::Slots::new(0); + let _listing = h.establish().await; + let (_, id, body) = h.offer(offered("bcast", "video", 1)).await; + assert_eq!(id, ietf::RequestError::ID, "{version}: accepted"); + let refused: ietf::RequestError = body.message(version).unwrap(); + assert_eq!(refused.error_code, request::EXCESSIVE_LOAD, "{version}"); + assert_eq!( + refused.retry_interval, + crate::auth::RETRY_INITIAL.as_millis() as u64, + "{version}" + ); + } + } + /// A PUBLISH_DONE with TRACK_ENDED unlists the track as finished, and the listing stands. #[kio::test] async fn a_track_ended_publish_finishes_the_track() {