Repository navigation
fix(app,backend): stop pendant questions from vanishing silently and unify the answer voice - #19431
Merged
Merged
Conversation
Git-on-my-level
force-pushed
the
fix/pendant-ask-silent-drop-and-voice
branch
from
September 27, 2026 13:11
173383b to
7dc06ac
Compare
Git-on-my-level
force-pushed
the
fix/pendant-ask-silent-drop-and-voice
branch
from
September 27, 2026 18:13
7dc06ac to
a28c985
Compare
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.
What
single tap (1)followed byrelease (5)as one toggle-mode start instead of a complete legacy long-press interaction. A second single tap ends the question; legacylong press (3)followed byrelease (5)remains supported.error:SSE frame. Current clients render the localizedDidn't catch that — try againstate and play a short failure haptic when supported.Charonplus a neutral, natural-paced style for the mobile mapping and desktop fallback. Explicit desktop voice selections andTTS_PROVIDER=legacyare unchanged.The in-flight progressive-playback work owns
app/lib/services/voice_playback/omi_voice_playback_service.dart; this PR intentionally does not change its chunk sizing.Why and evidence
The causal failure is the client button state machine, not Transcribe Later, language selection, an Opus/PCM mix-up, or a Parakeet empty-result fallback:
1for a short tap and then emits5on the following release/debounce cycle. The shipping app started toggle recording on1, then its legacy release branch immediately ended it on5. The onboarding tutorial appeared to work because its step interceptor allowed state1through but consumed state5./v2/voice-messagesHTTP 200s: 17 empty-SSE responses (65.4%) completed in 0.2308–0.4016s with median request size 2,435 bytes, while 9 answer-producing responses took 1.85–13.46s with median request size 20,405 bytes. That tiny/fast cohort matches the immediate1 -> 5submit.expected_silenceoutcomes among 15,396voice_chat_sseattempts (58.46%). By selected provider/platform: Modulate Android 48/132, Modulate iOS 2,260/2,444, Parakeet Android 1,605/3,464, and Parakeet iOS 5,086/9,355. The provider label is selected before strict VAD; an expected-silence attempt returns before any provider call, so these counts do not show Parakeet returning empty.audio_fs320_*.binis intentionally decoded as Opus: only_pcm16_and_pcm8_names enter the raw-PCM branch. The frame size is carried separately in the filename. The suspected codec misclassification is therefore disproven.get_prerecorded_serviceselects one supported configured provider and the prerecorded path invokes it once, so there is no post-empty fallback. That code observation is true, but it is not causal here because the incident's strict-VAD silence exits before Parakeet is called. This PR does not introduce an unrelated provider/cost-policy change.Orchestrator conclusions
EXPECTED_SILENCE, and production evidence shows a large silence cohort. Wrong as a cause: codec misclassification, language resolution, and a first-provider empty result did not explain this incident; the failing clips were truncated by the client and stopped at strict VAD before provider transcription._voiceSendInFlightcould remain wedged across a hung stream/early playback exception, and the 15-second auto-end could turn the user's late stop tap into a new empty session.Compatibility and rollout
error: <json>SSE prefix already shipped for typed transcription failures. Current clients retain theerrorcode; older clients either use their existing generic error path or ignore an unrecognized terminal chunk, so the change is additive and does not alter successful frames.Verification
cd backend && BACKEND_UNIT_TEST_FILE_LIST="$PWD/../app/.local/backend-tests-pendant-ask.txt" bash test.sh— 94 passed (11 chat/quota router, 68 transcription-route, 15 TTS); 5 unrelated slow tests deselected by the repository marker.cd backend && pytest -q tests/unit/test_app_client_schema_inventory.py— 12 passed.cd app && flutter test test/providers/omi_button_actions_controller_test.dart test/providers/message_provider_voice_test.dart test/providers/message_provider_failed_reply_test.dart test/unit/voice_message_stream_error_test.dart test/services/voice_playback/omi_voice_playback_service_test.dart— 34 passed.cd app && flutter analyze lib/backend/http/api/messages.dart lib/backend/schema/message.dart lib/coordinators/provider_capture_external_actions.dart lib/providers/message_provider.dart lib/services/capture/capture_controller.dart lib/services/capture/capture_external_actions.dart test/providers/omi_button_actions_controller_test.dart test/providers/message_provider_voice_test.dart test/unit/voice_message_stream_error_test.dart— no issues.cd app && python3 scripts/l10n.py check— 49 locales, 3,428 keys; OK.python3 scripts/check_event_registry.py— 136 registered events; generated output current.git diff --check— passed.Product invariants affected
None.
Line-Count-Exception: backend/routers/chat.py | 2242 -> 2250 | Emits the typed expected-silence terminal frame at the route's existing transcription-attempt boundary.
Failure-Class: FC-accepted-session-completes-silently-without-payload
🤖 Generated with Claude Code