From 73e5ae57bd2c0ac386e8e8edf3503f1fe42ea0d4 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Fri, 13 Nov 2026 10:16:45 -0800 Subject: [PATCH] fix(net): prove the lite session driver Send within the default recursion limit Parked and paused groups hold group and frame writers that reach the whole track model, which pushed the session driver's Send proof past the default recursion limit on nightly. SendCell proves them once at the TrackEntry. Co-Authored-By: Claude Opus 5.5 --- rs/moq-net/src/lite/subscriber.rs | 8 ++++++-- rs/moq-net/src/util/cell.rs | 8 +++++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/rs/moq-net/src/lite/subscriber.rs b/rs/moq-net/src/lite/subscriber.rs index 5c3418b711f..6c7e628deec 100644 --- a/rs/moq-net/src/lite/subscriber.rs +++ b/rs/moq-net/src/lite/subscriber.rs @@ -13,6 +13,7 @@ use crate::{ coding::{Decode as _, Reader, Stream}, lite, track::{Anchor, Position, Subscription}, + util::SendCell, }; use super::Version; @@ -178,10 +179,13 @@ struct TrackEntry { /// Where the subscription's groups go, once its TRACK_INFO says how to read them. A /// SUBSCRIBE sent alongside its TRACK registers before. copy: Option, + // Parked and paused groups hold group and frame writers, which reach the whole track + // model: the cells prove `Send` once here, so the session driver's proof stays within + // the default recursion limit. /// The group streams that arrived before the copy, while any wait. - parked: Option>, + parked: Option>>, /// Lite-07: the groups a YIELDED reset paused, once one did or a stream waits on one. - paused: Option>, + paused: Option>>, /// Lite-07: the groups a stream that a YIELDED reset would pause is reading, one per /// stream, so stream credit bounds them. yielding: BTreeMap, diff --git a/rs/moq-net/src/util/cell.rs b/rs/moq-net/src/util/cell.rs index 0c5601835a4..a53710a953b 100644 --- a/rs/moq-net/src/util/cell.rs +++ b/rs/moq-net/src/util/cell.rs @@ -28,7 +28,13 @@ impl SendCell { } } -// SAFETY: the only constructor requires T: Send + Sync. The private +impl Default for SendCell { + fn default() -> Self { + Self(T::default()) + } +} + +// SAFETY: both constructors require T: Send + Sync. The private // field cannot be replaced with another type; cloning preserves T's bounds. unsafe impl Send for SendCell {}