Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions quest/m2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,3 +175,4 @@ ranked just below deterministic TS legs, which it requires.
- [IETF driver double poll](/quest/m2/ietf-driver-double-poll.md) - a fired deadline costs a moq-transport session's driver one poll, as #5393 makes moq-lite's
- [Play resume](/quest/m2/play-resume.md) - `moq-cli play` plays out pictures buffered before a declared end when new media arrives quickly
- [Task supervision](/quest/m2/task-supervision.md) - the auth decider loop, stats publisher, and moq-tokio's token and WebSocket internals are supervised like #5447's tasks
- [JS fill first](/quest/m2/js-fill-first.md) - the JS publisher sends a group's fill ahead of its live rest, matching Rust
32 changes: 32 additions & 0 deletions quest/m2/js-fill-first.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# [S] JS sends a group's fill ahead of its live rest

## Goal

When a draft-20 fill and the live stream of the same group are both in
flight, the JS publisher sends the fill (the earlier start object) first,
so a joining subscriber gets the group's start before its tail. Track
priority and group order still dominate. moq-lite ordering is unchanged.
This mirrors Rust's start-object tie-break from
[#5470](https://github.com/moq-dev/moq/pull/5470).

## Plan

Today `Priority#position` (`js/net/src/priority.ts`) assumes sequences are
unique within a subscription, but `#runFill` (`js/net/src/ietf/publisher.ts`)
registers a second stream for the live group's sequence, so the two tie.

Decided 2026-10-13 (maintainer): rank streams, not groups.
`Priority.add` takes the stream's start object, and `#position` also counts a
same-group stream with an earlier start as ahead. `sendOrder`'s packing is
unchanged, which avoids bounding the start object. Every stream passes the
object it starts at: an IETF group stream its first object, a fill its start,
and a Lite group its `frameRange` start (nonzero for a draft-06+
`startFrame`). Lite never registers two streams for one sequence, so its
order is unchanged.

Add a regression in `js/net/src/priority.test.ts` like Rust's
`a_fill_outranks_the_rest_of_its_group`: register the live rest first, then
the fill of the same group, and expect the fill to rank higher, in both group
orders, without the start ever overriding group order.

Public API: none (`Priority` is `@internal`). Wire: none.
Loading