Repository navigation
test(stream-credit): a browser tab reads 300 live tracks past its stream cap - #8652
Conversation
Quest-Claim: c61a49654153d957
…eam cap `just test stream-credit` stands up moq-relay, publishes 300 live tracks from @moq/net over WebSocket, and reads them in a Chromium or Firefox tab over WebTransport in three priority tiers, on lite-07 and lite-06. It checks the top tier reads every group within its budget, every subscription ends soon after the publisher finishes, frames follow priority, and on lite-07 that the relay continues paused groups. It found two rare browser reset failures on lite-07, which a new child quest owns before the harness joins the nightly interop workflow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
ℹ️ No critical issues — two small rough edges inline.
Reviewed changes
I reviewed the whole PR: a new local-only browser test of stream credit by priority, plus a quest to track the browser reset failures it found.
just test stream-creditharness:run.shstartsmoq-relaythroughtest/lib/harness.shand runsdriver.tsfor each version (lite-07, lite-06) and engine (Chromium, Firefox).- Publisher and judge (
driver.ts): a Bun@moq/netpublisher over WebSocket writes 300 tracks of live groups. The driver then checks the tab's report: the high tier reads every group whole, every subscription drains, frames follow priority, and on lite-07 the final group arrives whole and the relay log showscontinuing paused group. - Browser reader (
src/main.ts,src/plan.ts): a Vite-built page subscribes over WebTransport only, in three priority tiers, and records each group's frames. - Quest bookkeeping: the epic README now describes the test,
browser-resets.mdowns the Chromium and Firefox reset failures plus the CI wiring, andtest-inventory.allowrecords that quest as the recipe's owner.
The relay log scoping (conn{id=N of the last WebTransport session on the version) uses the same pattern as test/interop/relay-log.sh. Every cell republishes broadcast credit with the same track:seq:frame payloads, so reusing the name between cells keeps each identity's content the same.
claude-opus-5-5 | 𝕏
|
No actionable comments were generated in the recent review. WalkthroughAdds a stream-credit test harness that publishes 300 tracks through a relay and reads them in Chromium or Firefox over WebTransport. The driver checks track priority, group delivery, subscription completion, and relay log entries across the configured protocol versions. The runner supports selecting versions and browser engines. Merge Risk:
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Reviewed the delta since the prior Pullfrog review, which only addresses that review's two findings.
- Relay log miss is a recorded failure:
judgeindriver.tsnow pushes tofailuresand returns when the relay log names no WebTransport session, instead of throwing, so the collectedFAILoutput stays whole. run.shheader names Firefox: the comment now says a Chromium or Firefox tab.
claude-sonnet-5-5 | 𝕏

Works on quest/m1/stream-credit/README.md: the stream-credit epic's own remaining work, the browser end-to-end test that builds its own harness, now that its last child (moq-dev/moq#8610) merged.
Summary
Adds
just test stream-credit(test/stream-credit/). A Chromium or Firefox tab reads 300 live tracks throughmoq-relayover WebTransport, three times the ~100 streams a browser lets a server open to one session:run.shstarts the relay throughtest/lib/harness.sh(private run dir, reserved port, process groups) and runsdriver.tsfor each version (lite-07, lite-06) and engine (Chromium, Firefox).driver.tspublishes from@moq/netin Bun over WebSocket (qmux's raised stream limit, so the browser's cap is the only one in play). Each track keeps one group open at a time, like a live GOP: 40 groups at 200 ms, two frames each.src/, built with Vite, launched with the interop harness'slaunch) subscribes over WebTransport only, in three tiers: high (priority 2, 30 tracks, 500 ms budget), mid (priority 1, 120 tracks, live edge), low (priority 0, 150 tracks, live edge).A cell passes when:
The harness runs locally only for now. It found two rare browser reset failures on lite-07 (below), and the new child quest browser-resets owns them plus the nightly interop wiring.
sh/gh/test-inventory.allowrecords that owner.Findings
TypeError: Error in input streamand no stream error code, so the reader can't tell it from a YIELDED reset. Firefox 157 negotiates RESET_STREAM_AT (Reliable Size 3).moq-dev/moq#8643's copy-fill duplicate never showed up: no group was handed out twice in any run.
Impact
No public API or wire change. Test-only: a new private workspace package
@moq/stream-credit-testand atest::stream-creditrecipe. No CI time added.Validation
quest gate just test stream-credit, full matrix, several times: every cell passes. Typical lite-07 numbers: high 100% of frames, mid 61-64%, low 2-3%; every track ends within ~0.5 s of the publisher finishing; the relay continues 600-1,300 paused groups per run.js/net's group-stream lifecycle, which is not committed.quest gate just check: passes.Decisions
Made without asking, since the maintainer was away:
moq-relay(the binary), astest/draindoes, rather than an in-processmoq_tokiorelay. It is the real surface the epic names.DEFAULT_VERSIONSexcludes lite-07-wip), and Firefox too, since the epic cites its 100-stream cap.launchfromtest/interop/clients/js/harness.tsfor its Nix Firefox library handling, rather than copying it. The tsconfig includesjs/common/worklet.d.tsfor that import's type graph.Follow-ups
just test stream-creditto the nightly interop workflow and delete the epic README. Kept by the maintainer, 2026-11-13.Caused by
No single PR: a new test. The browser failures it found may sit in the browsers themselves; that's undetermined.
Models
Size: L
Implementer: Claude Code, claude-opus-5-5, unknown effort
(Written by Claude Opus 5.5)
🤖 Generated with Claude Code
Review
Skipped on head 877bbd8: since the last
quest review, only comments and test-failure reporting changed, answering Pullfrog's and CodeRabbit's findings; Pullfrog re-reviews this head.