From 2c7756caf2657dc074389e6edd058827ea8a7752 Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Wed, 12 Aug 2026 18:33:41 -0700 Subject: [PATCH] test(gateway): accept language/source args in gateway transcribe_audio stubs The pre_transcription hook threads (path, language, source) through gateway voice transcription; three sibling telegram-voice tests pinned the old single-arg call shape. --- tests/gateway/test_telegram_audio_vs_voice.py | 2 +- tests/gateway/test_telegram_voice_v0_regressions.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/gateway/test_telegram_audio_vs_voice.py b/tests/gateway/test_telegram_audio_vs_voice.py index 6d1321c082..7f807e3560 100644 --- a/tests/gateway/test_telegram_audio_vs_voice.py +++ b/tests/gateway/test_telegram_audio_vs_voice.py @@ -74,7 +74,7 @@ async def test_voice_message_still_transcribed(): history=[], ) - mock_transcribe.assert_called_once_with("/tmp/voice.ogg") + mock_transcribe.assert_called_once_with("/tmp/voice.ogg", None, "gateway") # The transcript passes through as a plain quoted line — no "voice message" # meta-commentary in the LLM-visible prompt. assert "hello world" in result diff --git a/tests/gateway/test_telegram_voice_v0_regressions.py b/tests/gateway/test_telegram_voice_v0_regressions.py index 16f99f1e4f..05c2fbcffe 100644 --- a/tests/gateway/test_telegram_voice_v0_regressions.py +++ b/tests/gateway/test_telegram_voice_v0_regressions.py @@ -163,7 +163,7 @@ async def test_pending_voice_interrupt_reuses_transcript_and_echo(): assert interrupt_text == '"hello once"' assert drain_text == interrupt_text assert drain_transcripts == interrupt_transcripts == ["hello once"] - mock_transcribe.assert_called_once_with("/tmp/telegram-voice.ogg") + mock_transcribe.assert_called_once_with("/tmp/telegram-voice.ogg", None, "gateway") adapter.send.assert_awaited_once_with( "12345", '🎙️ "hello once"', @@ -216,7 +216,7 @@ async def test_monitor_to_drain_transcribes_and_echoes_pending_voice_once( assert result["final_response"] == "follow-up complete" assert _PendingVoiceAgent.messages == ["initial turn", '"hello once"'] - mock_transcribe.assert_called_once_with("/tmp/telegram-pending-voice.ogg") + mock_transcribe.assert_called_once_with("/tmp/telegram-pending-voice.ogg", None, "gateway") assert adapter.sent == [("12345", '🎙️ "hello once"', None)]