Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
8f660c0
chore(quest): claim quest/m1/stream-credit/browser-resets.md
kixelated Nov 13, 2026
56f5c72
fix(net): end a lite-07 subscription past a group stream whose reset …
kixelated Nov 13, 2026
031dd46
test(stream-credit): offset the top tier's groups so the relay always…
kixelated Nov 13, 2026
b6123f3
fix(net): pause a lite-07 group whose reset the browser lost the code of
kixelated Nov 13, 2026
32ec74b
test(stream-credit): run nightly, and record the browser reset bugs
kixelated Nov 13, 2026
797b4bf
fix(net): wait the grace once for a lite-07 stream a drop excused
kixelated Nov 13, 2026
aba935e
fix(net): an update restores the hold a stale drop excused
kixelated Nov 13, 2026
01e03f8
fix(net): judge a stream's excuse from its verdict under the current …
kixelated Nov 13, 2026
336e2c4
quest: keep the browser reset reports follow-up
kixelated Nov 14, 2026
ca27ecb
Merge origin/main: judge yielded streams and the fills' ranges on an …
kixelated Nov 14, 2026
c8c4086
fix(net): excuse a lite-07 stream whose group a final drop accounted …
kixelated Nov 14, 2026
778ebee
Merge remote-tracking branch 'origin/main' into HEAD
kixelated Nov 14, 2026
daed30a
style(net): format the lite-07 excuse test
kixelated Nov 14, 2026
09d7d6c
fix(net): a lite-07 recovery waits for a stream it excused, at most t…
kixelated Nov 14, 2026
ef529ce
fix(net): only a drop excuses a lite-07 stream, not a gap the grace g…
kixelated Nov 14, 2026
7c87eee
fix(net): the tail keeps the final drops that excuse a lite-07 stream
kixelated Nov 14, 2026
ebcac72
fix(net): a stale drop over a final one before its header still excus…
kixelated Nov 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/interop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@ jobs:
run: nix develop --command just test stream-limits
shell: bash -leo pipefail {0}

- name: Stream credit in browsers
id: stream-credit
if: ${{ !cancelled() && steps.setup.outcome == 'success' }}
run: nix develop --command just test stream-credit
shell: bash -leo pipefail {0}

- name: Relay fills
id: relay-fill
if: ${{ !cancelled() && steps.setup.outcome == 'success' }}
Expand Down Expand Up @@ -227,6 +233,7 @@ jobs:
"Optional publisher retention": "${{ steps.max-age.outcome }}",
"Datagram tracks": "${{ steps.datagram-tracks.outcome }}",
"Stream limits over WebSocket": "${{ steps.stream-limits.outcome }}",
"Stream credit in browsers": "${{ steps.stream-credit.outcome }}",
"Relay fills": "${{ steps.relay-fill.outcome }}",
"Receive credit recovery": "${{ steps.receive-credit.outcome }}",
"Harness regressions": "${{ steps.harness.outcome }}",
Expand Down
5 changes: 4 additions & 1 deletion drafts/draft-lcurley-moq-lite.md
Original file line number Diff line number Diff line change
Expand Up @@ -886,6 +886,7 @@ The GROUP message's `Frame Start` gives the index of the first FRAME on the stre

A publisher MUST NOT send two Group Streams for the same Group Sequence on one subscription, except to re-offer a Group whose stream it reset (see [SUBSCRIBE_DROP](#subscribe-drop)), or to [continue](#yield) one.
The re-offer can arrive before that reset: a subscriber holds a Group Stream for a sequence whose earlier stream is still arriving unread until that stream ends, then discards it if the earlier stream completed the Group, or reads it if the earlier stream was reset.
Since the publisher reset the earlier stream, the subscriber MAY instead end that stream at once and read the later one, ignoring the frames it holds; a browser can lose a reset that reaches a stream before its application does.
A subscriber assembling a Group from more than one publisher does so across separate subscriptions, and is responsible for concatenating the runs in index order and for ignoring any frame it has already received.

Both the publisher and subscriber MAY reset the stream at any time.
Expand All @@ -899,7 +900,8 @@ A Group Stream carrying the `ietf` extension's object records is never reset wit
A Group whose stream was reset with YIELDED is paused, not given up: the subscriber keeps the frames it received, and the publisher MUST later continue the Group on another Group Stream or name it in [SUBSCRIBE_DROP](#subscribe-drop).
A continuation is a Group Stream for the paused Group whose `Frame Start` is the reset stream's own `Frame Start`, since a reset can discard frames the transport acknowledged.
The subscriber ignores the frames it already holds, including the part of a frame the reset cut short, and appends the rest; a continuation that starts past the frames it holds whole is malformed.
A continuation MAY overtake the earlier stream's reset, and waits unread until that stream ends.
A continuation MAY overtake the earlier stream's reset, and waits unread until that stream ends, or ends it, as for a re-offer.
A subscriber whose transport reports a Group Stream's reset without its error code, as a browser can, pauses the Group as for YIELDED: the publisher's continuation or SUBSCRIBE_DROP settles it.

## Datagrams
QUIC datagrams provide unreliable, unordered delivery for latency-sensitive content that does not need retransmission.
Expand Down Expand Up @@ -2470,6 +2472,7 @@ An application-specific payload.
- Expiration also measures a group's arrival age, the time since its successor arrived at this hop, so a group of an untimed Track expires by arrival age alone.
- A publisher resets the Group Stream of an expired, unfinished group with OLD rather than finishing it, even after sending every frame it holds.
- Added [YIELDED](#yield) (0x3C): a publisher out of stream credit resets the lowest-priority Group Stream with it, which pauses the Group for a later Group Stream to continue from where the reset stream started.
- A subscriber MAY end a Group Stream once a later stream for its Group arrives, rather than wait for its reset, and pauses a Group whose reset arrives without its error code as for YIELDED.
- FRAME leads with `Payload Length`, the payload size plus one, in place of the trailing `Message Length`; 0 is malformed.
- A publisher SHOULD drop a datagram rather than block when the transport has no room for it, where it previously sent one only if the congestion controller could transmit it immediately.
- Added an optional `Subscriber Max Age` to FETCH, encoded as milliseconds plus one with zero meaning absent. It can tighten, but never relax, `Publisher Max Age`.
Expand Down
26 changes: 25 additions & 1 deletion js/net/src/cache.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -445,14 +445,38 @@ test("a tail forgets its finished streams under debt", () => {
expect(pool.used).toBeLessThanOrEqual(capacity + 2 * (16 * 1024 + cache.ENTRY_OVERHEAD));
// A stale drop inside what the fold forgot is owed again only where the ledger had not accounted
// for it: there a stream may have finished and overtaken the drop.
tail.open(2n)();
tail.open(2n).done();
expect(tail.overtaken(0n, 4n)).toEqual([{ start: 2n, end: 3n }]);
expect(tail.overtaken(2n * runs, 2n * runs + 1n)).toEqual([]);
tail.updated();
expect(tail.overtaken(0n, 4n)).toEqual([]);
tail.close();
});

// A tail's fragmented final drops bill its track's account too. Under the pool's debt they fold into
// the one span they reach, which still names every dropped sequence, so a stream a drop overtook is
// never held as owed, and the gaps between them are excused at worst.
test("a tail folds its final drops under debt", () => {
const runs = 4000n;
const pool = new cache.Pool({ capacity: 1 << 30 });
const producer = pooled(pool);
hooks.receiveTrack(producer);
const tail = new Tail({ bill: hooks.billTrack(producer) });
for (let run = 0n; run < runs; run++) tail.drop(2n * run, 2n * run + 1n);
expect(tail.dropped(2n)).toBe(true);
expect(tail.dropped(3n)).toBe(false);
expect(pool.used).toBeGreaterThanOrEqual(Number(runs) * cache.READER_RUN_OVERHEAD);

const capacity = 64 * cache.RUN_OVERHEAD;
pool.resize(capacity);
for (let i = 0; i < 64; i++) finished(producer, 16 * 1024);
tail.drop(2n * runs, 2n * runs + 1n);
expect(pool.used).toBeLessThanOrEqual(capacity + 2 * (16 * 1024 + cache.ENTRY_OVERHEAD));
for (let run = 0n; run <= runs; run++) expect(tail.dropped(2n * run)).toBe(true);
expect(tail.dropped(2n * runs + 1n)).toBe(false);
tail.close();
});

// Whatever a bill frees pays its readers' debt, however it shrank, and the debt is forgiven once
// the pool is back within its capacity. A closed tail never bills again. Mirrors Rust
// `a_debt_is_paid_by_any_shrink_and_forgiven_without_pressure`.
Expand Down
4 changes: 2 additions & 2 deletions js/net/src/ietf/subscriber.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2081,7 +2081,7 @@ export class Subscriber {
}
stream.stop(e);
} finally {
read();
read.done();
}
}

Expand Down Expand Up @@ -2202,7 +2202,7 @@ export class Subscriber {
if (e instanceof StreamError && e.code === StreamCode.MalformedTrack) track.abort(e);
stream.stop(e);
} finally {
read?.();
read?.done();
}
}

Expand Down
Loading