Repository navigation
quest(m0): a browser publisher stall ratchets viewer latency - #6149
Conversation
Plan the moq.dev/publish report where a viewer's buffer grows without bound: fix the publisher-local stall feeding the never-falling catalog estimates, port main's fixed-delay behavior to release, and measure the subscribe update churn afterwards. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 9 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
…-071cfa # Conflicts: # quest/m0/README.md
…-071cfa # Conflicts: # quest/m0/README.md
|
Merged (Written by Claude Opus 5.5) |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 099f3f6b6b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| - No player-side bound on the advertised terms. The player keeps trusting | ||
| the catalog's `jitter` and `delay`. |
There was a problem hiding this comment.
Bound untrusted catalog latency before resizing the audio ring
When an Auto viewer opens a broadcast whose audio rendition advertises a very large jitter or delay, this decision lets the valid U53 value flow through js/watch/src/audio/latency.ts:24-26 into ringSamples, and SharedAudioBuffer.setLatency then attempts to resize its shared ring to roughly twice that sample count (js/watch/src/audio/buffer.ts:220-233). A hostile publisher can therefore use a valid catalog to trigger a huge allocation, a RangeError, or an out-of-memory tab crash; retain adaptive behavior if desired, but clamp or reject values above a resource-safe ceiling before they size buffers.
AGENTS.md reference: AGENTS.md:L18-L18
Useful? React with 👍 / 👎.
Plans a user report from
moq.dev/publish(Brave on Fedora 44 Wayland, also reproduced on macOS): a live camera publish makes the viewer's total buffer climb (8.8 s, 11 s, 12.7 s, 42 s) even at a 100 ms or Auto latency, whilebbb.hangstays near 0.4 s.Findings (code reading, not yet reproduced)
Estimator(js/publish/src/jitter.ts) advertises the lifetime maximum flush-lateness spread as catalogjitter/delay, and the hang draft forbids lowering them, so one publisher-local stall persists for the broadcast.releasebuild also adds them on top of a fixed latency;mainstopped that in feat(audio): measure the auto playout target from arrival timing #4162.encodeQueueSize, so a software encoder slower than real time queues without bound. Alternatives: audio sample clock vs camera clock drift, throttled tab.subscribe updateflood is the watcher pushing everymaxDelaychange;remote error: 1is a routine unsubscribe.Quests
quest/m0/release-fixed-delay.md[XS]: port the fixed-latency behavior torelease.quest/m0/publish-stall-estimate.md[M]: reproduce, then remove the stall at its source.quest/m1/subscribe-update-churn.md[S]: measure the update rate after the fix, then choose a cut.Decisions
Goal: "A live publish from moq.dev/publish plays at the viewer's selected latency target; buffered media never grows past it, on any OS/browser."
Milestone
Subscribe update spam scoping
Publisher: how a local stall stops ratcheting the estimate
Player: bound the catalog's advertised jitter/delay in the Auto target
AUTO_MAX_DELAYceilingSplit
(then, with no player bound) Second m0 quest
Subscribe update churn
release runs the pre-#4162 player: act on it?
Backport milestone and scope
Where to cut update churn (first round's "coalesce in net" was withdrawn: SUBSCRIBE_UPDATE has no ack)
maxDelayin watchm0 rank
m1 rank
(Written by Claude Opus 5.5)
🤖 Generated with Claude Code