fix(meet-audio): zero-PCM keepalive so Meet keeps the bot joined (#2945)#3323
fix(meet-audio): zero-PCM keepalive so Meet keeps the bot joined (#2945)#3323CodeGhost21 wants to merge 5 commits into
Conversation
PR-A of a two-PR split for slice A of #2945. Adds a permanent looping zero-PCM AudioBufferSourceNode to audio_bridge.js so Meet's WebRTC engine doesn't drop the bot for "no audio activity" during silence. Mirrors the existing camera-bridge 1-pixel-bob keepalive pattern. PR-B (post-admission watchdog) follows once PR tinyhumansai#3321 (slice B — diagnostics) merges.
3-task TDD plan for PR-A of slice A of #2945. Task 1 adds a Rust presence test asserting the keepalive code ships in audio_bridge.js (red). Task 2 adds the keepalive code itself (green). Task 3 verifies, pushes to aniketh, opens the PR.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (2)
📝 WalkthroughWalkthroughThis PR implements an audio keepalive mechanism in the Meet bot's Web Audio bridge to prevent Google Meet from dropping the bot during periods of silence. The change adds a looping zero-sample audio source to the destination stream, backed by a Rust verification test and comprehensive design and execution documentation. ChangesMeet Audio Keepalive Feature
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
docs/superpowers/plans/2026-06-04-meet-audio-keepalive.md (1)
15-21: ⚡ Quick winAdd an explicit “run Codex PR checklist” step before PR creation.
The plan already lists gates, but it should directly require
docs/agent-workflows/codex-pr-checklist.mdto avoid missing merge gates in agentic runs.Based on learnings: “Before opening AI-authored PRs from Codex web sessions or Linear-launched implementation agents, follow
docs/agent-workflows/codex-pr-checklist.md.”Also applies to: 326-401
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/superpowers/plans/2026-06-04-meet-audio-keepalive.md` around lines 15 - 21, The plan file (docs/superpowers/plans/2026-06-04-meet-audio-keepalive.md) needs an explicit pre-PR step to run the Codex PR checklist; add a new bullet under the pre-flight or PR creation section that instructs executors to run docs/agent-workflows/codex-pr-checklist.md before opening the PR (e.g., "Run Codex PR checklist: docs/agent-workflows/codex-pr-checklist.md") so agentic runs cannot skip merge gates; apply the same insertion pattern to other affected plans (326-401) mentioned in the comment.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/superpowers/plans/2026-06-04-meet-audio-keepalive.md`:
- Around line 265-269: The fenced commit-list block shown in the diff (the
triple-backtick block containing the three commit lines starting with
"fix(meet-audio):..." and ending with "docs(meet):...") lacks a language tag and
triggers markdownlint MD040; update that fenced code block to use a language tag
such as text (or bash) by changing the opening ``` to ```text so the block is
properly labeled.
In `@docs/superpowers/specs/2026-06-04-meet-audio-keepalive-design.md`:
- Around line 40-52: The fenced architecture block containing the ASCII diagram
starting with "Brain PCM (when speaking)" and ending with "Meet WebRTC" lacks a
language identifier and triggers markdownlint MD040; update the opening fence to
include a language tag (e.g., add "text" after the triple backticks) so the
block becomes ```text and the diagram (the lines referencing
MediaStreamDestinationNode, freshAudioStream().clone(),
getUserMedia({audio:true})) is treated as a text code block.
---
Nitpick comments:
In `@docs/superpowers/plans/2026-06-04-meet-audio-keepalive.md`:
- Around line 15-21: The plan file
(docs/superpowers/plans/2026-06-04-meet-audio-keepalive.md) needs an explicit
pre-PR step to run the Codex PR checklist; add a new bullet under the pre-flight
or PR creation section that instructs executors to run
docs/agent-workflows/codex-pr-checklist.md before opening the PR (e.g., "Run
Codex PR checklist: docs/agent-workflows/codex-pr-checklist.md") so agentic runs
cannot skip merge gates; apply the same insertion pattern to other affected
plans (326-401) mentioned in the comment.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: c771e410-50d0-4459-97ca-ed11402de018
📒 Files selected for processing (4)
app/src-tauri/src/meet_audio/audio_bridge.jsapp/src-tauri/src/meet_audio/inject.rsdocs/superpowers/plans/2026-06-04-meet-audio-keepalive.mddocs/superpowers/specs/2026-06-04-meet-audio-keepalive-design.md
Manual verification — PASS ✅Ran Result: the bot stayed in the meeting for 3–4+ minutes without dropping. This directly contradicts the bug's reported symptom from #2945 ("OpenHuman joins the meeting briefly, drops after around 5 seconds, shows a rejoining state, and then never actually rejoins the call"). The 3–4 min observation window is well past the 5-second drop point. The hypothesis from the design spec held: pure zero-PCM into the What this verification did and did not cover✅ Covered: the core "agent stays joined" symptom from #2945. 🔍 Not exercised in this session (listed in the PR body for reviewer follow-up — none affect the PASS verdict on the core symptom):
I'll happily run the bonus checks if a reviewer wants them captured before merge — just say. |
|
@senamakel — would appreciate a maintainer pass on this when you have a minute. Branch-protection requires it before the squash-merge can land, and this is the actual fix for the 5-second-drop symptom in #2945. Quick summary:
Companion PR #3321 (diagnostics + error toast) is independent and not blocking this one. |
|
we're moving this to the server side. closing this for now. |
|
okay |

Summary
Part of slice A of #2945 (root cause of the ~5 s drop). This is PR-A of a two-PR split — PR-B (post-admission watchdog) will follow once PR #3321 (slice B — diagnostics) merges.
Adds a permanent looping zero-PCM
AudioBufferSourceNodetoaudio_bridge.jsinsideensureContext(). Without it, the bot's WebRTC audio track staysreadyState: livebut produces zero PCM during silence — some Meet builds drop the bot for "no audio activity" after a few seconds. Mirrors the camera-bridge 1-pixel-bob keepalive (meet_video/camera_bridge.js:179–181"keeps the WebRTC encoder from dropping the stream as 'frozen'").The brain's PCM mixes in via the existing
__openhumanFeedPcmpath — zero + real = real, so live speech is unaffected. The keepalive source is not tracked inactiveSources, so barge-in (__openhumanFlushAudio) does not stop it.Evidence the bug is real
speak_pump.rs:270–282pushes nothing on idle ticks — confirmed.meet_scannerexits at admission with no watchdog (meet_scanner/mod.rs:353–399).TAURI-RUST-8TM— 4 065 events of[meet-agent] no session for request_id=…from a single 107-minute call (src/openhuman/meet_agent/session.rs:865) — consistent with shell-side pumps running long after core dropped the session.Acceptance criteria addressed (from #2945)
Acceptance criteria still open:
Spec and plan
docs/superpowers/specs/2026-06-04-meet-audio-keepalive-design.mddocs/superpowers/plans/2026-06-04-meet-audio-keepalive.mdTest plan
cargo fmt --checkclean on root +app/src-tauricargo check --manifest-path app/src-tauri/Cargo.tomlclean (27 pre-existing warnings, no new errors)cargo test meet_audio::green — 8/8 including the new presence testaudio_bridge_contains_keepalive_blockpnpm compile(tsc --noEmit) cleanprettier --checkclean onaudio_bridge.jsManual verification deferred to reviewer / maintainer — the implementing agent cannot launch a real Google Meet session from this environment. Before merge, please run:
pnpm dev:app, open Skills → Meeting Bots, join a real Google Meet.chrome://webrtc-internals/, find the outbound audio track for our bot, confirmbytesSentis monotonically increasing during silence (not stuck at zero).activeSources, so__openhumanFlushAudioshould still stop the brain's sources only).Real Meet E2E for the drop/rejoin path is intentionally NOT included — there is no mock-Meet harness in CI today. Same rationale as PR #3321.
Rollback
Revert this PR. Zero state, zero migration, behavior returns to prior immediately.
If the hypothesis is wrong
Bot still drops at ~5 s after merge. We learn DTX is suppressing pure silence on the wire. Next step: ship PR-B (watchdog) so the drop is surfaced in production telemetry, then file a follow-up swapping the zero buffer for a -60 dB pseudo-random noise buffer (~5 extra lines). The 20-line cost of this PR is the cheapest probe of the hypothesis.
Summary by CodeRabbit
New Features
Tests
Documentation