Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion quest/m2/cluster-routing/routes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,6 @@ benchmarks.
- [Route layer acceptance](/quest/m2/cluster-routing/routes/acceptance.md) - forwarding fixtures ported and the model deleted, incident fixtures, end-to-end checks, and benchmarks
- [Firefox tabs prove their route key](/quest/m2/cluster-routing/routes/browser-proof.md) - a current Firefox tab opens a lite-07 session with a route-key proof the relay verifies, once neqo's exporter follows the draft
- [Playwright bundles Chromium's spec exporter](/quest/m2/cluster-routing/routes/playwright-pin.md) - the toolchain's Playwright bundles Chromium 158+, so the route key lane proves the Chromium tab
- [The route node behaves the same whoever creates it](/quest/m2/cluster-routing/routes/node-creation-order.md) - creating an origin's lite-07 route node from SETUP instead of the route layer changes nothing observable

## Related

Expand Down
73 changes: 0 additions & 73 deletions quest/m2/cluster-routing/routes/node-creation-order.md

This file was deleted.

54 changes: 35 additions & 19 deletions rs/moq-net/src/model/origin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7327,23 +7327,33 @@ impl Consumer {
}

fn create_route_node(&self) -> (crate::route::Node, std::sync::Weak<std::sync::Mutex<OwnClaims>>) {
// The whole table, whatever this handle's scope, counted against no session.
let own = |upstream| {
Self {
scope: OriginScope::default(),
root: Path::default(),
horizon: Horizon {
node: NodeFilter::Own,
upstream,
..Horizon::default()
},
covering: false,
stats: stats::Session::default(),
..self.clone()
}
.with_hidden(true)
// Feeding the node is no reason to ask any peer about anything.
.serving()
// The whole table, counted against no session: only origin-wide state, so the node
// is the same whichever handle creates it. No `..self` here, so a new per-handle
// field cannot leak in.
let own = |upstream| Self {
hop: self.hop,
max_hops: self.max_hops,
scope: OriginScope::default(),
root: Path::default(),
shared: self.shared.clone(),
stats: stats::Session::default(),
horizon: Horizon {
node: NodeFilter::Own,
upstream,
..Horizon::default()
},
hidden: Hidden {
include: true,
from: None,
},
// Feeding the node is no reason to ask any peer about anything, as when serving.
covering: true,
interested: false,
proxy: false,
pool: self.pool.clone(),
cache_duration: self.cache_duration,
tasks: self.tasks.clone(),
timers: self.timers.clone(),
};
// Built before taking the lock, since opening a cursor takes it.
let node = crate::route::Node::origin(self.hop());
Expand Down Expand Up @@ -10710,11 +10720,17 @@ mod tests {
}

/// A route node already fed by its driver still answers a new stream with the table as
/// it stands, including a claim announced since the driver last ran.
/// it stands, including a claim announced since the driver last ran, whichever handle
/// created it: one scoped away from the claim, upstream, proxying, and hiding hidden
/// routes sees the whole table all the same.
#[test]
fn the_route_node_answers_with_the_table_as_it_stands() {
let producer = origin(1).produce();
producer.route_node();
(producer.clone().with_link(Link::Upstream).with_proxy(true).consume())
.scope("elsewhere", &Patterns::from(Pattern::all()))
.unwrap()
.with_hidden(false)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with_hidden(false) is the default, and the only claim announced below is room/alice, which has no . segment, so a feeder that inherited hidden.include = false would still serve it and this assertion would pass — I confirmed by leaking self.hidden into the literal. The quest's failing case was a hidden route (room/.server/bob) staying routable, so announcing that path would make the hidden reset actually bite (it fails with the leak and passes with include: true). with_proxy(true) cannot bite the same way: the feeder's TableCursor holds no proxy field, so it documents the handle rather than testing a lever.

.route_node();
// Nothing polls this test's driver.
let _shown = producer.announce("room/alice", RouteInfo::new()).unwrap();
let link = crate::route::Link {
Expand Down
Loading