fix(gateway): serialize STT/TTS reliability slice behind V6 contract - #78196
Open
andrexibiza wants to merge 3 commits into
Open
fix(gateway): serialize STT/TTS reliability slice behind V6 contract#78196andrexibiza wants to merge 3 commits into
andrexibiza wants to merge 3 commits into
Conversation
Prevents a stalled gateway speech-to-text call from holding a messaging chat indefinitely. Gateway voice transcription runs synchronous provider work through asyncio.to_thread(); provider HTTP/process timeouts do not cover hangs in setup, local fallback, filesystem access, or cleanup, so one stuck call can block the chat lock and every later message in that conversation. Adds a configurable gateway-level deadline (stt_timeout_seconds, default 45s; stt.gateway_timeout_seconds in config.yaml) around the complete configured-provider + local-fallback sequence. On timeout, Hermes logs the failure, keeps the existing audio-path marker, and continues fail-open so the agent can respond instead of leaving the chat wedged. Salvaged from NousResearch#74051, authored by @mglavinic86. Signed-off-by: andrexibiza <84248988+andrexibiza@users.noreply.github.com>
Salvaged residual gaps from NousResearch#65745 (authored by @dhansxd) that are not already covered on main: - Recover allowed media producers from explicit tool-result tool_name / name when the paired assistant tool_calls row is absent. Persisted or reconstructed tool results that lost that row previously fell out of the automatic-delivery allowlist, so their TTS/audio MEDIA tags were silently dropped instead of delivered. - Log unsuccessful auto voice-reply SendResult values instead of silently ignoring them, so delivery failures are diagnosable. The other NousResearch#65745 changes (drop silent transcripts before invoking the agent, transcribe voice follow-ups before busy-session handling) are already covered on main by NousResearch#41603's empty-transcript sentinel and the pending-STT cache, so they are intentionally not re-applied. Co-Authored-By: Dani Ubaidillah Husain <daniubaidillahhusain@gmail.com> Signed-off-by: andrexibiza <84248988+andrexibiza@users.noreply.github.com>
This was referenced Aug 4, 2026
Closed
…ribution Maps the author emails of the two salvaged gateway voice commits (from NousResearch#74051 @mglavinic86 and NousResearch#65745 @dhansxd) so the check-attribution CI gate can resolve them to their GitHub identities. Signed-off-by: andrexibiza <84248988+andrexibiza@users.noreply.github.com>
This was referenced Aug 4, 2026
andrexibiza
marked this pull request as draft
August 20, 2026 15:14
This was referenced Aug 20, 2026
andrexibiza
marked this pull request as ready for review
August 21, 2026 01:35
This was referenced Aug 21, 2026
Contributor
Author
V6 paired-contract interlock published in #91913The authority-continuity manifest records this PR together with #78180 and deliberately assigns no independent V6 delivery owner yet. This lane owns bounded transcription settlement, fail-open audio preservation, media-producer recovery, and delivery visibility inside the shared voice-turn state machine. It must consume the same agent-turn admission decision as #78180; timeout/fallback and media recovery cannot manufacture or bypass an agent turn. Contract PR: #91913 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Current disposition —
candidate_blocked(Discord V6)Canonical campaign authority: #90321, validated by the generic ledger contract in #90307.
Exact current head:
8e5cf6e57ca547da5a7b79a445cf5b66c426d9e0.This branch contains real STT/TTS reliability fixes, but it is not the complete V6 publication authority by itself. V6 remains a paired/collision gap: open #78180 changes adjacent Discord voice config, persistence, command,
gateway/run.py, and adapter surfaces. The campaign needs an explicit addendum and serialized composition rather than merging two locally coherent voice trains and discovering the contract afterward.What this branch proves
1. Bounded stalled transcription
Salvaged from #74051, authored by @mglavinic86:
stt_timeout_secondsto 45 seconds;2. Media-producer recovery and delivery visibility
Residual work from #65745, authored by @dhansxd:
tool_name/namefields when the paired assistanttool_callsrow is absent;SendResultvalues instead of silently discarding the failure.Historical focused verification reported 61 passing tests on Windows plus clean diff/footgun checks. That evidence remains useful for this head; it is not exact-current-main acceptance.
V6 collision / contract gap
#78180 independently introduces per-chat transcribe-only mode, transcript destinations, persisted voice preferences, slash-command behavior, and additional STT drop-point logging. It touches the same broad voice-control surfaces while representing different product semantics.
Before either train is promoted as V6 completion, the paired addendum must decide:
Required before merge
Historical relationships
/voice joinmissing from slash UI #11349 D2 — verified absent; no documentation drift introduced.This PR is implementation evidence pending V6 composition. It is ready for review, but not merge-authorized until the paired V6 contract above is satisfied.