Skip to content

fix(android): speak unsolicited Gateway completions in Standard Voice - #602

Open
Codename-11 wants to merge 2 commits into
devfrom
fix/545-standard-voice-completions
Open

Codename-11 wants to merge 2 commits into
devfrom
fix/545-standard-voice-completions

Conversation

@Codename-11

@Codename-11 Codename-11 commented Sep 15, 2026

Copy link
Copy Markdown
Owner

Summary

Standard Voice now speaks successful unsolicited Gateway answers in its active conversation after the original voice turn settles. The original run observer stopped at completion, while later inbound turns reached Chat without a voice-output handoff. Related to #545.

Changes

  • Capture a single-use speech receipt when Chat admits a live inbound turn, fenced by voice generation and conversation ownership. Stop, exit, engine changes, and conversation changes invalidate it.
  • Settle any pending original-run observer before admitting the next assistant bubble. Queue completed answers behind capture or earlier audio, then use the existing configured voice renderer and microphone release barrier.
  • Cover process/watch/delegation answers, duplicate frames, tool interims, failed/foreign turns, history replay, engine/session changes, and lifecycle delivery. Add the regressions to required Android checks and both-flavor focused checks. Refresh stale profile-label assertions to match the existing exact-name display contract, and wait for actual catalog/approval callbacks in two existing asynchronous tests.
  • Update the changelog, specification, and Gateway contract documentation.

Verification

  • scripts/android-lane.ps1 gradle :app:testSideloadDebugUnitTest --tests '*VoiceInboundCompletionTest' --tests '*ChatViewModelGatewayInboundTurnTest' --tests '*VoiceViewModelBargeInTest' --tests '*VoiceViewModelRealtimeSessionFenceTest' --tests '*VoiceTurnSessionFenceTest' :app:compileSideloadDebugAndroidTestKotlin --console=plain passed (183 tests).
  • Final VoiceInboundCompletionTest rerun passed all 13 cases after adding fresh-session adoption, pending-synthesis cancellation, and engine-switch-back coverage. Both corrected catalog/recovery tests also passed locally.
  • API 36 standardPhoneApi36SideloadDebugAndroidTest, selecting GatewayExternalFixtureInstrumentedTest#unsolicitedVoiceCompletions_surviveActivityPauseWithoutHistorySpeech, passed: 1 test, 0 skipped. Synthetic Standard audio produced exactly three synthesis requests across Activity pause/resume.
  • python -W error::ResourceWarning -m unittest discover -s test-fixtures/vanilla-gateway/tests -v: 32 passed. Gateway script tests and Android prepush helper tests passed.
  • check-gateway-scenario-conformance.py passed for unsolicited_voice_completions.json and subagent_child_preview.json against clean upstream 1a990f30628c25fb83d29c4d3b3d18dcb085406e.
  • Android source capability, collection API, release-note, and version-track checks passed. git diff --check passed.
  • Current-head required checks passed, including every Android lint, build, and test job. Focused checks for both sideload and Google Play also passed on 2d202bdeacfbbfbaced837459b59599d83dae1ff. Physical-device/provider audio was not tested. The final follow-up changes JVM test synchronization only; emulator-tested production sources are unchanged.

Screenshots

No visual change

Compatibility / risk

Uses the existing upstream Gateway events and configured Voice Output. No Relay plugin requirement, new protocol, routing change, permission, dependency, or migration. Realtime Agent keeps its existing behavior.

Only successful live admitted answers create speech. History and terminal-gap recovery stay silent; they cannot prove a fresh complete answer for narration. Active microphone capture finishes before queued speech starts. Emulator evidence covers dispatch and lifecycle with silent WAVs, not physical microphone/audio hardware or a live TTS provider.

Server/plugin, Desktop, and translation changes are N/A. Documentation changes are prose only; no site routes or build configuration changed.

Lineage / contributor credit

  • Source PR(s): N/A
  • Attribution preserved by: N/A

Checklist

  • Target branch is dev, unless this is a devmain release PR or a focused production-tag hotfix PR to main
  • Scope is focused and related issues/PRs are linked
  • Android changes: lint and focused tests ran, or rationale is listed above
  • Translation changes: locale validation/review ran, or N/A is listed above
  • Server/plugin changes: focused tests ran, or N/A/rationale is listed above
  • Desktop changes: build/tests ran, or N/A/rationale is listed above
  • Docs/site changes: build or link/route checks ran, or N/A/rationale is listed above
  • UI changes were tested on a relevant device/emulator/desktop surface, or the missing proof is stated above
  • Commit messages follow Conventional Commits
  • CHANGELOG.md is updated for user-visible changes, or N/A is listed above
  • Public writing hygiene checked: no secrets, private infrastructure, personal names, or AI/process narration
  • Salvaged/replacement work links source PRs and preserves contributor authorship, or N/A is listed above

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.

1 participant