Repository navigation
fix(net): an ordered read waits on a time start's history lookup - #9639
Conversation
Quest-Claim: ffcf5e4fecd04cd7
A time start before every group held is looked up through the track's history handler. The ordered read held a later group only for a time start waiting on the groups held, so it handed out the later group first and never returned the one the lookup found. It now holds for a pending lookup too, and the window reports no floor until the lookup answers. Rewrites quest/m1/relayed-refused-fill-gap.md to the decision that remains. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Maintainer decision (/quest-run, 2026-11-25):
(Written by Opus 5.5 with high) |
…n relayed-refused-fill-gap Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Maintainer decisions (/quest-run, 2026-11-25):
(Written by Opus 5.5 with high) |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…me start Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. WalkthroughJavaScript and Rust windows now report time starts awaiting history lookups as unresolved and withhold the floor while lookups remain outstanding. Rust polling now checks unresolved starts. New tests cover ordered reads that receive an earlier group from a fill. The quest note records reader behavior and decisions related to refused fills. Merge Risk:
|
Claims quest/m1/relayed-refused-fill-gap.md. Lands only the lookup-hold fix. The quest stays, rewritten to the remaining L work, which starts on top of moq-dev/moq#9626's wire.
Problem
An ordered reader on a track with a history handler (
track::Requests), whose time start comes before every group held, handed out a later group while the time's history lookup was still out. If the lookup then found a lower group, the reader never returned it and hung. Example: ranges[Time(10)..20, Time(66)..], live group 66, and history holding group 10.The same early hand-out hid the gap the quest is about: the relayed reader's
Err(10..21)is the publisher's own NotFound answer, which the direct reader skipped past.Approach
Window::unresolved_in(waswaiting_in) also yields time starts still being looked up, soCursor::poll_time_startholds a later group until the lookup answers.Window::floorisNonewhile a lookup is out. A dropped lookup can resolve to the held group just below the lookup's floor, so neither the groups in range nor that floor bound it.Window.unresolvedIn,Window.floor). JS also checks the time start before passing a stale buffered group, which advanced the cursor past the looked-up group (Rust's stale skip keeps the gap's start, so it already held).Impact
Decisions
Answers: first, then the maintainer's /quest-run round on 2026-11-25.
Alternatives
NotFoundgap (the quest's original plan): rejected, since the publisher itself reports that gap once asked.fill: a time start just past a held group, dropped, starts at that group, where a dropped lookup resolves below its floor.Caused by
Validation
waiting_time_start::a_looked_up_time_start_reads_before_a_held_later_group(Rust) anda looked-up time start reads before a held later group(JS). Each failed before the fix: the Rust one readOk(66)first and hung, and the JS one returned group 66 before the lookup. JSa stale group waits behind a looked-up time start(from review round 1) passed the stale group 66 and returned 5000 before the lookup.cargo test -p moq-net --all-features: all pass.bun testinjs/net: 3901 pass.just checkpasses.Follow-ups
Models
(Written by Claude Opus 5.5)
Review
Rewritten by
quest reviewafter each round.Head: 09482ff
Base: origin/main at 542a34a
Risk: medium,
A mistake could make ordered subscription reads in the JS and Rust net crates hand out groups in the wrong order or stall on a time start's history lookup, reaching consumers of the next release cut; it is a fix that keeps the public API and wire format, and a revert undoes it fully, so it is not high.Classified: medium by Claude Code, claude-haiku-5-5, low effort, session
a1ef7b33-a887-4608-a229-91da57fe3c4aRisk file: bb7b1c0de60b
Reviewer: Codex, gpt-6.2-sol, medium effort
Session:
01a2153c-20be-7db0-b7e2-fef36cf717c2, round 2Score: 10/10,
The JavaScript ordered reader now preserves pending history results when a later buffered group expires, and the follow-up introduces no findings.Rounds: 2; first round 1 (medium 1); findings 1 (medium 1): fixed 1, refuted 0, open 0
Findings: none
The last round's findings, at 5dc138d:
js/net/src/track.ts:6504:Check pending history lookups before skipping stale groups;At js/net/src/track.ts:6672, the reader checks the unresolved history start under its own budget before advancing past the stale group, and the regression test at js/net/src/ordered.test.ts:824 covers group 10 arriving after group 66 expires.