Repository navigation
test(interop): the native JS subscriber fails on an audio gap it reads - #9769
Conversation
…o-gaps.md Quest-Claim: 2c062930d6d916a9
The FFI publishers' tone gaps came from 2.5 ms per-packet audio groups: a starved Node reader ran out of stream credit, and the relay shed the newest-first backlog behind the group waiting for it. The reader reported each shed run as a gap, but this client skipped gap reads, so the cell failed later in tone.py as a timestamp gap. #9561's 100 ms groups removed the cause. This client now fails on the gap itself, as the FFI clients do, naming where it is and how long. Finishes quest/m0/test-flakes-5/interop-ffi-publisher-audio-gaps.md and adds two follow-ups found while looping. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. WalkthroughThe JavaScript native audio reader now throws an error when it receives a gap, including the decoded sample count, timestamp, and duration. The changes add an investigation note about AAC gaps under load, remove an earlier publisher timestamp-gap report, and add a note about a Node finish-reader timeout. Merge Risk:
|
Finishes quest/m0/test-flakes-5/interop-ffi-publisher-audio-gaps.md and deletes it.
Problem
python -> *andgo -> *interop cells once failedtone.pywithtimestamp gapon a loaded host (moq-dev/moq#9720), and nobody knew whether the gap came from the FFI encoder, the relay, or a reader.Cause
Reproduced on that run's base (
54c862e955), not onmain:shedding a group ranked below one waiting for credit, 53 times in one failing round). That is the designed newest-first behavior.@moq/hang'sContainer.Consumerreported each shed run as agapread (skipping missing groups: track=tone 540001 -> 800000). The native JS subscriber skipped gap reads, so the cell failed later intone.pyas a timestamp gap.-> js-native-node.moq-dev/moq#9561 (100 ms audio groups, 10 streams a second) removed the cause.
mainpasses every Python and Go cell under the same load.Approach
test/interop/clients/js-native/subscribe.tsfails on a gap read, as the FFI clients already do, and names it:audio gap after N samples, at Tus for Dus. A delivery hole now says so, instead of surfacing as a decoder timestamp complaint intone.py. Over the 600 ms it reads, this fails no cell that did not already fail: a gap inside the window already broketone.py's continuity check.tone.py's bound is unchanged. No retry or timeout was added.Impact
Public API: none. Wire: none. Test client only.
Validation
All loops ran the media rounds alone (a scratch loop over
start_publisherandrun_roundininterop.sh, not committed), throughquest gate, understress-ng --cpu 64on a 32-core host. stress-ng ran bounded inside the gated command and was stopped by PID.54c862e955(old base)-> js-native-node, timestamp gaps54c862e955+ this changeaudio gap after N samples, at T for Dmain(541c0839bf)main+ this change--timeout 30rust -> js-native-node(follow-up below)Also one unloaded full
just test interop --publishers python,go,rust --subscribers cpp,c,gst,js-native-node,js-native-bun,rust: every media cell passed;finish go -> js-native-nodefailed (follow-up below).just checkandjust cipass.Caused by
No single PR: per-packet audio groups were the long-standing default until moq-dev/moq#9561, and the native JS client's audio feed skipped gap reads.
Alternatives
main: 1,020 loaded Python and Go cells found none, and the old base's failures name a causemainno longer has.Decisions
Taken on my recommendation while the maintainer was away:
main, instead of waiting for amainfailure.tone.py.Follow-ups
rust -> js-native-nodereported a 917 ms AAC gap inside a 1 s group the relay delivered whole, with no shedding and neither skip warning (1 of 270 loaded Rust cells).finish clean ..., then hung untiltimeout(once, unloaded).Models
Size: M
Implementer: Claude Code, claude-opus-5-5, unknown (arm A)
(Written by Claude Opus 5.5)
🤖 Generated with Claude Code
Review
Rewritten by
quest reviewafter each round.The change deletes one quest plan file and adds two, plus a test-only interop client edit in test/interop/clients/js-native/subscribe.ts that throws on an audio gap; nothing a published consumer or deployed peer relies on changes, and a revert fully undoes it.9c2a8438-4616-4670-a97a-135c7e25becb