Repository navigation
Conversation
Quest-Claim: 81c39459c0263bea
…, replacing SUBSCRIBE_SKIP Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A reset after GROUP_END may cut it on the wire, so the publisher re-tells the span's inner starts as skips that wait for the group above (its Previous Delta) or a NOT_FOUND drop. The subscriber now validates a GROUP_END before accounting for its span. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…pEnd SubscribeAccounting.tla drops SUBSCRIBE_SKIP: a skipped start waits for the header of the group above it (Previous Delta) or a drop naming it, or is dropped as not found once none will. A reset after GROUP_END re-tells the starts it accounted. QuietIsSettled now asks for every start, so CutGroupEnd.cfg passes and is no longer an open finding; NoContradictoryDrop is split out of NamedOnce. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A skip the cursor gave up before SUBSCRIBE_START was forwarded whole at resolve, re-telling as Skip what a served group's Previous Delta had already proved, which then went out again as a NOT_FOUND drop. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lta, replacing SUBSCRIBE_SKIP Mirrors the Rust side: GROUP carries Previous Delta, SUBSCRIBE_SKIP (type 3) is gone, and the publisher defers a skip to the header of the group above it, names it in that group's drop, or drops it as not found once nothing will. A reset after GROUP_END names the span's starts again. The record no longer lets a skip go out over a drop. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…IBE_SKIP The draft proves a declared skip with the Previous Delta of the GROUP just above it, names it in that group's drop or with NOT_FOUND where no GROUP can prove it, names again the starts a reset after GROUP_END may cut, and drops the subscriber's grace period. Comments that still named SUBSCRIBE_SKIP follow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 25, 2026
…resh group first The raw GROUP streams in receive_credit gain the Previous Delta field. The two-relay refresh test raced the late join's answer against the fresh group: the fresh GROUP's header now proves the cached group superseded the moment it lands, so a zero max age skips the cached one unless it was read first. Read it before driving the refresh, which still shows refresh never holds it. Also clippy: rfind over filter().last(), and a single-range match. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…isions The verify-subscribe sync commit moves to the last Rust change it covers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Conflicts: main edited the skip-over-drop tests this branch deleted with that machinery, and its stale-hole cap meets this branch's hasPrevious. A new publisher test no longer filters for SUBSCRIBE_SKIP, which lite-07 lacks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
finish_shared is reached only from moq-transport, outside the lite-07 epic, and the quest its recommendation named finished on main. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
|
Maintainer decisions (/quest-run, 2026-11-25):
(Written by Opus 5.5 with high) |
A lite-07 track is proven: its publisher names every start, so the tail, the producer's miss grace, and resume copy retention wait for the wire to account for a gap instead of a timer. The excused-stream bound stays until browser WebTransport exposes RESET_STREAM_AT. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… a drop A plain RESET_STREAM lets the peer's transport discard a Group Stream's GROUP header unread, even once acknowledged, so a held header accounts for nothing there. poll::Session::reliable_reset says whether a reset keeps its prefix (moq-quic and qmux-02 with RESET_STREAM_AT negotiated, the memory transport); the lite-07 publisher holds the header only then and otherwise names the reset group in SUBSCRIBE_DROP with the reset's error. JS mirrors it through @moq/qmux's new SendStream.reliableReset. The draft drops the hold-until-ACK fallback and the subscriber's MUST to read every header on arrival. SubscribeAccounting.tla gains ReliableReset and PlainReset.cfg. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…verify-subscribe syncs to 74e935b Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…; previous-delta waits on the marker question Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…P name every empty start The maintainer removed Previous Delta: the previous group's GROUP_END End already proves the starts up to it empty, and a control message covers the rest. lite-07 keeps main's SUBSCRIBE_SKIP (its own message, not a drop code, since a drop's code ends readers and a skip is final cacheable emptiness) for a discontinuity, a first group, a group closed without an end, and a GROUP_END a reset may have cut, which the publisher re-tells as a skip in Rust and JS. Still in force from this PR: zero lite-07 timers, a reset without RESET_STREAM_AT named in a drop, and every drop final on the wire, so no skip goes out over a drop but a cut GROUP_END's re-tell, which changes nothing for a dropped start. SubscribeAccounting.tla models SKIP as a message again, with ReliableReset and the cut re-tell; CutGroupEnd.cfg now passes QuietIsSettled with every start accounted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…262a76 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ests drop the Previous Delta plan Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Three cases the zero-timer lite-07 left open (review round 1): - A gap no live range owes, such as one between two of a subscription's ranges, stops being owed when the range retires: a proven tail folds the ledger gaps outside every live range (Rust `Tail::retire`, JS `Tail.retire`), so the ledger no longer keeps a run per visited interval. `finish_shared` ends a proven copy at its declared end, error included, once the wire settles its tail. - A Group Stream the subscriber discards before reading its end, such as one its transport evicts after the FIN (no STOP_SENDING), is named in the next lite-07 SUBSCRIBE_UPDATE's new `Lost` list, and the publisher skips the starts inside its span again, as for a cut GROUP_END. A parked stream that fails before TRACK_INFO still has its group opened and ended, so the copy and tail learn of it. - The TLA+ model gains SubLose/PubLost and LostGroupEnd.cfg, which fails QuietIsSettled without the re-tell. Also: the cut-path test runs through `settle_reset`, JS's recovery drain gives up at GRACE like Rust's `Settle::at_most`, and stale "a skip replaces a drop" docs say no skip goes out over a drop. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… gaps are decided and fixed Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review round 2 on #9626: - Updates waiting for a reply to start keep no Lost list: no group went out on the subscription yet. The publisher's re-tell queue (Rust `GroupOutcomes::cut`, JS pending cuts) is a merged range set, and JS resolves Lost as it decodes, so a repeated report costs nothing more. - A proven tail reports every stream discarded before its end. The next start being accounted for proves nothing when a skip or drop named it. Rust bills the lost set with the ledger; both sides dedupe it. - A recovery subscription reports its lost streams, in Rust and JS. - A parked stream that fails before TRACK_INFO leaves the wait list at once and is accounted for in the tail then. Only its group key stays, merged, for the accept to end. Withdrawal no longer scans the list. - The draft says only a next start that arrived as a Group Stream lets a subscriber leave a Group out of Lost. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d lost span Codex review round 2 findings 1-3 each need a maintainer call: the tail ledger budget and what a re-added range owes, and how a publisher answers Lost for a group its cache evicted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The update named no range edit, which the lite-07 encoder refuses, and the catch swallowed that. It now carries an empty edit, as the subscription's own update does, and only a failed write is swallowed: one that cannot encode fails the recovery. Review round 3 on #9626, findings 4 and 9. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… out As the subscription does, so a blocked control stream leaves the lost groups in the billed tail rather than in the writer. The quest folds review rounds 2 and 3's bound findings into one per-subscription accounting budget decision. Review round 3 on #9626, finding 7. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
|
Superseded by #9686 (which merges (Written by Gemini 4 Neon with high) |
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.
Works on quest/m2/lite07-subscribe/previous-delta.md.
Summary
lite-07 now settles every start without a timer. Each start is accounted for by one of:
GROUP_END, whoseEndaccounts for the starts inside the span;SUBSCRIBE_SKIPfor an empty start noGROUP_ENDcovers;SUBSCRIBE_DROP;SUBSCRIBE_END.The
GROUPheader is unchanged from main: noPrevious Delta.moq-transportkeep their graces.SUBSCRIBE_DROPwith the reset's error. That covers a peer withoutRESET_STREAM_ATand a browser's WebTransport.RESET_STREAMlets the peer's transport discard unread data, even acknowledged data, so holding the reset until the ACK proved nothing.poll::Session::reliable_reset()(defaultfalse) says whether a reset keeps its prefix. It is true for moq-quic and qmux-02 withRESET_STREAM_ATnegotiated, and for the memory transport.@moq/qmux's newSendStream.reliableReset.GROUP_ENDmay cut theGROUP_ENDon the wire. When it still accounts for the group, the publisher sends the span's inner starts again as aSUBSCRIBE_SKIP, in Rust (GroupOutcomes::cut) and JS.CutGroupEnd.cfg, formerly an open finding, now passes.GROUP_END's re-tell, which may skip a start dropped before its group finished. That skip changes nothing for the start: its readers already ended, and the producer did declare it empty.GROUP_ENDis validated before the tail accounts for it.Tail::retire), so the ledger no longer keeps a run per visited interval.finish_sharedends a proven copy at its declared end, error included.Lostlist. The publisher then skips the starts inside its span again, as for a cutGROUP_END.Lost, in Rust and JS:Lostlists, since no group went out yet. The publisher's re-tell queue is a merged range set bounded by its cached spans. The subscriber's lost set is deduped, and Rust bills it with the tail's ledger.#9579's
Fold::FinaldecisionOn lite-07, a skip at K+1 says nothing about whether group K's stream landed. Only K's own stream, or a drop naming K, proves that. lite-07 has no grace to cover the unsound case, so moq-dev/moq#9579 should drop the "a Skip at K+1 proves K landed"
Fold::Finalrule rather than repair it. The pre-lite-07 wires keep their graces and don't need the rule either.Impact
RESET_STREAM_ATcovering its GROUP header is named inSUBSCRIBE_DROP.GROUP_ENDthat a reset may have cut or the subscriber reported lost.Lost Count (i), Group Start (i)...after the retune list, beforeWanted Start. These are new bytes, so two lite-07-wip peers from either side of this PR misparse each other's SUBSCRIBE_UPDATE.moq_net::transport::poll::Session::reliable_reset()defaults tofalse. A custom transport whose resets keep their prefix should returntrue; otherwise lite-07 names every reset group in a drop.moq_quic::Connection::reset_stream_at()and the muxConnection::reset_stream_at()are new.@moq/qmuxSendStream.reliableResetis new.GRACEeven on a tail without a grace, as Rust'sSettle::at_mostdoes. Only a publisher before lite-07 reaches that path.poll::Sessionover a transport with reliable resets implementsreliable_reset(), so lite-07 doesn't name its reset groups.Decisions
Settled by the maintainer on 2026-11-26. This overrides the earlier
Previous Deltaplan (2026-11-24) that this PR first implemented:GROUP_ENDEndproves the gap, and a control message covers what noGROUP_ENDcan prove.SUBSCRIBE_SKIP, kept as its own message rather than aSUBSCRIBE_DROPcode:NOT_FOUNDdrop says only "not here".Endand the next start;GROUP_ENDa reset may have cut.Settled by the maintainer on 2026-11-26 (/quest-run), on review round 1's three zero-timer cases: fix all three in this PR. The rejected options were a bounded lite-07 backstop grace, and restoring the graces to remove them in a follow-up.
GROUP_ENDbefore evicting it. The transport evicts without knowing moq-lite framing, and a stream parked on TRACK_INFO cannot be parsed yet. lite-07 already keeps the Subscribe Stream open pastSUBSCRIBE_END, so aLostlist on SUBSCRIBE_UPDATE also reaches a publisher that already ended the track.Lostwhen its next start is already accounted for, since that ends the span. This keeps the publisher's own resets from echoing back on a contiguous track.Cancel, asTrackEntry's drop ends one. Ending it with the stream'sEvictedwould ask the copy for a refill of a group nothing read.Settled by the maintainer on 2026-11-25:
Tail,Producer.#grace, resume copy retention). The tail's excused-stream bound stays until browser WebTransport exposesRESET_STREAM_AT.Stalltimer stays until quest/m2/lite07-subscribe/remove-fetch.md removes FETCH.SUBSCRIBE_DROPwith the reset's error. This supersedes the epic's Q3 (2026-11-24), which rejected that fallback in favor of moq-quic's header-ACK hold. The README notes it, and Q2/Q7 now note the 2026-11-26 override.Waiting
TrackState::miss_gracedoes more than settle a hole below an out-of-ordercreate_group:Producer::requests) asks for a hole.finish_atinmoq-ffi(onlyfinish()today) and JS parity, and about 15 tests change.Lostreaches the publisher about a round trip after the subscriber discarded the stream. If the cache evicted the group meanwhile, nothing says where its span ended, no skip goes out, and the starts only that GROUP_END covered stay owed. On a timestamp-keyed lite-07 track every group's span holds inner starts.Lostnaming a span the record folded away under pool pressure ends the subscription with an error.Lostnames a group the cache no longer holds. Simplest, but a slow subscriber under cache pressure loses its subscription.Follow-ups
finish_sharedkeeping a declared end's tail) is reached only from moq-transport, so it moves to quest/m3/ietf-finish-shared-tail.md.reset_atholds a plain RESET_STREAM until the prefix is ACKed, which nothing relies on anymore: quest/m3/quic-plain-reset-at.md.Validation
On 00de087, the review round 2 and 3 fixes:
quest gate just checkpasses: Rust, JS, biome, and the drafts.cargo test -p moq-net --features async --libpasses 3,926 tests.js/netpasses 3,950 tests. New: "a lite-07 recovery's lost groups encode as an update that keeps its ranges", which fails without the fix (round 3, findings 4 and 9).a_stream_lost_before_its_end_is_reported_past_a_skipped_start,updates_waiting_to_start_keep_no_lost_groups,a_recovery_names_a_group_stream_lost_before_its_end_upstream, and the skipped-next-start case added toa_group_stream_lost_before_its_end_is_named_upstream.lite07_a_lost_group_end_is_named_againnow reports a span twice and expects one skip. JS mirrors the skipped-next-start case.On fa78841:
quest gate just checkpasses: 12,414 Rust tests, JS, biome, and the drafts.cargo test -p moq-net --features asyncpasses 3,923 lib tests and 660 integration tests.quest gate just test interop --allpasses, across Rust, js-native-node and js-native-bun on lite-05/06/07 and moq-transport.a_moved_range_leaves_no_gap_in_a_proven_tailanda_proven_tail_folds_the_gaps_no_live_range_owes, plus JS "a moved range leaves no gap in a lite-07 tail".a_settled_wire_tail_ends_a_proven_copy_with_its_error.a_group_stream_lost_before_its_end_is_named_upstreamand JS "a lite-07 group stream lost before its end is named upstream".lite07_a_lost_group_end_is_named_againand JS "lite draft-07: a lost GROUP_END names its span's starts again".a_failed_parked_stream_withdraws_its_groupnow checks that the group is accounted for and reported lost.only_lite07_carries_lost_groupsand JS "only lite-07 carries lost groups".lite07_a_cut_group_end_is_named_againnow runs throughsettle_reset: an unacknowledged FIN whose group goes stale.no_skip_goes_out_over_a_forwarded_drop(lite-07 and lite-06), JS "a reset that cut a GROUP_END names its span's starts again", and the plain-reset cases./verify-subscribe) checks ServedOnce, NamedOnce, NoContradictorySkip, QuietIsSettled (every start accounted, zero timers) and deadlock freedom. The model gainsSubLoseandPubLost.SubscribeAccounting.cfg(Pressure,ReliableReset, three starts): 104,336,132 distinct states, 13 minutes.PlainReset.cfg(noRESET_STREAM_AT, three starts): 46,007,585 distinct states, 4 minutes.CutGroupEnd.cfgand the newLostGroupEnd.cfg: 34,877 distinct states each. Without the publisher's re-tell,LostGroupEnd.cfgfails QuietIsSettled.Models
Size: L
Implementer: Claude Code, claude-opus-5-5, unknown
Review
Rewritten by
quest reviewafter each round.Head: bec9051, named in full once no reviewer reports a finding
Base: origin/main at a2d8ad0
Risk: high,
The branch changes lite-07 wire behavior (subscribe, drop, and reset semantics across rs/moq-net, js/net, and qmux), and lite-07 is advertised as the unpublished `moq-lite-07-wip` version, which RISK.md names as high because the next cut would publish it. If wrong, a peer speaking lite-07 mis-handles subscriptions or lost groups, and undoing it means reverting a wire-protocol change that a cut may already have shipped to deployed peers.Classified: high by Claude Code, claude-haiku-5-5, low effort, session
dbd68c92-9281-41ec-bb5c-f873f6016e9cRisk file: bb7b1c0de60b
Reviewer: Codex, gpt-6.2-sol, xhigh effort
Session:
01a21655-1d39-7cc0-94f1-bb454fcc9228, round 3Score: 5/10,
Lite-07 can still hang after a lost GROUP_END, finish before delivering an owed group, and accumulate unbounded accounting state under backpressure.Rounds: 3; first round 3 (medium 3); findings 10 (medium 10): fixed 2, refuted 0, open 8
Findings, open until the next round settles them:
js/net/src/lite/subscriber.ts:2780:Bound the ledger while a live range awaits its startrs/moq-net/src/lite/publisher.rs:5616:Settle lost GROUP_END spans after publisher cache evictionjs/net/src/ledger.ts:127:Keep retired gaps from satisfying a newly added rangejs/net/src/lite/subscriber.ts:2332:Encode a range-preserving Lost update on browser recovery streamsrs/moq-net/src/lite/subscriber.rs:400:Bound failed parked groups before TRACK_INFOjs/net/src/lite/publisher.ts:587:Bound pending Lost responses across cache turnoverrs/moq-net/src/lite/subscriber/fills.rs:839:Respect write backpressure when reporting recovery lossesrs/moq-net/src/tail.rs:123:Do not fold owed gaps to pay for loss reportsThe last round's findings, at 39f7c4b:
js/net/src/lite/subscriber.ts:2764:Bound the ledger while a live range awaits its start;`js/net/src/lite/subscriber.ts:2780` still skips compaction whenever any live range awaits START.rs/moq-net/src/lite/publisher.rs:5615:Settle lost GROUP_END spans after publisher cache eviction;`rs/moq-net/src/lite/publisher.rs:5616` still requires the cached span, and `rs/moq-net/verify/subscribe/SubscribeAccounting.tla:257` still excludes acknowledgment before application discard.js/net/src/ledger.ts:124:Keep retired gaps from satisfying a newly added range;`js/net/src/ledger.ts:127` still writes retired gaps into the same ledger that proves receipt.rs/moq-net/src/tail.rs:182:Report a lost stream when the next start was only skipped or dropped;`rs/moq-net/src/tail.rs:189` and `js/net/src/tail.ts:205` now enqueue a lost stream without checking whether the next start is covered.rs/moq-net/src/lite/subscriber/fills.rs:868:Send lost-group reports from recovery subscriptions;Rust now drains recovery losses, but `js/net/src/lite/subscriber.ts:2332` constructs an update that the lite-07 encoder rejects before transmission.rs/moq-net/src/lite/subscriber.rs:393:Bound failed group headers kept before TRACK_INFO;`rs/moq-net/src/lite/subscriber.rs:400` removes failed headers from the wait list but still retains failed keys without a pre-accept budget.js/net/src/lite/publisher.ts:581:Bound queued Lost reports while the publisher is blocked;`js/net/src/lite/publisher.ts:587` merges repeated spans but retains distinct spans across cache evictions until the serving loop drains them.Reviewer: Claude Code, claude-opus-5-5, high effort, second
Session:
e429a6ac-d7a3-46bf-9ac1-631b2160894f, round 3Score: 7/10,
The bound on coalesced Lost lists holds in both languages, but the new JS recovery report of lost streams cannot encode on lite-07 and fails silently, so a JS recovery can stall on a span only the publisher can name.Rounds: 3; first round 1 (medium 1); findings 3 (medium 3): fixed 2, refuted 0, open 1
Findings, open until the next round settles them:
js/net/src/lite/subscriber.ts:2331:JS recovery's lost-stream SUBSCRIBE_UPDATE never encodes on lite-07, so the report is silently droppedThe last round's findings, at 39f7c4b:
rs/moq-net/src/lite/publisher.rs:1735:Coalesced SUBSCRIBE_UPDATEs append every Lost list forever, so a peer can grow relay memory without bound;`then` now clears `later.lost` (publisher.rs:1738), `GroupOutcomes::cut` is a merged `RangeSet` (publisher.rs:5273), and JS resolves each lost group against `wholeEnd` into a merged `Runs` set as it decodes. Coalesced updates and repeated reports therefore no longer grow memory per message.