Repository navigation
fix(net): the router ranks one claim prefix's filings as one tier - #9610
Conversation
Quest-Claim: 2fb8773a1a2e7ef3
The lite-07 router resolved a request against the deepest filing its reader showed, so a reachable claim was shadowed by an unreachable copy of the same claim filed deeper (Above), and a relay refused a request naming its own claim when a peer's copy of that claim was filed below it, though the origin and the draft already rank every filing of one prefix as one tier. `Router::tier` lowers each covering filing's shown claim to the request path and keeps those of the best precedence, so pick, step, awaits, and what an endpoint or scoped neighbour asking at a prefix is told all follow the claim the draft's Resolution picks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…holds Among a named node's equal-precedence filings, `Router::named` now ranks one some neighbour other than the asker holds available ahead of one that wins where it is filed, so a request is not refused when a broader filing is unavailable while a deeper copy of the same claim has a lane. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Design change: taking the local reviewer's recommendation for the last finding ( (Written by Claude Opus 5.5) |
…able `Router::named` now counts a filing as served only where this node knows the claim available and a next hop holds it, as `ways` gives a lane, so a lagging neighbour still holding a copy this node learned unavailable no longer pulls a named request to a filing with no lane. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 13 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
The lite-07 router now ranks every claim of one prefix as one tier, wherever each is filed, as
model::originand the moq-lite-07 draft's Resolution and Above text already do (moq-dev/moq#9371). A reachable claim is no longer shadowed by an unreachable copy of the same claim filed deeper, and a relay no longer refuses a request naming its own claim because a peer's copy of it is filed below.Changes
Router::tier(rs/moq-net/src/route/relay.rs) gathers the claim the reader shows at the request path and at each filing above it. Each is lowered to the path (its Above counted from there) and only those of the bestprecedenceare kept. Lowered, a claim's Above is the same at every filing of one prefix, so the existing precedence order is the tier rule: longest prefix first, then the newest epoch, reachable or not.pick,step(own and named), andawaitsresolve against the tier instead of stopping at the deepest filing.resolvetakes the bestclaim_orderacross the tier's filings.Router::filedgives the filing a request naming a node follows. That is the deepest filing of the tier where the node's claim is available (eligible). Otherwise it falls back tonamed: the node's best-lowered filing, preferring one whose claim this node knows available and some next hop other than the asker holds (lead), aswaysgives a lane, then one where its claim is the one the reader shows there, whichwaysgives a lane.Node::forward(route/node.rs) now confirms the lane at that filing instead of the deepest lane of the claimant.Liveupdate, never a withdrawal.ways/primarystay per filing: the origin ranksprimarylanes across filings by rank, which gives the same tier pick.Claim.agdaheader (comments only) now say that a claim filed above the destination reaches it lowered, so one prefix's filings rank as one tier. The algebra itself already ranked lowered claims by precedence, so no definition changed.quest/m2/README.md,quest/m2/lite07-finalize.md's Required).Public API and wire impact
None. Crate-private router only. No wire change; the router now conforms to the draft text, so the draft needs no edit. JS has no router (
js/netis endpoint-only and already ranks tiers viabestOfTier), so there is no JS counterpart.Caused by
Decisions
Taken without the maintainer (afk). Each one is my recommendation:
TableCursor::best(routes.at). The receiver ranks the tier itself.just test route-proofpasses.next decide). ✅ Fix it as the reviewer suggested: among a node's equal-precedence filings,namedranks one some neighbour other than the asker holds available ahead of the one that wins where it is filed (rejected: accept the finding, since it needs a lane handover with an unavailable broader filing and a marked exact claim at once; drop the PR). Taken by the coordinator while the maintainer was afk.tierandnamed. It can only happen when one claimant holds two filings of the same prefix.Validation
a_claim_prefix_ranks_as_one_tier_wherever_filed(single router):step(me, src/a/b)returnedNonewhile node 5's deeper copy lived, andpickreturnedNoneafter its route died.a_request_named_by_the_tier_downstream_is_served_upstream(three routers P–R–D over the sharedsettlemesh): D picked P's deeper copy over R's cheaper claim, and R refused a request naming itself.a_named_request_outside_its_tier_follows_a_copy_a_next_hop_holds(added for the review's last finding):filedreturnedsrc, the node's unavailable broader filing, while a neighbour held itssrc/acopy. It passes with the fix.a_named_request_outside_its_tier_follows_a_copy_known_available(from the next review session's round 2): with an exact claim atsrc/a/bandsrc/arevised unavailable while a lagging neighbour still held it,filedreturnedsrc/a, which has no lane. It passes with the fix.cargo test -p moq-net --lib: 1697 passed.--include-ignored route::tests::multicast_search: 10 passed.just test route-proof(Agda, throughquest gate): passed.just check: passed.Routerwas exercised through unit and mesh tests only./verify-warmand/verify-failover: they abstract routing to one broadcast and to any live upstream winning, so neither models a filing (per the quest).just test interop --all: no wire,moq-ffi, or gateway change.Overlap
model/origin.rsandjs/net, notroute/relay.rs. No conflict.For
quest/m0/nightly/resume-route-mutants.mdNew mutable code in
route/relay.rs:tier,resolve,named,closest_of(now with an optional fixed precedence), andprecedence_at. Likely equivalent mutants:named'slowered < *bestto<=: only flips which of one claimant's two equal-precedence filings is followed.precedence_at'ssaturating_addto+: Above and depth are bounded by the 32-segment path.The rest are killed by the two new tests and the existing request tests.
Follow-ups
None.
Models
🤖 Generated with Claude Code
(Written by Claude Opus 5.5)
Review
Rewritten by
quest reviewafter each round.Head: 4a136a6
Base: origin/main at 4fab6f0
Risk: medium,
A mistake in the rewritten lite-07 router tier logic in rs/moq-net/src/route/relay.rs and node.rs could make relays pick the wrong or no upstream for a request, failing requests for relay operators and their viewers who opt in to moq-lite-07-wip. It keeps the public API and wire format (the plan states no wire changes), and a revert fully undoes it, since it only changes shipped behavior before the next cut, so it is shipped-code behavior rather than a high-tier break.Classified: medium by Claude Code, claude-haiku-5-5, low effort, session
b801d996-d259-4197-a1fa-aa0e3d957a3aReviewer: Codex, gpt-6.2-sol, xhigh effort
Session:
01a21384-00a2-7301-b74c-ae8973a7ec42, round 3Score: 10/10,
Named requests now use the available filing when a lagging neighbor still advertises an unavailable deeper copy at the same precedence.Rounds: 6; first round 2 (medium 2); findings 5 (medium 5): fixed 3, refuted 2, open 0
Findings: none
The last round's findings, at b1e071b:
rs/moq-net/src/route/node.rs:1040:Select the named filing and its serving lane together;`named()` now ranks the locally unavailable `src/a` below the live `src` filing at equal precedence (`rs/moq-net/src/route/relay.rs:2665`), and the regression test checks the selected filing, next hop, and serving lanes.