Skip to content

feat(net): lite-07 settles every start without a timer, naming plain-reset groups in a drop - #9626

Closed
kixelated wants to merge 26 commits into
mainfrom
quest/m2/lite07-subscribe/previous-delta
Closed

kixelated wants to merge 26 commits into
mainfrom
quest/m2/lite07-subscribe/previous-delta

Conversation

@kixelated

@kixelated kixelated commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

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:

  • a Group Stream;
  • its GROUP_END, whose End accounts for the starts inside the span;
  • a SUBSCRIBE_SKIP for an empty start no GROUP_END covers;
  • a SUBSCRIBE_DROP;
  • SUBSCRIBE_END.

The GROUP header is unchanged from main: no Previous Delta.

  • No lite-07 copy waits out a stall grace, in Rust or JS. That covers the session tail, the track tail, the copy miss grace, and resume copy retention. A lite-07 copy is marked proven. Pre-lite-07 and moq-transport keep their graces.
  • A reset that may lose its GROUP header names the group in SUBSCRIBE_DROP with the reset's error. That covers a peer without RESET_STREAM_AT and a browser's WebTransport.
    • A plain RESET_STREAM lets the peer's transport discard unread data, even acknowledged data, so holding the reset until the ACK proved nothing.
    • New poll::Session::reliable_reset() (default false) says whether a reset keeps its prefix. It is true for moq-quic and qmux-02 with RESET_STREAM_AT negotiated, and for the memory transport.
    • The lite-07 publisher holds a header only when the session's resets are reliable.
    • JS gets the same answer from @moq/qmux's new SendStream.reliableReset.
  • A reset or stop after a GROUP_END may cut the GROUP_END on the wire. When it still accounts for the group, the publisher sends the span's inner starts again as a SUBSCRIBE_SKIP, in Rust (GroupOutcomes::cut) and JS. CutGroupEnd.cfg, formerly an open finding, now passes.
  • Every drop is final on the wire. The skip-over-drop override machinery (audit W1, W5a/b) is deleted. The one exception is a cut 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.
  • Audit fix W6b: GROUP_END is validated before the tail accounts for it.
  • Three cases that only a grace used to settle (review round 1) are now settled without one, in Rust and JS:
    • 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 (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.
    • A Group Stream the subscriber discards before reading its end, such as one its transport evicts after the FIN (which sends no STOP_SENDING), is named in the next SUBSCRIBE_UPDATE's new Lost list. The publisher then skips the starts inside its span again, as for a cut GROUP_END.
    • A stream parked on TRACK_INFO that fails before the accept is accounted for in the tail at once, and the accept still opens its group and ends it as cancelled, so the copy learns of a group the publisher served. Only its group key stays parked, merged with its neighbours.
  • Review rounds 2 and 3 hardening of Lost, in Rust and JS:
    • A subscriber reports every stream it discarded before its end. A next start that a skip or drop named proves nothing about where the span ends. Recovery subscriptions report theirs too, once their last update is out.
    • Nothing grows per report. Updates waiting for the reply to start drop their Lost lists, 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::Final decision

On 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::Final rule rather than repair it. The pre-lite-07 wires keep their graces and don't need the rule either.

Impact

  • Wire (lite-07-wip only, same bytes):
    • A Group Stream reset without a RESET_STREAM_AT covering its GROUP header is named in SUBSCRIBE_DROP.
    • The draft drops the hold-until-ACK fallback and the subscriber's MUST to read every header on arrival.
    • No skip goes out over a drop, except the re-tell of a GROUP_END that a reset may have cut or the subscriber reported lost.
    • SUBSCRIBE_UPDATE gains Lost Count (i), Group Start (i)... after the retune list, before Wanted Start. These are new bytes, so two lite-07-wip peers from either side of this PR misparse each other's SUBSCRIBE_UPDATE.
    • A subscriber waits out no grace.
    • lite-06, lite-05 and moq-transport are unchanged.
  • Public API (additive):
    • Rust moq_net::transport::poll::Session::reliable_reset() defaults to false. A custom transport whose resets keep their prefix should return true; otherwise lite-07 names every reset group in a drop.
    • moq_quic::Connection::reset_stream_at() and the mux Connection::reset_stream_at() are new.
    • JS @moq/qmux SendStream.reliableReset is new.
  • Behavior:
    • JS and Rust lite-07 readers wait for the wire to account for a gap instead of a 1 s grace.
    • Rollout: lite-07-wip is unpublished, and this PR changes its SUBSCRIBE_UPDATE bytes, so lite-07-wip peers must upgrade together. A lite-07 subscriber from this PR facing an older lite-07 publisher may also wait on a group whose header a plain reset lost. The old publisher holds the reset until the ACK instead of naming it.
    • A group stream parked on TRACK_INFO that fails before the accept now leaves its group in the copy, ended as cancelled, on every version. Before, it left no trace.
    • JS's recovery drain gives up at GRACE even on a tail without a grace, as Rust's Settle::at_most does. Only a publisher before lite-07 reaches that path.
  • Migration: a custom poll::Session over a transport with reliable resets implements reliable_reset(), so lite-07 doesn't name its reset groups.

Decisions

Settled by the maintainer on 2026-11-26. This overrides the earlier Previous Delta plan (2026-11-24) that this PR first implemented:

  • "Remove prev group timestamp. Include the final group timestamp in the previous group instead. It's literally needed to learn segment durations anyway." The previous group's GROUP_END End proves the gap, and a control message covers what no GROUP_END can prove.
  • The control message is main's SUBSCRIBE_SKIP, kept as its own message rather than a SUBSCRIBE_DROP code:
    • A drop's Error Code is a stream error that ends readers. A skip ends none.
    • A skip is final, cacheable emptiness that a relay answers later subscriptions with. A NOT_FOUND drop says only "not here".
    • AGENTS.md asks for a separate message over a special value.
  • It covers:
    • a discontinuity between one group's End and the next start;
    • a first group;
    • a group closed without finishing;
    • a GROUP_END a 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.

  • Starts outside every live range stop being owed when the range retires.
  • For the evicted stream, the subscriber names the stream to the publisher, rather than reading its GROUP_END before 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 past SUBSCRIBE_END, so a Lost list on SUBSCRIBE_UPDATE also reaches a publisher that already ended the track.
  • A subscriber leaves a group out of Lost when 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.
  • A parked group that never had a stream take it ends as Cancel, as TrackEntry's drop ends one. Ending it with the stream's Evicted would ask the copy for a refill of a group nothing read.

Settled by the maintainer on 2026-11-25:

  • JS lite-07 drops the tail and track graces (Tail, Producer.#grace, resume copy retention). The tail's excused-stream bound stays until browser WebTransport exposes RESET_STREAM_AT.
  • The FETCH recovery Stall timer stays until quest/m2/lite07-subscribe/remove-fetch.md removes FETCH.
  • A reset that may lose its GROUP header names the group in SUBSCRIBE_DROP with 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

  • Maintainer: how to remove the local miss grace. The 2026-11-26 plan had a producer declaring a group's end replace the 1 s local miss grace here, but TrackState::miss_grace does more than settle a hole below an out-of-order create_group:
    • It decides when a local track with fill handlers (Producer::requests) asks for a hole.
    • It decides how long a refused fill waits for the live feed before the hole is named dropped.
    • Front and resume logical tracks are local producers too, so they would lose their gap give-up.
    • Treating every local start as named broke 15 fill and resume tests. I reverted that.
    • Options:
      • A: a local track names every start. A local fill handler is asked at once, and its refusal is final at once. A hole with no handler stays owed until the producer creates, skips, or ends it. Logical and resume tracks follow their serving copy. Needs a group-level finish_at in moq-ffi (only finish() today) and JS parity, and about 15 tests change.
      • B: keep the grace only for fill-handler asks and refusals. It is still a timer, so local and remote tracks still differ.
      • C (recommended): keep the local miss grace in this PR, which settles the wire, and do A in its own quest. The wire change stands alone, and A is a cross-language public API change with its own tests.
  • Maintainer: what bounds lite-07's per-subscription accounting state, and what happens at the bound (Codex review rounds 2 and 3). Zero-timer settlement means each side keeps state until the wire accounts for it, with no grace to age it out:
    • The subscriber's tail ledger, which retiring a range cannot fold while another range awaits its SUBSCRIBE_START.
    • Retired gaps. Today they fold into the receipts for good, so a range that asks for one again reads it as accounted. On a subscription draining after SUBSCRIBE_END, the subscriber can then close before the group arrives.
    • The group keys of parked streams that failed before TRACK_INFO, before the copy's pool bills anything.
    • The subscriber's lost set, while its control stream is blocked.
    • The publisher's queued re-tells, which a merged range set bounds by the spans the cache holds at once, but not across cache turnover while the response is blocked.
    • Rust bills the ledger and the lost set to the copy's pool and folds the oldest gaps under pressure. Folding an owed gap is a synthetic receipt, so under pressure a subscriber can finish before a group arrives. JS sets no pool capacity.
    • The state is inherent: the publisher sends each group once per subscription, so the subscriber must remember what it was told until no range can ask for it again.
    • Options:
      • A (recommended): one per-subscription budget, billed to the pool on both sides and from SUBSCRIBE rather than from the copy's adoption. It covers the ledger, retired gaps kept apart from receipts, failed parked keys, the lost set, and the publisher's queued re-tells, the last checked against the groups the subscription sent. A subscription over budget ends with an error instead of folding an owed gap, and the relay subscribes again. An unstarted range with an absolute start owes only from that start, so fewer ranges block a fold.
      • B: fold as today under pool pressure, accepting a rare early finish, and bound JS by giving its pool a capacity.
      • C: never add a range over space the subscription retired; ask for it on a subscription of its own, as recoveries do. This removes the retired-gap case only.
  • Maintainer: how to settle a lost GROUP_END once the publisher's cache evicted its group (Codex review rounds 2 and 3, finding 2).
    • Lost reaches 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.
    • Options:
      • A (recommended): answer from the subscription's record. Tell a whole group's inner starts as a report kind of their own, so the record keeps each span's end after the cache evicts the group. The record is already per subscription and billed to the pool. A Lost naming a span the record folded away under pool pressure ends the subscription with an error.
      • B: end the subscription with an error whenever Lost names a group the cache no longer holds. Simplest, but a slow subscriber under cache pressure loses its subscription.
      • C: have the subscriber read a fully received stream's GROUP_END before the transport evicts it. moq-quic would have to hand moq-net the stream's tail instead of discarding it, and a browser's WebTransport cannot.
    • Either way, the TLA model gains publisher eviction and an acknowledgement before the application reads or discards the stream.

Follow-ups

Validation

On 00de087, the review round 2 and 3 fixes:

  • quest gate just check passes: Rust, JS, biome, and the drafts.
  • cargo test -p moq-net --features async --lib passes 3,926 tests.
  • js/net passes 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).
  • Each new test below fails without its fix: 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 to a_group_stream_lost_before_its_end_is_named_upstream. lite07_a_lost_group_end_is_named_again now reports a span twice and expects one skip. JS mirrors the skipped-next-start case.
  • Not re-run on this head: interop and TLC. It changes no wire bytes and no modelled behavior.

On fa78841:

  • quest gate just check passes: 12,414 Rust tests, JS, biome, and the drafts.
  • cargo test -p moq-net --features async passes 3,923 lib tests and 660 integration tests.
  • quest gate just test interop --all passes, across Rust, js-native-node and js-native-bun on lite-05/06/07 and moq-transport.
  • New and changed tests. Each new fix's test fails without the fix.
    • Rust a_moved_range_leaves_no_gap_in_a_proven_tail and a_proven_tail_folds_the_gaps_no_live_range_owes, plus JS "a moved range leaves no gap in a lite-07 tail".
    • Rust a_settled_wire_tail_ends_a_proven_copy_with_its_error.
    • Rust a_group_stream_lost_before_its_end_is_named_upstream and JS "a lite-07 group stream lost before its end is named upstream".
    • Rust lite07_a_lost_group_end_is_named_again and JS "lite draft-07: a lost GROUP_END names its span's starts again".
    • Rust a_failed_parked_stream_withdraws_its_group now checks that the group is accounted for and reported lost.
    • Rust only_lite07_carries_lost_groups and JS "only lite-07 carries lost groups".
    • Rust lite07_a_cut_group_end_is_named_again now runs through settle_reset: an unacknowledged FIN whose group goes stale.
    • Earlier in this PR: 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.
  • TLC (/verify-subscribe) checks ServedOnce, NamedOnce, NoContradictorySkip, QuietIsSettled (every start accounted, zero timers) and deadlock freedom. The model gains SubLose and PubLost.
    • SubscribeAccounting.cfg (Pressure, ReliableReset, three starts): 104,336,132 distinct states, 13 minutes.
    • PlainReset.cfg (no RESET_STREAM_AT, three starts): 46,007,585 distinct states, 4 minutes.
    • CutGroupEnd.cfg and the new LostGroupEnd.cfg: 34,877 distinct states each. Without the publisher's re-tell, LostGroupEnd.cfg fails QuietIsSettled.
    • The two range cases are outside the model, which leaves ranges out.

Models

Size: L
Implementer: Claude Code, claude-opus-5-5, unknown

Review

Rewritten by quest review after 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-f873f6016e9c

  • Risk file: bb7b1c0de60b

  • Reviewer: Codex, gpt-6.2-sol, xhigh effort

  • Session: 01a21655-1d39-7cc0-94f1-bb454fcc9228, round 3

  • Score: 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:

    • Medium, js/net/src/lite/subscriber.ts:2780: Bound the ledger while a live range awaits its start
    • Medium, rs/moq-net/src/lite/publisher.rs:5616: Settle lost GROUP_END spans after publisher cache eviction
    • Medium, js/net/src/ledger.ts:127: Keep retired gaps from satisfying a newly added range
    • Medium, js/net/src/lite/subscriber.ts:2332: Encode a range-preserving Lost update on browser recovery streams
    • Medium, rs/moq-net/src/lite/subscriber.rs:400: Bound failed parked groups before TRACK_INFO
    • Medium, js/net/src/lite/publisher.ts:587: Bound pending Lost responses across cache turnover
    • Medium, rs/moq-net/src/lite/subscriber/fills.rs:839: Respect write backpressure when reporting recovery losses
    • Medium, rs/moq-net/src/tail.rs:123: Do not fold owed gaps to pay for loss reports
  • The last round's findings, at 39f7c4b:

    • Open: medium, 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.
    • Open: medium, 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.
    • Open: medium, 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.
    • Fixed: medium, 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.
    • Open: medium, 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.
    • Open: medium, 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.
    • Open: medium, 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 3

  • Score: 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:

    • Medium, js/net/src/lite/subscriber.ts:2331: JS recovery's lost-stream SUBSCRIBE_UPDATE never encodes on lite-07, so the report is silently dropped
  • The last round's findings, at 39f7c4b:

    • Fixed: medium, 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.

kixelated and others added 8 commits November 25, 2026 11:34
…, 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>
kixelated and others added 4 commits November 25, 2026 15:54
…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>
@kixelated kixelated changed the title Replace lite-07 SUBSCRIBE_SKIP and stall timers with Previous Delta feat(net)!: lite-07 GROUP proves the gap below it with Previous Delta, replacing SUBSCRIBE_SKIP and the stall timers Nov 26, 2026
@kixelated

Copy link
Copy Markdown
Collaborator Author

Maintainer decisions (/quest-run, 2026-11-25):

  1. ✅ JS: drop the lite-07 tail and track graces, and keep the bound on waiting for excused streams until browser WebTransport supports RESET_STREAM_AT (rejected: dropping every JS grace).
  2. ✅ A skip no GROUP header can prove goes out as SUBSCRIBE_DROP(NOT_FOUND).
  3. Direction: local and remote tracks should not behave differently. Instead of keeping a Rust miss grace for local tracks, a local track's holes should settle on the same proof as lite-07 (the producer knows its own group sequence), with no timer. To be confirmed by the implementer, with options if that isn't feasible.
  4. ✅ Keep the FETCH recovery Stall timer until the remove-fetch quest deletes it with FETCH.
  5. Direction: when the peer lacks RESET_STREAM_AT, a reset that loses a GROUP header should be named by a dedicated control message (DROP/RESET) instead of leaving the subscriber stalled with no grace. To be confirmed by the implementer, with options if that isn't feasible.

(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>
kixelated and others added 5 commits November 25, 2026 19:15
… 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>
@kixelated kixelated changed the title feat(net)!: lite-07 GROUP proves the gap below it with Previous Delta, replacing SUBSCRIBE_SKIP and the stall timers feat(net): lite-07 settles every start without a timer, naming plain-reset groups in a drop Nov 26, 2026
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>
kixelated and others added 2 commits November 25, 2026 23:55
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>
kixelated and others added 4 commits November 26, 2026 00:55
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>
@kixelated

Copy link
Copy Markdown
Collaborator Author

Superseded by #9686 (which merges SUBSCRIBE_SKIP into SUBSCRIBE_DROP(SKIP), removes the local miss_grace timer, fixes disjoint range settlement, bounds ledgers, and handles unread GROUP_END eviction in moq-quic/moq-net without adding a wire Lost list).

(Written by Gemini 4 Neon with high)

@kixelated kixelated closed this Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant