The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(google_meet): stop the PCM tail thread from swallowing every exception
teknium178cee6bcbdb8
diff --git a/plugins/google_meet/meet_bot.py b/plugins/google_meet/meet_bot.pyindex 0c55ed210b1..35124408d95 100644--- a/plugins/google_meet/meet_bot.py+++ b/plugins/google_meet/meet_bot.py@@ -211,8 +211,8 @@ def _pcm_tail_loop(proc, pcm_path: Path, stop_flag: dict, poll_interval: float =continueproc.stdin.write(chunk)proc.stdin.flush()- except Exception:- pass # pump exited / pipe closed: nothing left to stream to+ except (OSError, ValueError):+ pass # pump exited / pipe closed (BrokenPipeError, write on closed stdin): nothing left to stream tofinally:_quiet(proc.stdin.close)diff --git a/tests/plugins/test_google_meet_plugin.py b/tests/plugins/test_google_meet_plugin.pyindex 519313d5f64..cdcd90db1b5 100644--- a/tests/plugins/test_google_meet_plugin.py+++ b/tests/plugins/test_google_meet_plugin.py@@ -371,6 +371,25 @@ def test_pcm_pump_receives_audio_appended_after_start(tmp_path, monkeypatch):assert state.mic_state is None and "micState" in state.status_path.read_text(encoding="utf-8")+def test_pcm_tail_loop_swallows_only_pipe_errors(tmp_path):+ """A closed pump pipe is expected and quiet; any other tail-thread bug must not be silenced."""+ from types import SimpleNamespace++ from plugins.google_meet.meet_bot import _pcm_tail_loop++ pcm = tmp_path / "speaker.pcm"+ pcm.write_bytes(b"\x00" * 16)++ def proc(exc):+ def write(_chunk): raise exc+ return SimpleNamespace(poll=lambda: None, stdin=SimpleNamespace(write=write, flush=lambda: None,+ close=lambda: None))++ _pcm_tail_loop(proc(BrokenPipeError()), pcm, {"stop": False}) # quiet+ with pytest.raises(RuntimeError):+ _pcm_tail_loop(proc(RuntimeError("bug")), pcm, {"stop": False})++# ---------------------------------------------------------------------------# Realtime session counters + cancel_response (barge-in)# ---------------------------------------------------------------------------