Repository navigation
feat(moq-audio)!: a mix-minus removes several sources - #8274
Conversation
Quest-Claim: 054e6565f597502a
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 21 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. |
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed head b2df562. No actionable findings.
Exclusions are deduplicated by strip identity before taking the mixer lock, so caller-provided iterators can query routing without deadlocking. Each block subtracts only sources still routed by the parent, preserving routing changes and parent lifetime. The expanded regression covers multiple exclusions, duplicates and an iterator that reads the bus.
Direction: retain the single iterator-based minus API and collect before locking. Verification limits: GitHub source/diff review only; no builds, tests or audio runs performed.
There was a problem hiding this comment.
ℹ️ No critical issues — one minor measurement suggestion inline.
Reviewed changes
This run reviewed the full PR at b2df562a0 (4 commits against main at 0f14fee), and all 24 bus::tests pass locally.
Mix::minustakes many strips —minus<'a>(&self, strips: impl IntoIterator<Item = &'a Strip>)replaces the single-strip form, deduplicating byArcidentity before allocating aMinus.- Strips collected before the lock — the iterator is consumed and deduplicated outside
Mixer, so an iterator that callsMix::routescannot deadlock on the mixer mutex. Driver::advancesubtracts each removed source —MinusState::excludedis now aVec<Strip>; each block subtracts every excluded source the parent still routes, so routing changes and the "parent stopped routing" case still hold.- Test, bench, changelog, quest — the unit test now covers two removals, a duplicate, a routing change, an unrouted removal, and an iterator that reads the bus; the bench call site is updated; the changelog bullet says "any set of its sources"; the finished quest and its milestone-README line are deleted with no leftover references.
deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed head e17121d incrementally from b2df562, accounting for main's positioned/live channel changes. No new actionable findings.
The mix-minus behavior remains intact after the merge. The updated benchmark now sweeps 1, 4, and 16 excluded sources across 16 and 64 source mixes, using distinct wrapped strip selections and retaining the minus handles during measurement.
Verification limits: GitHub-only static review. No builds, tests, audio runs, or benchmarks executed; scaling claims were not measured.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
This run reviewed the delta since Pullfrog's review at b2df562a0: the reworked bus_minus benchmark, its module docs, and the main merge.
bus_minussweeps the removed set — the benchmark now builds each guest's mix-minus from(0..removed)wrapped strips and sweepsremoved∈ {1, 4, 16} across 16 and 64 sources, holding theMinushandles until after each measurement, so the per-removed-source subtraction loop inDriver::advanceis actually exercised (including the case where a minus removes every source).- Bench docs describe both axes — the module header now states the sweep and the expected scaling, replacing the single-axis description.
mainmerged, minus semantics preserved — the merge brings #8273'sLive/Positionedsplit into the module header and the test helpers, but leavesminus,MinusState::excluded, and the subtraction loop untouched; no conflict markers, the quest and its milestone line are still gone with no stale references, andrustfmt --checkon the bench passes. CI on this head is green, and its test action compiles benches via--benches --all-targets.
deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏

Finishes quest/m2/bus-minus-several.md.
Summary
Mix::minustakes any number of strips, so a guest with a camera and a screen share gets a return feed without either copy of their own sound (moq-dev/studio#37).minus<'a>(&self, strips: impl IntoIterator<Item = &'a Strip>) -> Minus, changed in place (no second method).Driver::advancesubtracts each removed source the parent routes: one subtraction per removed source per block, still cheaper than a second sum.minuscollects its strips before locking the mixer, so an iterator that reads the bus (such as one filtered byMix::routes) cannot deadlock.quest/m2/README.md.Impact
Breaking for
moq_audio::bus, which is new sincerelease, so this costs no extra major.mix.minus(&strip)becomesmix.minus([&strip]); pass every strip to remove, e.g.mix.minus([&camera, &screen]).Choices made without asking
impl IntoIterator<Item = &Strip>over&[&Strip]: callers write[&a, &b]either way, and the iterator also takes&Vec<Strip>or an iterator of a guest's strips without collecting.Minusto change it. No consumer needs a mutable set yet.rs/moq-audio/MIGRATE.mdstill saysmix.minus(&strip): AGENTS.md reserves that file for the release cut, so the migration note is above. The CHANGELOG line now says the mix-minus drops "any set of its sources".Overlap
moq-dev/moq#8273 also edits
rs/moq-audio/src/bus.rsandCHANGELOG.md; this PR touches onlyminus, its state, its test, and a separate CHANGELOG line, so the two should merge cleanly.Checks
just checkpasses locally.Caused by
No single PR:
minuswas built for one source from the start.Models
Size: S
Implementer: Claude Code, Claude Opus 5.5, medium effort
Reviewer: Codex, gpt-6.1-sol, high effort
Review
Rewritten by
quest reviewafter each round.01a1bc43-9003-78c1-a2eb-0653c9353c86, round 2The new head only merges base changes and leaves the previously reviewed implementation unchanged, with no actionable findings; builds and tests were not run as instructed.🤖 Generated with Claude Code
(Written by Claude Opus 5.5 with high effort)