Repository navigation
fix(net): lite-07 fetches come back whole under load - #9768
Merged
kixelated merged 6 commits intoNov 27, 2026
Merged
Conversation
…load.md Quest-Claim: 98edc028fb7327c3
…its upstream judged WIP checkpoint: Rust side and the StaleRecover model. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A copy's too-old drop, not only its reset, stands only for a reader no wider than the budget its upstream asked, in Rust and JS, so a relay serving a one-shot fetch asks upstream instead of answering OLD from its own copy. JS mirrors the copy's judging budget, and a lite-07 fetch whose group stream reset lost its code (Firefox) ends with the reason the drop names. The stream-credit tab fetches again after TOO_FAR_BEHIND, as the draft says. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tands A lite-07 fetch whose group the publisher drops ends with the drop's reason at once, so a reset Chromium lost no longer holds it open. A group the reader's own fetch delivered that then fails too old ends the read in JS instead of asking the route again; Rust already does, now pinned by a test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A group read after looking past a copy's too-old verdict, or delivered by the reader's own fetch, stands on its own OLD, in Rust and JS, so a route gets at most one more request per group, across route switches too. A lite-07 fetch whose drop overtook its group header no longer takes that stream, whose reset Chromium may lose. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…quest Follow-up to the two accepted review findings on mid-group route switches, waiting on per-range-policy (#9719), which rewrites the relay copy. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kixelated
marked this pull request as ready for review
November 27, 2026 20:20
Contributor
|
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 8 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. |
kixelated
deleted the
quest/m0/test-flakes-5/stream-credit-fetch-under-load
branch
November 27, 2026 20:35
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Finishes quest/m0/test-flakes-5/stream-credit-fetch-under-load.md (deleted here, goal met).
Summary
Under load,
just test stream-credit --version moq-lite-07-wipgot empty fetches from three causes. All three are fixed here, without loosening the fetch check:SUBSCRIBE_DROP(OLD)).Recovertreated both the reset (undelivered) and the drop it recorded (poll_serving) as a final answer. So a one-shot fetch, which has no budget at all, got OLD even though upstream would still have sent it the group. That broke the cache rule in AGENTS.md.judging, the narrowest budget any of its upstream subscriptions asked. It is set before the request reaches the wire (track::Producer::judge_under, set on SUBSCRIBE, on pipelined accepts, and on every update).track::settlessays the reader is no wider than that budget. This is the same rule stale drops already follow on the track.hooks.judgeUnder/hooks.judgedUnderandRecover.#outgrows.Recover::judgedin Rust,#judgedin JS). So a route gets at most one more request per group.TypeError: Error in input stream. The tab then can't tell that the group was preempted. Now, when a lite-07 fetch's group stream fails without a code,@moq/netwaits for the subscription to end and fails the group with the reason the publisher's drop names (FetchTarget.lostinjs/net/src/lite/subscriber.ts). A matching drop also ends a fetch stream that is still open, which covers a reset Chromium lost. A stream that arrives after its drop is refused (FetchTarget.dropped), and a group received whole stays whole.Modeled first with the verify-resume skill.
rs/moq-net/verify/recover/StaleRecover.tlamodels one group read from a copy whose upstream budget retunes over time while the publisher judges the group under any budget asked so far.Rule = "wider",Recorded = "narrowest") passesAnswersAsUpstream(a read ends OLD only when the reader's own request would) andAsksOnlyWhenWider.Rule = "stand"(the old behavior) failsAnswersAsUpstream.Rule = "ask"failsAsksOnlyWhenWider.AnswersAsUpstream.Impact
@moq/netlite-07 fetch whose stream reset lost its code ends with the code from the drop.Validation
a_copys_stale_reset_stands_only_for_a_reader_no_widercovers bounded, longer, and live-edge readers, each with and without the recorded drop.a_copy_records_the_narrowest_budget_its_upstream_may_judge_underchecks that SUBSCRIBE and updates are recorded before the wire.a_fetched_groups_stale_reset_standsanda_group_fetched_from_another_route_stands_on_its_stale_resetcheck the one-request bound.resume.test.tscases, "a fetched group's stale reset stands", the extended lite-07 stale-budget test, and "a fetch whose reset lost its code ends with the reason its drop names". That last test covers the drop arriving before the reset, after it, with no reset at all, and before the group header.quest gate just checkpasses on336a7f6691. It ran 11,801 Rust tests plus the JS suites.quest gate just rs tla moq-net/verify/recover/StaleRecover.tlapasses.just test stream-credit --version moq-lite-07-wipon a 32-core host at load 23 to 33:mainbefore: Chromium had 50 failing fetches (TOO_FAR_BEHIND). Firefox had 5 (OLD).Recovertraced the remaining OLD fetches topoll_serving's drop verdict, and theTypeErrorfetches to Firefox resets that lost their code.just test interop --all: not run. There is no wire,moq-ffi, or gateway change.Decisions
The two open round-3 review findings are accepted (maintainer, 2026-11-27): ✅ accept them and land this PR (rejected: fix them here with per-group provenance in the track cache; drop the PR). Both need a group to switch routes partway between copies whose upstreams both asked a narrower budget than the reader:
The fix, recording on the copy which request delivered each group, belongs in
rs/moq-net/src/model/track.rs, which moq-dev/moq#9719 is rewriting. It is the new follow-up quest/m3/recover-group-provenance.md, which requires feat(net)!: per-range priority, order, and judged OLD drops on lite-07 #9719's per-range-policy quest. It sits in m3 because a quest cannot require one in a later milestone, and per-range-policy is in m2.Taken while the user was away, each on my recommendation:
SUBSCRIBE_DROP(OLD), drops can use it. Resets still needjudging.Caused by
No single PR.
Recover's verdict paths predate the per-budget stale drops of moq-dev/moq#8908, and no change since taught them that rule. The preemption and Firefox causes come from lite-07 one-shot fetches sharing the stream cap.Follow-ups
Recoverjudges a too-old verdict by the request that delivered the group, closing the two accepted review findings; also judges drops by the Max Age moq-dev/moq#9719 puts onSUBSCRIBE_DROP(OLD). Requires per-range-policy (feat(net)!: per-range priority, order, and judged OLD drops on lite-07 #9719). No open decisions.stream-crediton a host at load around 30, where the relay or publisher is starved past the tier's 500 ms budget. That is a harness sensitivity, not a protocol bug. Measure it before planning a quest.Models
Size: M
Implementer: Claude Code, claude-opus-5-5, unknown (arm A)
Implementer: Claude Code, claude-opus-5-5, unknown (iterate, M, arm A)
(Written by Claude Opus 5.5)
🤖 Generated with Claude Code
Review
Rewritten by
quest reviewafter each round.Head: 120add9
Base: origin/main at fcfa5b1
Risk: medium,
A mistake could make relay readers and JS subscribers either end groups too old that upstream still sends, or re-ask routes more than they should, in shipped fetch and resume code; it keeps the public API and wire format, and a revert undoes it cleanly, so it is medium rather than high.Classified: medium by Claude Code, claude-haiku-5-5, low effort, session
a2848117-d78e-46c2-b615-ac9796f76523Risk file: bb7b1c0de60b
Accepted by the maintainer:
Maintainer accepted both open mid-group route-switch findings on 2026-11-27 and chose to land this PR; the fix (per-group delivery provenance on the relay copy) is follow-up quest quest/m3/recover-group-provenance.md, which waits on moq-dev/moq#9719 rewriting rs/moq-net/src/model/track.rs.Reviewer: Codex, gpt-6.2-sol, high effort
Session:
01a21dfb-f323-7310-8978-cab064fadf4e, round 4Score: 7/10,
The maintainer approved landing with both cross-route recovery defects deferred, and the new commit records that decision without changing either code path.Rounds: 4; first round 2 (medium 2); findings 3 (medium 3): fixed 1, refuted 0, open 2
Findings, accepted by the maintainer:
rs/moq-net/src/model/resume.rs:4231:Preserve recovery fetch provenance through the cachers/moq-net/src/model/resume.rs:4377:Keep one route’s OLD verdict from settling another route’s live deliveryThe last round's findings, at 336a7f6:
rs/moq-net/src/model/resume.rs:4231:Preserve recovery fetch provenance through the cache;`quest/m3/recover-group-provenance.md:7` and `:14` record the maintainer’s decision to defer the fix, while the cache path still loses fetch provenance.rs/moq-net/src/model/resume.rs:4377:Keep one route’s OLD verdict from settling another route’s live delivery;`quest/m3/recover-group-provenance.md:8` and `:14` record the maintainer’s decision to defer the fix, while adoption still carries the first route’s judgment onto the second route’s live delivery.