From bce9b5e390101b0410f198d983b296da3b0c5d8d Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Fri, 20 Nov 2026 17:13:23 -0800 Subject: [PATCH 1/2] chore(quest): claim quest/m0/nightly/relay-join-regressions.md Quest-Claim: a9cb4852b362af1c From d256f5d9c8c746e6ba7e2e2651c0f8f3432f3f70 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Fri, 20 Nov 2026 19:55:14 -0800 Subject: [PATCH 2/2] perf(moq-net): a lite-07 answer shows a claim at an allowed path without searching beneath it #9202 made Answer::shows build the permit's subtree intersection and rebase the handle's scope for every claim it syncs, though nearly every claim sits at a path both allow. Check that path directly first and keep the search for a claim above a region. Co-Authored-By: Claude Opus 5.5 --- quest/m0/nightly/relay-join-regressions.md | 30 ---------------------- rs/moq-net/src/lite/publisher/routed.rs | 10 +++++++- rs/moq-net/src/model/origin.rs | 6 +++++ 3 files changed, 15 insertions(+), 31 deletions(-) delete mode 100644 quest/m0/nightly/relay-join-regressions.md diff --git a/quest/m0/nightly/relay-join-regressions.md b/quest/m0/nightly/relay-join-regressions.md deleted file mode 100644 index e7fba628d1..0000000000 --- a/quest/m0/nightly/relay-join-regressions.md +++ /dev/null @@ -1,30 +0,0 @@ -# [M] The 2026-11-20 relay session regressions are fixed or accepted - -## Goal - -Nightly's Relay session benchmarks pass the paired comparison again: each -regression from 2026-11-20 is fixed, or accepted by the PR that caused it -with a stated reason. - -## Plan - -Found in run [44767045952](https://github.com/moq-dev/moq/actions/runs/44767045952), -`a759e4cf6` against `a4fa80a74`. Six regressions, consistent across all -three rounds, all on `moq-lite-07-wip`: - -- `relay_session_join_broadcasts/*` +12 to 20%, at 1 to 8 relays and 64 or - 1024 broadcasts. -- `relay_session_join_relays/relays=8/publishers=16` +14.8%. -- `relay_session_delivery_paced/relays=1/publishers=16/viewers=256` +26.9%. - -Suspects, the lite-07 route and subscription changes in that range: -[moq-dev/moq#9112](https://github.com/moq-dev/moq/pull/9112), -[moq-dev/moq#9155](https://github.com/moq-dev/moq/pull/9155), -[moq-dev/moq#9174](https://github.com/moq-dev/moq/pull/9174), -[moq-dev/moq#9179](https://github.com/moq-dev/moq/pull/9179), -[moq-dev/moq#9183](https://github.com/moq-dev/moq/pull/9183), -[moq-dev/moq#9202](https://github.com/moq-dev/moq/pull/9202), and -[moq-dev/moq#9219](https://github.com/moq-dev/moq/pull/9219). Bisect with a -paired local run of one `join_broadcasts` cell before changing code. - -Public API: none expected. Wire: none. diff --git a/rs/moq-net/src/lite/publisher/routed.rs b/rs/moq-net/src/lite/publisher/routed.rs index 26b4e0954c..a36a99a0f0 100644 --- a/rs/moq-net/src/lite/publisher/routed.rs +++ b/rs/moq-net/src/lite/publisher/routed.rs @@ -914,7 +914,15 @@ impl Answer { let (Some(suffix), Some(relative)) = (within, path.strip_prefix(self.origin.root())) else { return false; }; - (prefix.hidden || !suffix.is_hidden()) && self.origin.reaches_any(path, &self.permit.beneath(relative.as_str())) + if !prefix.hidden && suffix.is_hidden() { + return false; + } + // Most claims sit at a path both allow, which is one they cover; only a claim + // above a region needs the costlier search for one beneath it. + if self.permit.matches(relative.as_str()) && self.origin.permits(path) && self.origin.reaches(path) { + return true; + } + self.origin.reaches_any(path, &self.permit.beneath(relative.as_str())) } /// Bring the peer's claim `key` in line with what the node told and the answer diff --git a/rs/moq-net/src/model/origin.rs b/rs/moq-net/src/model/origin.rs index 2db491f070..6255fa6759 100644 --- a/rs/moq-net/src/model/origin.rs +++ b/rs/moq-net/src/model/origin.rs @@ -7842,6 +7842,12 @@ impl Consumer { && self.scope.mount(path).is_none_or(|mount| mount.resolve(path).is_some()) } + /// Whether the absolute `path` itself is in this handle's scope, not excluded. + #[cfg_attr(not(feature = "async"), allow(dead_code, reason = "async-only"))] + pub(crate) fn permits(&self, path: &Path) -> bool { + self.scope.permits(path) + } + /// [`Self::reaches`], and some path `allowed`, relative to this handle's root, holds /// is in its scope too. #[cfg_attr(not(feature = "async"), allow(dead_code, reason = "async-only"))]