Skip to content

fix(voice): raise the background turn ceiling from 90s to 180s - #5536

Merged
senamakel merged 1 commit into
tinyhumansai:mainfrom
YellowSnnowmann:fix/voice-turn-ceiling
Aug 13, 2026
Merged

fix(voice): raise the background turn ceiling from 90s to 180s#5536
senamakel merged 1 commit into
tinyhumansai:mainfrom
YellowSnnowmann:fix/voice-turn-ceiling

Conversation

@YellowSnnowmann

@YellowSnnowmann YellowSnnowmann commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

Problem

90s was aborting real answers. Observed on staging across two consecutive calls asking the same thing ("Can you please summarize my emails?"):

  • conv_6201kzxwc51ye9682qzgh8wa597r — the deferred turn finished in ~53s, the read-back landed at t=58, and the summary was spoken (519 TTS chars).
  • conv_2001kzxw8r84f82tcpkr7pjyrrd5 — the same request was still running past 90s, hit the ceiling, and the caller got "Sorry — I couldn't finish that request just now." instead of their summary. No read-back message appears in that transcript at all.

Same code, same path, same question — the difference is how many Composio round-trips the inbox needed. A hard ceiling that a normal request can cross is a failure the user cannot distinguish from a broken feature.

Solution

TURN_TIMEOUT_SECS 90 → 180, with the reasoning recorded on the constant.

This ceiling does not govern how long the caller waits — VOICE_ACK_DEADLINE_SECS caps that at ~8s and hands off to chat. It governs the deferred half: the orchestrator keeps working after the voice turn closes, and its answer is delivered into chat and read aloud if the call is still up. So a higher value costs a slow turn nothing and buys it the chance to land at all.

Submission Checklist

  • Tests added or updated (happy path + at least one failure / edge case) per Testing Strategy — N/A: constant change. The value is a timeout ceiling with no branch of its own; the paths around it (deferred delivery, failure notice, read-back) are covered by the existing realtime_harness tests, which pass unchanged.
  • Diff coverage ≥ 80%N/A: no new executable lines (one constant, the rest doc comment).
  • Coverage matrix updated — N/A: behaviour-only change
  • All affected feature IDs from the matrix are listed under ## RelatedN/A: no matrix rows affected
  • No new external network dependencies introduced
  • Manual smoke checklist updated if this touches release-cut surfaces — N/A: no release-cut surface change
  • Linked issue closed via Closes #NNNN/A: follow-up, #5399 stays open for the remaining work

Impact

Desktop only. No API, schema, or storage change.

Merge order matters. The relay's DEFAULT_TIMEOUT_MS must stay above this ceiling — whichever side is lower decides which error the user sees. tinyhumansai/backend#1274 raises it to 185s and should land first or together. Merging this alone against a 95s relay would cut a still-streaming turn at 95s and report a relay failure for a turn that was working.

The remaining latency work is unchanged and still open under #5399: the ~10.6s pre-model path (per-turn orchestrator rebuild, integration catalogue, memory recall) is why turns defer at all. This raises the ceiling; it does not make turns faster.

Related

Relates to #5399. Pairs with tinyhumansai/backend#1274. Follow-up to #5489.

Summary by CodeRabbit

  • Improvements
    • Extended the background voice interaction timeout to support deferred processing for up to three minutes.
    • Updated documentation to clarify the longer processing window and backend coordination.

90s was aborting real answers. On staging the same "summarize my emails"
request finished in ~53s on one call and was still running past 90s on the
next, where it hit the ceiling and the caller got "Sorry — I couldn't finish
that request just now" instead of their summary. Nothing was wrong on that
call; a big inbox is simply more Composio round-trips than a small one.

This ceiling does not govern how long the caller waits - the ack deadline caps
that at ~8s and hands off to chat. It governs the deferred half that finishes
in the background and is read aloud if the call is still up, so a higher value
costs a slow turn nothing and buys it the chance to land at all.

Requires the paired relay change (tinyhumansai/backend#1274): the relay's own
timeout must stay above this one, or it cuts a still-streaming turn first and
reports a relay failure for a turn that was working.
@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 4b2fef0f-0c75-48ce-baf5-a96745857279

📥 Commits

Reviewing files that changed from the base of the PR and between d56ea6d and f203ac4.

📒 Files selected for processing (1)
  • src/openhuman/voice/realtime_harness.rs

📝 Walkthrough

Walkthrough

The background voice-turn timeout increases from 90 to 180 seconds. Documentation describes the deferred execution window and coordination with the backend relay timeout.

Changes

Voice Turn Timeout

Layer / File(s) Summary
Extend background turn timeout
src/openhuman/voice/realtime_harness.rs
The background turn ceiling is documented. TURN_TIMEOUT_SECS increases from 90 to 180 seconds.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Mergeability Score: 🔵 Low · up to f203a

The longer background timeout should allow slow voice requests to complete, but merge readiness depends on deploying the relay timeout above 180 seconds and accepting the bounded risk of longer resource occupancy and queueing during sustained load.

Suggested reviewers: al629176

Poem

A rabbit sees the timer grow,
From ninety beats to one-eighty flow.
Deferred turns now have more room,
Relay clocks keep pace and bloom.
Hop, hop—the voice stays in tune!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: increasing the voice background turn timeout from 90 seconds to 180 seconds.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@YellowSnnowmann
YellowSnnowmann marked this pull request as ready for review August 13, 2026 16:14
@YellowSnnowmann
YellowSnnowmann requested a review from a team August 13, 2026 16:14
@senamakel
senamakel merged commit d498307 into tinyhumansai:main Aug 13, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants