Repository navigation
fix(app): complete pendant tutorial questions from request outcomes - #23466
Conversation
Failure-Class: new
|
Verdict: the production change here is correct and nicely scoped — replacing chat-list watching with a typed per-request result is the right architecture for this bug, and I found no blocking issues. Verified on 97e8215:
Blast radius: pendant tutorial question step only; other chat send paths gain return values without behavior change. No new requests or cost. USER IMPACT: the pendant onboarding "ask a question" step no longer gets stuck forever when another chat is open or the request fails — it now always ends with either the answer or a retry prompt. Still want, for when this leaves draft: (1) confirm the pre-existing Limitless timing failure you hit in the wider run is tracked separately so it can't mask regressions here; (2) one real-device pass over the BLE paths (codec timeout, failure haptic) since tests use synthetic streams. Given it reshapes onboarding completion UX, leaving the final call for a human maintainer once it's ready. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
… waiting The total voice-reply deadline awaited StreamIterator.cancel, which waits for the async-generator HTTP chain to reach its next chunk, so a stalled body kept the tutorial question pending past its timeout. The deadline now aborts the in-flight request through the existing abortable multipart trigger, settles immediately, and reads nothing the request produces afterwards. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Pushed The total voice-reply deadline awaited Tests:
No simulator or hardware run for this change. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
The pendant tutorial can remain on Processing with spoken replies enabled after #23466: native playback setup was awaited before starting the voice-stream deadline, and failed replies awaited native audio cleanup before releasing the voice busy guard. Bound spoken-output admission with the existing voice-reply budget and revoke late admission after failure. Finish failed questions independently of best-effort, request-scoped cleanup, using a unique playback identity. Cleanup follows the admitted playback lifecycle: a skipped mode-off, missing-headphone or revoked-admission attempt owns no new playback and must leave existing cleanup intact. An actually admitted replacement retires old cleanup after asynchronous boundaries. Refs #23385 and merged #23466. This builds on the merged outcome pipeline rather than reapplying #23391. Preserve recordings, WAL custody, settings, firmware and backend contracts. No backend deployment is needed. Keep the customer incident open until a mobile release contains the complete fix and the reporter confirms question → answer → Continue and retry. ## Review correction The initial head `385422f01a` incorrectly guarded cleanup with `_beginAttemptSeq`, which advances even when playback is skipped. The three review regressions pass on baseline and fail on that head. The revisions through `d87ea9ea8ee1467160fa3493f91115a64d7725d1` use the existing `_lifecycleToken` as cleanup ownership in both `interrupt` and an admitted begin that is clearing prior audio. Six committed regressions cover all three skips at each cleanup entry point. The existing admitted-replacement regression is preserved unchanged. Earlier green CI/no-blocker notes for `385422f01a` do not certify this revision. ## Verification - Reproduced all three review cases against baseline and the initial PR head: baseline 3/3 pass, initial head 0/3 pass. After the interruption correction, all six baseline/current comparisons pass alongside the committed service suite (27 tests total). The sibling admitted-begin cleanup cases also fail on `0cedebcf1b` before that path is corrected and now pass in the final focused suite. - Revised head `d87ea9ea8ee1467160fa3493f91115a64d7725d1`: 105 targeted provider, tutorial/widget and voice-playback tests pass. The production service, capture → external-actions → MessageProvider → tutorial owners execute with synthetic native/audio/provider I/O. No physical pendant or live-provider acceptance claim. - Final head `d87ea9ea8ee1467160fa3493f91115a64d7725d1`: analyzer ratchet and bounded pre-push passed, including 27 selected manifest/preflight checks. The local 90-day historical guard explicitly skipped in the shallow clone; full-history CI must enforce it. The affected tutorial integration flow was rerun successfully on the dedicated iPhone 16 Pro/iOS26.5 simulator via attach/hot restart and driver. Reused native debug host with current Dart and synthetic native/audio/provider I/O; no fresh native binary, physical BLE or live-provider claim. Current-head CI and maintainer re-review remain required; keep draft. - Previous head's remote CI passed 7,420 Flutter tests/four skipped and Hygiene/full-history guard. Those results remain historical and must not be reported as current-head CI. - At the implementation-time release check on 2026-10-25, original #23466 was in iOS 1.0.576 (1474), submitted for Apple review. This follow-up is absent from that binary; merging and a later signed mobile release remain separate from code verification. ## Product invariants affected - INV-CAP-1: only pendant question response/playback completion changes; BLE ingress, WAL custody, saved recordings and transcription settings are preserved. Failure-Class: new Line-Count-Exception: app/lib/providers/message_provider.dart | 1203 -> 1208 | keeps request-local playback authorization, unique ownership and best-effort cleanup beside the existing voice-stream result/finally guard without another global owner or capture pipeline. UI-Evidence: none -- layout is unchanged; the existing tutorial UI is exercised through the production-owner simulator fixture documented in app/docs/pendant-tutorial-question.md.
Problem and behavior
The pendant tutorial's question step can wait forever even when the voice endpoint answered: it watches the main chat list, but pendant replies correctly stay out of an open past/persona/fresh chat. Unrelated AI messages can instead complete the step. Busy/quota, codec, file-save, transport, timeout and incomplete responses also lack a terminal tutorial outcome. No-speech handling can additionally wait indefinitely for a Bluetooth failure vibration.
Return this request's typed answer/failure through the existing MessageProvider → production external-actions adapter → capture → tutorial pipeline. The question/answer displays independently of chat selection, failures return to a localized press/retry prompt, and raw ignored/overlapping presses cannot invent a Listening session. Step/attempt guards reject results after exit/restart. The voice response stream has a total deadline so heartbeats cannot strand it. Best-effort failure vibration cannot block completion or retry.
Refs #23385. Keep the customer incident open for validation on the released app. Related diagnostic-only report: #23384; a shared customer does not establish a shared cause. Earlier tutorial fixes #20806, #21069 and #20805 are already on main; they do not cover these gaps. Their store release has not been independently verified here.
Review follow-up (2026-10-24)
_voiceReplyWithDeadlineawaitedStreamIterator.cancelin itsfinally. The production stream is an async-generator chain over the HTTP body, so with a stalled body the cancel waited for the next chunk, and the tutorial question stayed busy past its timeout. The deadline now completes an abort thatsendVoiceMessageStreamServerpasses intomakeMultipartStreamingApiCall's existing abortable-request trigger. It settles immediately without awaiting the cancel and reads nothing the request produces afterwards.message_provider_voice_deadline_test.dart, using the realMessageProvider,sendVoiceMessageStreamServerandmakeMultipartStreamingApiCallwith a synthetic transport: a stalled body settles within the bound, the request's abort trigger fires, and late output is not shown (fails with the awaited cancel restored). Stalled headers also settle, and the next question is admitted rather than dropped as busy.c5849dbc52: the new deadline tests, the existing MessageProvider voice tests and the tutorial question flow pass (27 tests); analyzer ratchet passed. No simulator or hardware run for this change; no live provider.Verification and risk
Current-head readiness checked 2026-10-25: required Mobile Release Eligibility and all applicable remote checks pass on
c5849dbc527e5a47177d50814dfdc6043f284254. The historical wider local run and its Limitless timing failure are retained below for transparency; it is not claimed as a full-suite pass.cd app && flutter test test/widgets/pendant_tutorial_question_flow_test.dart(main/past/persona/fresh chat; no speech; quota/busy; file/codec/network failure; incomplete/deadline; retry; unrelated traffic; stale response; auto-submit).97e8215a38).flutter run --flavor dev -d <iOS-simulator> -t integration_test/pendant_tutorial_capture.dartthen agent-flutter. The automated integration entrypoint isintegration_test/pendant_tutorial_question_test.dart.97e8215a38d1fe5124ef3e216410503fa6f1f0fe. The historical failure-class ratchet explicitly skipped for shallow history; full-history CI must enforce it. No check was bypassed.limitless_golden_test.dart:901); a focused rerun reproduced its missing late timer writes. Both test and production connector match pinned main exactly. The run was stopped at 4,628 passed / seven skipped / one failed after reproducing that failure; it is incomplete. This is disclosed, not waived or reported green. Exact-head remote CI subsequently passed, as recorded in the readiness update.Normal application outcome/state handling: no native BLE, firmware, recording custody, backend endpoint or authentication contract changes. Fixtures supply synthetic button/audio/codec and voice responses; they do not establish real radio delivery or Andrea's exact cause. A real pendant/customer retest on the released build remains incident follow-up. Keep existing recordings and settings; no reinstall/reset/recovery mutation is part of the fix.
Remaining rollout after verification: merge and signed mobile app release. No backend deployment required.
Failure-Class: new
Product invariants affected
UI-Evidence: none -- Existing layout retained. Dedicated iOS simulator functional verification and local before/answer/failure screenshots were inspected; synthetic fixture and reproducible entrypoint are documented above. No public screenshot attachment is claimed.
Maintainer readiness verification (2026-10-25)
c5849dbc527e5a47177d50814dfdc6043f284254; clean merge-tree against current main225d7cef7a2eafdbab1c4bd25f81f945454d6d12.cd app && /opt/homebrew/share/flutter/bin/flutter test --no-pub --concurrency 1 --reporter expanded test/providers/message_provider_voice_deadline_test.dart test/providers/message_provider_voice_test.dart test/widgets/pendant_tutorial_question_flow_test.dart test/providers/omi_button_actions_controller_test.dart test/widgets/device_onboarding_question_revisit_test.dart— 44 tests passed, including stalled headers/body, abort, ignored late output and admission of the next question. Synthetic transport, no live provider or physical BLE claim.