Skip to content

fix(app): recover stalled Android Custom Live Pendant audio - #25975

Merged
Git-on-my-level merged 3 commits into
mainfrom
lane/custom-live-android
Nov 21, 2026
Merged

Git-on-my-level merged 3 commits into
mainfrom
lane/custom-live-android

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Nov 21, 2026 •

Copy link
Copy Markdown
Member

Summary

Supersedes #23643 for Android Custom Live realtime capture. SCA-3592 owns design, acceptance and release follow-through.

  • On all supported Custom Live platforms, send Omi controls to the secondary and binary audio to Custom Live. Send an Omi evidence record together with its binary frame only when the user enables secondary raw audio.
  • Watch decoded Limitless audio for the admitted Android Custom Live capture and BLE epoch. Retry firmware stream enable once per episode, under live ownership checks. Require a full window of progressing decoded audio before rearming. Close the watch when that owner retires, the link drops or flash drain takes over.
  • Preserve fix(app): keep pendant recording identity across short reconnects #25534's recording identity across short reconnects and the existing WAL/reclaim paths, including fix(pendant): stop status polls writing the SD card on 3.0.24, and read the ring in bounded, credited ranges #25415's range and proof behavior. The original PR also proposed automatic flash offload, persistent Transcribe Later preference switching and GATT replacement. Those behaviors are outside this successor's approved recovery path.

Verification and release

  • Three regression assertions failed on pinned main 460379212835226dfbc3baa7b37b16b373f2bf55 before the socket fix. All 86 focused tests passed on Flutter 3.44.5. The suites exercise the raw-audio consent pair, decoded-frame stall retry and link loss, sustained frame progress, pending-write ownership, reconnect telemetry and the protected capture paths.
  • The provider republishes normalized metadata after capture starts. A new replay failed on the draft when that update retired the watchdog. The fix retains the same admitted recording and BLE link across that refresh and fences changes in account or pause.
  • The retained-capture reconnect regression failed on the second-round head. The connector now closes the old epoch immediately and re-arms after setup only if that same capture still owns the new link. The replay proves one retry on each link without a second capture start.
  • Release QA needs a paired Android+Limitless run verifying normal quiet behavior, a known utterance around an injected midstream stall, decoded-audio resumption, and a transcript on the Custom Live endpoint. The local device lab had no Android handset attached.
  • Production readback uses Recording Observation by app version/build. Count one detection-eligible and one detection-enabled/disabled observation per recording, and report restored, exhausted and censored outcomes. Report exhausted episodes per 1,000 detection-enabled recordings alongside enabled/eligible coverage. Older builds lack the Custom Live session dimension, so SCA-3592 records the historical baseline as unavailable. Use the first complete qualifying 24 UTC hours on the first instrumented build for the production baseline.
  • Default on. Release can disable the firmware watchdog using the cached PostHog boolean android-custom-live-audio-recovery-kill. Full rollback is a rebuild with --dart-define=OMI_CUSTOM_LIVE_CAPTURE_FIX=false or a revert. No backend write, new endpoint, or audio retention change.

Product invariants affected

  • INV-CAP-1. The Android Limitless retry adds no uplink pause or subscription removal and makes no claim about audio from before restoration. The tiered-capture and resume/sync-fence guard suites were exercised.

Failure-Class: new
UI-Evidence: none
Line-Count-Exception: app/lib/services/capture/capture_controller.dart | 5095 -> 5175 | Bind watchdog admission and telemetry to the admitted recording, account and BLE connection.
Line-Count-Exception: app/lib/services/devices/connectors/limitless_connection.dart | 2237 -> 2294 | Connect realtime health to BLE setup, decoded audio and generation teardown.

Review provenance

  • R1 review-20261121t180552-ffc0 reviewed f091e051a8f8e9809f1fb8aa4339b4ce81b130c5. Two reviewers returned SHIP. The third timed out. The controller-level coverage finding was accepted and tested on the next head.
  • R2 review-20261121t183640-a410 reviewed 7ea054a3f366f9f50545f166c5d8164f7a32e780. The retained-capture reconnect finding was a blocker. The other answered reviewer raised three nonblocking findings. The third timed out. All four findings were triaged.
  • Pipeline accepted the verified reconnect correction at 1899388f6ea4f10e93542c194391de3963694cfd under the two-round rule. The disposition and regression evidence are on SCA-3592. Regular binary consent routing passed a supplemental local replay. Maintained coverage and unchanged-settings refresh behavior are tracked in SCA-3617 and SCA-3616.

@Git-on-my-level
Git-on-my-level marked this pull request as ready for review November 21, 2026 19:22
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-21T19:27:41.720077Z 1899388 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Git-on-my-level
Git-on-my-level merged commit 54f9fdd into main Nov 21, 2026
58 checks passed
@Git-on-my-level
Git-on-my-level deleted the lane/custom-live-android branch November 21, 2026 19:25

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1899388f6e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

if (!_isInitialized) return;

try {
stopCustomLiveAudioWatch();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Retain the watchdog binding across temporary flash drains

When flash audio is transferred during an admitted Android Custom Live recording, FlashPageWalSync._syncWal() calls enableBatchMode() and later enableRealTimeMode() without restarting capture. Calling stopCustomLiveAudioWatch() here clears both the current monitor and _startCustomLiveWatch, so disableBatchMode() can only arm the legacy startup monitor, which disarms after the first decoded frame. Subsequent midstream stalls therefore remain unrecovered for the rest of that capture, including after BLE reconnects. Close the current monitor while flash owns the link, but retain the ownership-checked binding so returning to realtime can reinstall it.

Useful? React with 👍 / 👎.

Git-on-my-level added a commit that referenced this pull request Nov 23, 2026
#26131)

## Summary

Follow-up to #25975 for SCA-3616. Refreshing transcription settings
keeps the Android Custom Live watchdog when the admitted recording and
STT configuration still match. The existing timer, one-retry budget, and
pending outcome survive the refresh. A changed configuration or retired
capture invalidates the old watch.

## Verification

- Both regressions failed before the fix. The public settings refresh
replaced the watch, and refreshing after the retry write immediately
reported `censored` while recovery was pending.
- On Flutter 3.44.5, all 50 focused tests passed across
`tiered_capture`, `resume_sync_fence`,
`transcription_settings_retention`, `limitless_golden`,
`limitless_realtime_health`, and `recording_lifecycle_telemetry`. The
pending retry reports `exhausted` once and issues a single BLE
reactivation write. The capture replay also verifies config and account
changes invalidate the old watch.
- Verification used a scripted BLE transport on the M1 host.
- `make preflight` passed all 27 selected checks.

## Product invariants affected

- INV-CAP-1. The admitted Limitless recording keeps its bounded recovery
watch through an unchanged settings refresh.

Failure-Class: FC-callback-replenishes-link-retry-budget
UI-Evidence: none
Line-Count-Exception: app/lib/services/capture/capture_controller.dart |
5014 -> 5018 | Keep explicit teardown for ineligible recovery while
allowing a valid watch to survive settings refresh.
Line-Count-Exception:
app/lib/services/devices/connectors/limitless_connection.dart | 2294 ->
2299 | Retain the ownership predicate with the reconnect binding so a
refresh reuses the admitted retry budget.


<!-- This is an auto-generated description by cubic. -->
<a
href="https://cubic.dev/pr/BasedHardware/omi/pull/26131?utm_source=github"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img
alt="View guided diff"
src="https://www.cubic.dev/buttons/review-in-cubic-light.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->
shubhxho added a commit to shubhxho/omi that referenced this pull request Nov 25, 2026
Integrate David Zhang's Custom Live capture fix (f091e05, merged in
BasedHardware#25975) and later main. Conflict in CompositeTranscriptionSocket.send
and its tests is resolved in favor of main's OMI_CUSTOM_LIVE_CAPTURE_FIX
gate so Custom Live flag behavior stays intact. The broader custom-STT
rule lands in a follow-up commit on top of that flag.
shubhxho added a commit to shubhxho/omi that referenced this pull request Nov 25, 2026
…ers (BasedHardware#24191)

Main's f091e05 (merged in BasedHardware#25975) already keeps Omi control text off the
Custom Live primary, behind OMI_CUSTOM_LIVE_CAPTURE_FIX. Every other custom
STT primary (polling, streaming, Gemini) is also audio-only, so the same
flag now covers them too. Disabling the flag still restores the old
send-text-to-primary path for Custom Live and those providers together.
No second switch is added.

Custom Live evidence pairing and flag-off behavior from main are unchanged.
Git-on-my-level added a commit that referenced this pull request Nov 25, 2026
…tings (#26324)

## What changed and why

Add direct `CompositeTranscriptionSocket.send(List<int>)` regression
coverage alongside the Custom Live evidence-frame tests from #25975.
With either raw-audio consent setting, Custom Live receives the exact
payload once. Omi receives the same payload once with consent and
receives nothing after opt-out.

The mobile changelog fragment marks the test-only change as internal.

## Product invariants affected

none

## How it was verified

- `bash test.sh test/unit/composite_transcription_socket_test.dart
--reporter expanded` from `app/` passed all 32 composite socket tests
and 138 protected contract tests on Apple Silicon with Flutter 3.44.5.
- `make preflight` passed. The history-based failure-class check was
skipped in the shallow checkout.

## Tests

The existing composite socket suite runs separate direct-send cases for
opt-in and opt-out using the suite's fake sockets.

UI-Evidence: none -- test-only change


<!-- This is an auto-generated description by cubic. -->
<a
href="https://cubic.dev/pr/BasedHardware/omi/pull/26324?utm_source=github"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img
alt="View guided diff"
src="https://www.cubic.dev/buttons/review-in-cubic-light.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->
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