fix(gateway): steer busy voice follow-ups after STT - #65023
Conversation
tonydwb
left a comment
There was a problem hiding this comment.
Code Review Summary
Verdict: Approved
Looks Good
- Fix(gateway): steer busy voice follow-ups after STT
- 95 additions, 1 deletion — targeted fix
- No issues detected
Reviewed by Hermes Agent
|
Thanks for the focused regression fix. The premise is confirmed on current main: The proposed preprocessing follows the existing inbound voice contract at Automated hermes-sweeper review. |
…point Follow-up for salvaged #65023/#53020: _prepare_busy_steer_text now calls _transcribe_and_echo_pending_voice (the same helper the interrupt monitor and pending-drain paths use) instead of a private transcription+echo copy, so out-of-band voice pays one STT call per platform message and the echo respects the count-based ledger from #67281. can_steer now accepts events whose attachments are all STT-eligible voice media, completing the steer half of #58780. Adds extract_media gating tests for #44826 and the contributor mapping for chefboyrdave21.
|
Merged into main via consolidated salvage PR #73518 (merge Your contribution is credited to you in git history. Thank you! Closing this PR as merged-via-salvage. |
…point Follow-up for salvaged NousResearch#65023/NousResearch#53020: _prepare_busy_steer_text now calls _transcribe_and_echo_pending_voice (the same helper the interrupt monitor and pending-drain paths use) instead of a private transcription+echo copy, so out-of-band voice pays one STT call per platform message and the echo respects the count-based ledger from NousResearch#67281. can_steer now accepts events whose attachments are all STT-eligible voice media, completing the steer half of NousResearch#58780. Adds extract_media gating tests for NousResearch#44826 and the contributor mapping for chefboyrdave21.
What does this PR do?
Fixes busy-input
steerbehavior for voice messages.A media-only voice follow-up reaches the gateway busy handler before the normal inbound STT pipeline. Its
event.textis therefore empty, sorunning_agent.steer()cannot accept it and the gateway silently falls back to queue mode. That makes voice follow-ups behave differently from text follow-ups even whendisplay.busy_input_mode: steeris configured.This change transcribes voice-message media inside the busy steer path before calling
running_agent.steer(). Successful transcriptions are injected into the active run and are not replayed as a later queued turn. Regular audio-file attachments remain outside automatic STT, matching the existing inbound behavior. If STT fails, any caption is preserved and the existing lossless fallback remains in place.Related Issue
No existing issue or PR found after searching open and closed items for busy voice/steer/transcription behavior.
Type of Change
Changes Made
GatewayRunner._prepare_busy_steer_text()to transcribe voice-message media before steering.MessageType.AUDIOattachments as files rather than automatically transcribing them.agent.steer(transcript), no interrupt, and no pending queue replay.How to Test
display.busy_input_mode: steerand enable inbound STT.Targeted automated verification:
pytest -q tests/gateway/test_busy_session_ack.py tests/gateway/test_stt_transcript_echo_config.py # 33 passedA full
pytest tests/ -qrun was also attempted, but exceeded the 600-second local execution limit before completion; the targeted gateway/STT suites pass.Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — N/A; behavior is internal and documented in the new method docstringcli-config.yaml.exampleif I added/changed config keys — N/A; no config keys changedCONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — N/A; no architecture/workflow changeScreenshots / Logs
The regression test covers the original failure mode directly: a voice-only busy event is transcribed, passed to
agent.steer(), and absent from the adapter pending queue.