Repository navigation
fix(ios): preserve Apple speech runtime errors and enter safe recovery - #22549
Conversation
Refs #20484 Failure-Class: none
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. |
|
Auto-fix isn't included in your plan ↗ |
|
Verdict: the production change is correct and nicely scoped, and the two red checks are not from this diff — they are inherited from the merge base; the branch just needs a main update before merge. What I verified, file by file:
CI: "Dart Analyze & Tests" fails on an Performance: each legacy-path failure now triggers one additional 0.6s silent-clip readiness probe; failure-path only, bounded. Blast radius: the iOS on-device SFSpeech path only; no cloud/paid fallback, no settings or recording deletion. USER IMPACT: if Apple's on-device speech engine becomes unavailable mid-recording (assets, permissions, or Dictation changing), the app now pauses recognition, keeps your recorded audio, and shows the existing local-speech recovery state instead of silently retrying a broken engine; once speech works again it resumes automatically from the retained audio. Action items: (1) merge/rebase current main so CI reruns green; (2) complete the doc checklist's physical-device verification (missing assets mid-capture, CV1 pendant capture) per the rollout plan before closing the loop on #20484. This review was produced by an automated maintainer assistant acting on behalf of the Omi maintainers. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
|
Pushed eba3e9d: merged current main (8edd56d). No code changes.
|
kodjima33
left a comment
There was a problem hiding this comment.
Scoped iOS bug fix (258 lines) preserving Apple speech runtime errors for safe recovery, with native + Dart regression tests; 5/5 confidence, CI green.
Apple speech can pass its readiness probe and then fail on the real recording. The legacy callback currently strips the native error, so missing/unavailable assets can keep retrying as a generic recognition failure instead of entering local recovery.
Recheck the actual legacy recognizer after a runtime failure. If it is unavailable, use the existing local setup/retry state; if it is healthy, preserve the original error for normal retry. Keep native domain/code in diagnostics, preserve recognition timeouts, and retain the existing silence/partial-result behavior. No localized-message matching, automatic paid/cloud fallback, setting reset, or original-audio deletion.
Refs #20484. This addresses an app-side recovery gap; it does not establish that the reported cloud, voice-chat, and photo failures share that cause.
Validation
ruby app/ios/test/speech_deadline_test.rb— 3 native behavioral harnesses pass, including runtime readiness loss, analyzer fallback/rollback, original errors and silence. Removing the readiness recheck in an isolated negative control makes the regression fail.bash app/test.sh test/unit/local_stt_recovery_test.dart test/unit/pure_polling_test.dart test/unit/on_device_transcription_upgrade_test.dart test/unit/composite_transcription_socket_test.dart— all 138 protected spine checks and all 35 focused tests pass; pinned native cleanup exercises 600 error/exception paths. The runtime asset-failure case verifies exact retained PCM retry, actionable/gated recovery, native diagnostics, disposable WAV cleanup and original saved file preservation.make preflight— all 31 selected local checks pass. Normal committed-source pre-push gate also passes (metadata, native Swift checks and Dart format). Targeted Dart analysis is clean.bash scripts/validate_mobile_build_config.sh --flavor dev --profile local_devthenflutter build ios --simulator --debug --flavor dev --no-codesign --no-pub --dart-define=OMI_APP_PROFILE=local_dev -d <available-iPhone-simulator>fromapp/. Xcode 27.1;Runner.appproduced. Existing companion LLDB/SPM adoption warnings are non-fatal. GitHub CI remains queued; physical device validation remains outstanding.Release and customer verification
.github/agent-docs/on-device-speech.md.Product invariants affected
none
Failure-Class: none
The gap is point-in-time local speech readiness followed by loss of native failure semantics. Existing protocol-status and backend privacy-denial classes describe different boundaries. The shared coordinator and executable native/provider regressions own this fix.
UI-Evidence: none -- No UI source changed; existing local speech recovery states are reused.