Repository navigation
fix(moq-net): a lite-07 relay waits for a claim's route before answering a request for it - #9052
Conversation
Quest-Claim: 711ab70bfea21d4a
…ing a request for it The route node shows a peer's claim to every session it reaches in the same flush that queues the claim's route for the session serving it, and each session applies its outbox on its own task. A reader that asked the moment it heard could reach the origin before the serving session landed the route and be refused Unroutable, with nothing to make it ask again. A request naming an instance now waits on the node's confirmation, as one naming a node already did, without narrowing the origin it resolves through. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. WalkthroughThe lite publisher now waits for a claimed route before returning an origin when a request does not name a node. An asynchronous integration test checks this behavior. The change also removes an interop unroutable-subscription note and adds a note about a hanging Python finish publisher. Merge Risk:
|
There was a problem hiding this comment.
✅ No new issues found.
Approach: sound — the relay handed a peer's claim to other sessions in the same flush that queued the serving session's Output::Serve, so a reader could ask before the origin held the route; the fix reuses the confirmation the named-node path already waited on rather than moving route landing out of the session that owns the permit, hop chain, and loop check.
Reviewed changes — the whole diff (4 files, 2 commits) at d309bc1.
poll_node_filternow waits for an instance-only request's claim — thenode = Nonebranch computesclaimonce (origin.resolve(broadcast).zip(instance.cloned())) and, when present, waits onNode::poll_forward(tag, None, &claim)before returning the unfiltered origin.State::forwardwithnamed = Noneanswers immediately unless the picked route's slot isConfirm::Waiting, andStream::servingbumpsmovedright afterorigin.forward, so the wait is the same edge the named-node path already parked on. The discardedViais right: the node's refusal must not become the answer, and the request still resolves through the whole origin.- No effect on pre-lite-07 sessions —
lite::instance::decode_pin/decode_nodeno-op withoutversion.has_routes(), so older requests carry no instance,claimisNone, andorigin.route_node()is never touched; on a non-proxy publisher app the own claims come backVia::Here, so nothing waits. - Regression test — a real lite-07
Client/Serverpair overtransport::memory::pair; the upstreamasking()session files the claim and withholds itsServeoutput until after the reader has subscribed, then drains it viatry_serve()/output(). Thesubscriber.sources.poll_popassertion is the right observable: it only fires once the relay's lookup reached the source the claim landed, and without the fix the request is refusedUnroutableand never retried. Simulated clock throughout. - Quest turnover — the claimed quest is deleted (no dangling references in
quest/), and the one python publisher hang from the interop run is filed as a follow-up quest with a measurable goal and matching format.
I checked the interaction with REVIEW.md's "no cross-session waiting" rule and AGENTS.md's "reports what it knows now": the wait is on the node's own handoff to the origin, not on another node answering, and it is the only option the quest's constraints leave (holding announcements changes what the node shows, which the route rule owns). Residual gap — a request naming no instance — is only reachable through a covering-route announce and is recorded in the PR's Decisions.
deepseek-v4.1-flash | 𝕏
|
@coderabbitai review (Written by Claude Opus 5.5) |
Action performed
|
|
Maintainer decision (2026-11-18, asked in the coordinating session with this PR's report): picked to merge, and the follow-up quest (Written by Claude Fable 5.2 with high effort) |
|
Answering the decision in #9052 (comment): no change to the head is needed. The follow-up quest has no open decision to record, and the pick is queued. (Written by Claude Fable 5.2 with high effort) |
The switch (#8987, #9052, #9053) replaced lite-07's path rule. Delete the switch quest, the Playwright bump whose only reason was the route key lane, and route fan-out, whose surviving cost moves to route benches. Retarget federation, the routing guide, route wakes, handoff routes, regrant, interest-stream caps, the mesh condition, and route memory to the route layer on main, and trim the two route epics to what still stands. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Claims quest/m0/test-flakes-3/interop-finish-unroutable.md and finishes it.
Problem
On lite-07 a relay could answer UNROUTABLE to a reader that subscribed the moment it heard of a broadcast, as the interop
finishlane's readers do for<broadcast>.health. The refused reader never asks again.Cause: the relay's route node shows a peer's claim to every session it reaches in the same flush that queues the claim's route (
Output::Serve) for the session serving it. Each session drains its own outbox on its own task. Under load the downstream session can announce the claim to the reader, and the reader's SUBSCRIBE can arrive, before the upstream session's task runsRouted::serve→origin.forward. The origin then has no route for the path, andConsumer::lookuprefuses (best_route→None). Traced in a failing run:lookup: no best routewas logged before the upstream session'srouted: announcefor the same path. The "source closed" the quest's log showed after the refusals is the ended first broadcast's source on the same upstream task. It runs late for the same reason, and does not cause anything.This is not a flaw in the route rule or the wire. The rule says the node shows a claim and a request follows it. The relay broke the local order by answering from the origin before the node's own output had landed there.
Approach
lite::publisher::Shared::poll_node_filteralready waited onroute::Node::poll_forwardfor a request naming a node, until the session that serves the claim confirms it (Stream::serving, which runs right afterorigin.forward). A request naming only an instance now waits on that same confirmation (poll_forward(tag, None, claim)) before it resolves. It still resolves through the whole origin, as before. A claim the node does not know (local, or not shown) returns at once, so only a request for a claim the node is still landing waits.Impact
Validation
lite::subscriber::routed::tests::a_request_for_a_claim_shown_waits_for_its_route. A real lite-07 reader session reads from a relay origin whose upstream claim has reached the node, but whoseServeoutput the test applies by hand only after the reader has subscribed. It fails without the fix (the request never reaches the claim) and passes with it..healthon the same session. Onmainit failed after 72, 148, 374, 544, 658 and 827 rounds, with the relay loggingsubscribed error ... err=unroutableand the reader hanging, as in the lane. With the fix: 6 × 3000 rounds, no failure. The stress test was not kept: moq-net tests don't use tokio, and the deterministic test covers the ordering.just test interop --all --finish: every row passed exceptpython -> *. Every python reader passed (health=ok), the relay refused nothing, and the python publisher hung before printingfinish acknowledged. A rerun of the python row passed 9/9. This is a different, publisher-side flake, filed below.just checkpasses./verify-route: the route rule and what the node shows are unchanged. The fix orders a request after the node's own output lands in the origin, whichRouteHandoff.tladoes not model.Caused by
finishlane while validating that PR). The same stress test on its parent,0c14c87c49, ran 6 × 3000 rounds with no failure. Before it, a claim reached a reader only from the origin's table, so it could not be shown before it could be served.Decisions
Alternatives
Routed::serveneeds the session's permit, hop chain and loop check, so it belongs on the session.Follow-ups
Models
Size: M
Implementer: Claude Code, claude-opus-5-5, unknown effort (arm A)
🤖 Generated with Claude Code
(Written by Claude Opus 5.5)
Review
Rewritten by
quest reviewafter each round.Head: d309bc1
Base: origin/main at 0a4a977
Risk: medium,
the base has no RISK.md to name what is always high or customer-facing, so every change is mediumClassified: medium by default
Reviewer: Codex, gpt-6.1-sol, high effort
Session:
01a1ecf3-9805-7911-a55c-316d6e126c6d, round 1Score: 9/10,
No actionable defects found: the fix reuses existing route-confirmation logic and adds a simulated regression test, but builds and tests were not run as instructed.Rounds: 1; first round 0; findings 0: fixed 0, refuted 0, open 0
Findings: none