You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
js/net: enforce the subscriber latency budget #2892
#2890 makes Subscription::latency actually enforced in rs/moq-net, where it had been metadata that was forwarded on the wire and never acted on. js/net still has the same gap.
js/net/src/track.ts's Subscriber.recvGroup, nextGroup, and readFrameSequence hand back buffered groups without consulting Subscription.latencyMax, so a browser subscriber replays a backlog it declared it did not want. That is visible in practice whenever another subscriber widens the publisher's aggregate budget, since the aggregate is what reaches the publisher and the per-subscriber semantics only exist locally.
What the Rust side settled on, for a mirror to match:
Drift is measured in presentation time: a group's first frame timestamp against the highest-sequence group above it that carries one. Both are stamped once, when the group's first frame is created, so a backlog delivered as a burst still reads as its true age.
The anchor must sit strictly above the candidate. Backfill and the tail of a rewound timeline can carry a high timestamp on a low sequence without being a live edge.
A group that has presented nothing is never stale, and neither is one with nothing newer stamped above it. Retention bounds those instead.
The budget is clamped to the publisher's latencyMax retention window, since waiting longer than a group is kept cannot produce it.
The anchor is bounded by what the subscriber could actually be handed (its read cursor's cap), not by the end it requested on the wire, which is a preference that does not filter the handle.
start is a filter, not an exemption: a subscriber that wants history raises its budget. A one-shot fetch stays exempt.
Expect the same fallout the Rust side had: tests that write a batch of groups and then read them all back are asserting more than the default REAL_TIME budget promises, and each needs to declare the tolerance it was implicitly relying on.
#2537 - feat(net): start and end subscriptions and fetches at a specific frame [merged] #2631 - feat: trim the media timeline as groups leave the publisher's cache [open] #2771 - fix(net): serve subscriptions in arrival order so reordered groups aren't dropped [merged] #2772 - fix(js/net): serve subscription groups in arrival order [merged] #2862 - fix(moq-net): serve an IETF subscribe from the live edge [merged]
📝 Issue Planner
Check the box below or use the @coderabbitai plan command to generate an implementation plan and prompts that you can use with your favorite coding assistant.
Create Plan
🧪 Issue enrichment is currently in open beta.
You can configure auto-planning by selecting labels in the issue_enrichment configuration.
To disable automatic issue enrichment, add the following to your .coderabbit.yaml:
issue_enrichment:
auto_enrich:
enabled: false
💬 Have feedback or questions? Drop into our discord!
Activity
coderabbitai commentedon Aug 16, 2026
🔗 Related PRs
#2537 - feat(net): start and end subscriptions and fetches at a specific frame [merged]
#2631 - feat: trim the media timeline as groups leave the publisher's cache [open]
#2771 - fix(net): serve subscriptions in arrival order so reordered groups aren't dropped [merged]
#2772 - fix(js/net): serve subscription groups in arrival order [merged]
#2862 - fix(moq-net): serve an IETF subscribe from the live edge [merged]
📝 Issue Planner
Check the box below or use the
@coderabbitai plancommand to generate an implementation plan and prompts that you can use with your favorite coding assistant.🧪 Issue enrichment is currently in open beta.
You can configure auto-planning by selecting labels in the issue_enrichment configuration.
To disable automatic issue enrichment, add the following to your
.coderabbit.yaml:💬 Have feedback or questions? Drop into our discord!