Repository navigation
fix(meeting-bot): prevent stalled realtime playback from growing memory - #116589
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 30, 2026, 11:04 PM ET / July 31, 2026, 03:04 UTC. ClawSweeper reviewWhat this changesThe PR prevents realtime meeting-bot audio playback from retaining unbounded queued output by serializing writes, clearing stale output on terminal events, and negotiating generation-aware behavior with remote node hosts. Merge readinessThis remains a live, maintainer-owned bug-fix PR rather than a cleanup close candidate. The current head adds bounded output handling plus a negotiated compatibility path for older and newer node hosts; the previous compatibility findings are addressed by explicit legacy serialization and generation fencing. Before merge, refresh the clean merge result against current Priority: P1 Review scores
Verification
How this fits togetherMeeting-bot realtime voice receives streaming provider audio and forwards it through local processes or remote browser-node bridges into meeting playback. The changed transport and node-host boundary decides whether audio is queued, cleared, rejected as stale, or written to the playback sink. flowchart LR
A[Realtime voice provider] --> B[Meeting realtime engine]
B --> C[Output owner and bounded queue]
C --> D{Playback bridge capability}
D --> E[Local playback process]
D --> F[Remote node bridge]
E --> G[Meeting audio sink]
F --> G
Decision needed
Why: The patch preserves existing node command shapes while adding optional receiver capability negotiation; the remaining decision is whether the final-base proof is sufficient for landing this maintained, user-impacting change. Before merge
Agent review detailsSecurityNone. PR surfaceSource +577, Tests +1114. Total +1691 across 17 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Keep the negotiated capability protocol internal, retain legacy serialization for non-advertising hosts, and land only after the rebased merge result passes the focused mixed-version playback suite and existing changed checks. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible with medium confidence: a stalled local output stream or blocked remote push exercises the new waiter/queue paths, and the PR supplies focused regressions for clear, stop, barge-in, and mixed-version behavior. I did not independently execute the repro in this read-only review. Is this the best way to solve the issue? Yes, subject to final-base verification: capability negotiation lets updated peers fence stale output while the legacy path serializes commands instead of breaking older node hosts, which is safer than making generation support mandatory. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 8dd575f98614. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (10 earlier review cycles; latest 8 shown)
|
40adaa8 to
c115a00
Compare
c115a00 to
9503328
Compare
|
Mixed-version and exact-head proof is now attached to the PR body. Maintainer rollout decision: the optional generation field uses graceful degradation. Both mixed-version directions preserve the pre-existing push/clear contract; generation-based stale suppression activates once the receiver is updated. The real-module harness verified both pairings, and the final node protocol files are byte-identical to the proofed implementation commit. Exact head @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Exact-head compatibility fix and proof are now in the PR body. Current head Proof: 209 focused tests, Testbox @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Merged via rebase.
|
Summary
Related: #116201
Rollout contract
Updated node hosts advertise
audioBridge.outputGeneration: truein the existing start response. Updated controllers use generation fencing with those hosts, so clear remains immediate even while an older write is draining.When an older host does not advertise support, the controller serializes push and clear commands per bridge. Stop bypasses that legacy queue so shutdown can interrupt a blocked write, and queued non-stop output is ignored after stop. Older controllers remain compatible with updated hosts because
outputGenerationis optional on the receiving side.The node invoke policy forwards only validated non-negative safe-integer generations. No provider, config, environment-variable, user-facing product, or public Plugin SDK surface is added.
Validation
Exact head:
da243d6fecb5cbc642e2a7a9fe1ce9e8f7e7aa7fnode scripts/run-vitest.mjs src/meeting-bot/realtime-engine.test.ts src/meeting-bot/realtime-local-audio-transport.test.ts src/meeting-bot/realtime-node-audio-transport.test.ts src/meeting-bot/node-host.audio.test.ts src/meeting-bot/chrome-transport.test.ts extensions/google-meet/src/node-invoke-policy.test.ts extensions/google-meet/node-host.test.ts extensions/google-meet/index.test.ts- 209/209 passedCI=true pnpm check:changed- passed, including core/extension types, lint, Plugin SDK API contract, dead exports, and import-cycle guardsgpt-realtime-2.1smoke with real credentials - three backend audio round trips completed, eachresponseDone: truewithlateAudioBytes: 0connectedMixed-version proof
Focused regressions cover the negotiated paths directly:
outputGenerationremain accepted and retain legacy response shapesThe existing real-module harness also verifies audio reaches the sink in both mixed-version directions and that updated-host stale generations return
{ bridgeId, ok: true, stale: true }without writing stale bytes.