Repository navigation
fix(audio): drive the capture gap test on its local task - #7976
Conversation
…pped (#7878) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Luke Curley <kixelated@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: GPT-6.1 Sol <noreply@openai.com> Co-authored-by: quest fixer <quest-fixer@localhost>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: GPT-6.1 Sol <noreply@openai.com>
Co-authored-by: GPT-6.1 Sol <noreply@openai.com>
Co-authored-by: GPT-6.1 <noreply@openai.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: GPT-6.1 Sol <noreply@openai.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: GPT-6.1 Sol <noreply@openai.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Grok 4.7 <noreply@x.ai> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: GPT-6.1 Sol <noreply@openai.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: GPT-6.1 Sol <noreply@openai.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Quest-Claim: 19966b04994b0ad3
Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: GPT-6.1 Sol <noreply@openai.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: moq-bot <moq-bot@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: GPT-6.1 Sol <noreply@openai.com>
Co-authored-by: GPT-6.1 Sol <noreply@openai.com> Co-authored-by: moq-bot <moq-bot@users.noreply.github.com>
…7764) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: GPT-6.1 Sol <noreply@openai.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
#7942) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: GPT-6.1 Sol <noreply@openai.com>
Co-authored-by: GPT-6.1 Sol <noreply@openai.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: quest fixer <quest-fixer@localhost>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: moq-bot <moq-bot@users.noreply.github.com>
Co-authored-by: pullfrog[bot] <226033991+pullfrog[bot]@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: moq-bot <moq-bot@users.noreply.github.com>
…ants (#7656) Co-authored-by: GPT-6.1 Sol <noreply@openai.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…nch runs (#7928) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: GPT-6.1 Sol <noreply@openai.com>
Co-authored-by: GPT-6.1 Sol <noreply@openai.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: pullfrog[bot] <226033991+pullfrog[bot]@users.noreply.github.com> Co-authored-by: moq-bot <moq-bot@users.noreply.github.com>
…e track (#7956) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: moq-bot <moq-bot@users.noreply.github.com> Co-authored-by: quest fixer <quest-fixer@localhost>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: quest fixer <quest-fixer@localhost>
…by their lifetime (#7884) Co-authored-by: GPT-6.1 Sol <noreply@openai.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…ts end (#7951) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: quest fixer <quest-fixer@localhost>
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed head: 7f0433be12afc2e04bc7deef9fd94fb689df9433.
Findings: No actionable correctness issues found in the capture-test fix or its quest update.
Fix status and direction:
rs/moq-audio/src/capture.rs:859–865removes thetokio::spawnSend bound by polling capture and both assertions in the test's own task. This matchesProducer::run's macOS contract and the CLI's existing local-task handling without adding an unsafe Send guarantee.- The empty gap marker still precedes two retained sample buffers. Both reader assertions remain required for success; premature producer completion panics, and successful assertions drop the capture future. The existing non-macOS Send assertions remain intact.
- Keep the scoped fix and the outstanding native-validation follow-up. A green scheduled macOS run and the subsequent week of websocket evidence remain unverified; the quest correctly stays open for them. No additional code change is requested by this review.
Scope and limits: GitHub-only static review of the two-file branch delta against live main at 1a6ac473d75fcbfd5d23bdbdfd64eb4750b077ad, including capture/fanout lifetime behavior, the ScreenCaptureKit handle, CLI local-task execution, and platform workflow wiring. The PR API also exposes a much larger file list against an older base; unrelated changes already present on current main were not re-reviewed. I did not run builds/tests or native macOS validation. The exact-head Check run was still in progress when inspected; the PR's local-test results are author-reported, not independently rerun here.
Rechecked immediately before submission: open, non-draft, unchanged head, and no existing published review to duplicate. This is a COMMENT review, not merge approval.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Capture gap test driven on the test's own task —
an_empty_gap_buffer_marks_the_next_samplesreplacestokio::spawn(producer.run())with atokio::select!betweenproducer.run()and the two reader assertions, panicking if the producer stops early. The reader branch completing drops therunfuture, whichStream::readdocuments as cancel-safe, so the device is released exactly as the oldrun.abort()did. The pattern matches production (rs/moq-cli/src/publish.rsdrivescapture.run()in the same select on the local task) and needs noSendorunsafe. - Quest update —
quest/m0/nightly/macos.mdrecords the fix, keeps the quest open for the scheduled macOS evidence, and marks independent Nightly reporting as#7667's work. Its## Waitingitem names a check a later run can evaluate, and the cited#7829fix is present in the tree (the websocket test was repaired, not skipped).
The capture-and-quest delta against current main is exactly these two files; the 1266-file PR list comes from the recorded base (40796ae) being on an older main lineage. I verified the 2026-11-05 job log: both reported errors come from the single capture.rs:859 spawn site, so this fix closes the compile failure rather than advancing past it.
deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏

Problem
The scheduled macOS job cannot compile
an_empty_gap_buffer_marks_the_next_samples: it spawns a non-Send capture producer. November 5's job confirms the failure before any tests execute.Approach
Drive capture and its two reader assertions concurrently in the same task with
tokio::select!. Completion of the assertions drops the producer; unexpected producer termination fails the test.Producer::runalready documents its macOS local-task requirement, and the CLI runs capture in aLocalSet. No Send guarantee is added.Keep the quest, updated with what remains and the websocket investigation. moq-dev/moq#7829 already reproduced the November 2 timeout on native macOS and fixed the client being dropped before server admission completed, with 100/100 native repetitions passing. Later scheduled runs fail before reaching it. moq-dev/moq#7667 owns independent failure reporting, not this compile fix.
Impact
Alternatives
An unsafe Send implementation would contradict the existing local-task contract. A LocalSet in this test is unnecessary: the producer and assertions can be polled together directly.
Choices made without asking
Retain the existing Linux PR gate. The existing native Platform check uses
cargo check --all-targetsand catches this error; it runs nightly and for release PRs, rather than on every main PR. Adding a macOS runner to every PR is not a cheap gap closure. A synthetic non-Send test marker would catch test spawns but leave production callers unchecked and remove the non-macOS Send assertion from test builds. Preserve the real platform types and contract checks. No workflow changes overlap with the reporting PR.Validation
nix run .#quest -- gate nix develop --command just ci origin/main: passed (exit 0), including all check phases, GitHub tooling tests, and 1,642 Rust tests (61 skipped).nix run .#quest -- check --base origin/main --branch quest/m0/nightly/macos: passed, 579 documents.git diff --check: passed.Review
Claude Code / Claude Opus 5.5, medium effort, via
quest review --base origin/main, session065b8d07-0b42-4d8c-b4fe-209cfb22dcfa.Round 1 requested consideration of a synthetic non-Send Linux test backend. Fixed the missing alternatives discussion in the quest, recording why that changes test-platform contracts without covering production callers. Round 2 reviewed
ac64fc04a33bf69a93479117d50340057a5da60e: no findings. Head7f0433be12afc2e04bc7deef9fd94fb689df9433adds only a conflict-free merge with main; the capture and quest files are identical to that reviewed head. No new round is required under the merge exemption.Landing decision
The maintainer authorized landing through the 2026-11-06 quest-complete session. The coordinator queues this PR. The scheduled validation wait remains in the quest rather than blocking this compile fix.
Follow-ups
The earlier direnv-hook test failure did not recur in this full local CI run. Consider isolating benchmark build-regression fixtures from the shared performance benchmark lock: the tooling phase spent hours queued behind unrelated benchmarks. No follow-up quest was created.
(Written by GPT-6.1 Sol with medium effort)