Repository navigation
fix(firmware): persist CV1 pause/mute across Bluetooth disconnect - #14293
Git-on-my-level merged 20 commits into
Conversation
|
BLE UUID collision resolved vs #13704. Verified against BasedHardware/omi
#13704 keeps Pushed on this branch in Note: stale #10604 still claims |
e18aece to
3c9cfa9
Compare
|
Rebased onto latest BasedHardware/omi Only conflict was |
dd1e078 to
2466561
Compare
|
Reviewed across firmware, app, protocol docs, and the failure-class registry — this is a careful fix for a real privacy boundary bug (#5054), thank you. What I verified against main (all checks out):
Non-blocking observations:
Firmware What I could not verify: the firmware itself. CI does not compile it (Build check skipped for this PR) and there was no hardware run, as noted honestly in the PR description — my firmware review is static. Before merge/release this needs a firmware compile and an on-device check of the core scenario (pause, walk out of range, confirm no capture, reconnect shows paused, double-tap unmute offline). The Leaving for human maintainer review: firmware hardware validation and the BLE allocation coordination; everything app-side looks mergeable from my side. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
|
Thanks @apoorvdarshan — this is a well-constructed privacy fix. The invariant "an explicit pause survives disconnect, reboot, and reconnect; only an explicit unmute resumes" is implemented end-to-end, and the key claims check out statically. Firmware
App
Docs & agent guidance
Non-blocking notes
Adding by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
2466561 to
9378a8f
Compare
|
Rebased onto latest BasedHardware/omi Conflicts were |
|
Hygiene failed after rebase: the Dart line-count ratchet now covers |
69385b2 to
4248e79
Compare
Store mute in NVS and expose it over BLE so a disconnect cannot resume capture. The app writes the flag on pause/unpause and restores the paused UI from device state on reconnect. Offline double-tap toggles mute when no phone is connected. Fixes BasedHardware#5054 Failure-Class: new Co-authored-by: Apoorv Darshan <[email protected]>
The agent-doc-references check treats a backticked omi/muted token as a repo path. Describe the NVS settings key without that prefix. Co-authored-by: Apoorv Darshan <[email protected]>
Match the firmware agent-doc wording so omi/muted is not treated as a repo path. Co-authored-by: Apoorv Darshan <[email protected]>
BasedHardware#13704 already owns settings UUID 19B10014 and feature bit 9 for device name. Move mute to the next free characteristic and bit so both PRs can merge. Failure-Class: none Co-authored-by: Apoorv Darshan <[email protected]>
Empty commit so the code-lane Hygiene job re-reads the PR body that now declares capture_controller.dart 2861 -> 2919. Co-authored-by: Apoorv Darshan <[email protected]>
4248e79 to
238fcca
Compare
664fb9c to
37d5888
Compare
…te-7fe8 # Conflicts: # app/lib/services/capture/capture_controller.dart
Keep device mute reader/writer alongside upstream capture evidence state. Validation: 138 shared Flutter contract tests and 104 capture/mute tests passed. Device signing and pendant hardware validation remain unavailable.
Retain persistent mute changes alongside upstream 20bb9c9; integration merged without conflicts. Prior capture/mute regression tests passed; full checks run after this merge.
Upstream BasedHardware#19730 removed bottom_nav_bar.dart. Point readers to the current Home owner and identify the old tab plan as historical. Validation: agent documentation references checked by final preflight.
Restore the unchanged upstream section heading after conflict-marker removal. This only changes a comment and whitespace; capture behavior is unchanged.
|
Re-checked on the rebased head ( What I re-verified on this head:
One new thing on this head the earlier reviews didn't cover — unrelated files rode in with the rebase:
Neither blocks. The non-blocking notes from before still stand: Still leaving for human maintainer review: on-device firmware validation (CI doesn't compile the firmware) of the core pause → disconnect → stay-paused → reconnect → double-tap-unmute scenario, and coordinating the by AI on behalf of David |
Integrate fedf258; retain feature behavior, use current upstream documentation, reconcile localization keys and regenerate conflicted API clients where applicable. Verification: focused Flutter feature regression tests passed; firmware name and button host tests passed; retranscription and schema inventory backend tests passed. Full local preflight follows on the completed merge. Failure-Class: none Upstream integration preserves inherited sources without reformatting them; merge commit uses a per-command hook override to avoid formatting unrelated inherited files. All local preflight and bounded push checks remain enabled.
|
Thanks @apoorvdarshan — reviewed the full diff across firmware and app. The direction here is right, and this is a genuinely valuable fix: making the pendant the source of truth for pause/mute (issue #5054) is the correct privacy posture for an always-listening wearable, and the implementation is consistent about it —
One repo-hygiene note: No split requested — this is one cohesive fix. Leaving for human maintainer review: privacy-boundary firmware behavior with no compile or hardware validation yet, plus the cross-PR characteristic allocation, need maintainer sign-off before merge. by AI on behalf of David |
…anges Merge pinned main while preserving capture ownership and transport fences. Reject failed NVS writes at ATT, verify device readback before local policy, and restore winning mute intent on policy supersession. Add production firmware failure regressions and Flutter capture coverage. Failure-Class: new
Resolve pendant mute before the staged session opens transport, keeping the committed phase and subsequent controls aligned with the confirmed device state. Cover both mismatch directions, both control APIs and live/batch phase transitions. Failure-Class: new
…changes Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01L6nc4Dq4LXiSGCnJBvD7ix
|
Since my last review: addressed (firmware no longer ACKs a failed persist - capture_mute_gatt.h returns ATT 'Unlikely Error' when the NVS write fails, and the host test now proves a failed unmute cannot open capture; app no longer swallows write failures - setCaptureMuted distinguishes unsupported firmware from a lost connection, verifies readback, and pauseDeviceRecording refuses to confirm without a device ACK) · still open (no full firmware build on this head - fork Actions disabled; on-device pause->disconnect->reconnect->unmute and OTA/reboot acceptance still pending; #10604 characteristic collision still needs reconciliation) · newly introduced (firmware-capture-mute-durability CI check in .github/checks-manifest.yaml; failure-class registry JSON shipped inside this fix PR). Verdict: both privacy blockers from my last review are properly fixed - what remains before merge is build/hardware validation and protocol reconciliation, which sit with maintainers, not with this diff. Verified on this head:
USER IMPACT: once this ships, a paused Omi pendant stays paused through Bluetooth drops and reboots and will not start recording again until you explicitly unpause it. Still wanted before merge: (1) maintainer reconciliation of the 19b10014/19b10015 + bit 9/10 allocations with #10604 (and #13704) before either merges; (2) one full firmware build plus an on-device pause->disconnect->reconnect->unmute smoke test; (3) confirm whether the new failure-class JSON may ship inside this PR or needs its own registry change (main history uses dedicated 'chore(failure-class)' define commits); (4) nit: button.c ignores a failed capture_mute_set on offline double-tap - a haptic/LED failure cue would help there. Note for maintainers: the omi/firmware/AGENTS.md addition is agent-facing standing guidance. It matches this diff and encodes a safe invariant, but it states the bit-9 device-name allocation (from #13704) as fact while that PR is unmerged and #10604 contests it - worth eyeballing as part of the allocation decision. Leaving for human maintainer review: the BLE allocation collision with #10604 and firmware build/hardware validation need maintainer sign-off before merge. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
|
Verdict: the production change is correct, cohesive, and unusually well-tested; formal sign-off stays with a human maintainer because the BLE protocol allocation documented here conflicts with draft #10604 and needs a ruling — not because of code quality. Verified on head 9dcfa2a:
Security/privacy: mute is a privacy boundary and this PR strengthens it (no TX, no offline storage while muted; persists across disconnect and reboot). Note the mute characteristic requires no bonding/auth, same as the existing dim-ratio and mic-gain characteristics — a previously-paired proximity attacker could unmute remotely. That is the pre-existing settings-service posture, but since mute is privacy-bearing it deserves a conscious maintainer call. Agent guidance: omi/firmware/AGENTS.md adds a short section documenting the mute contract (NVS key, 19b10015, bit 10) for coding agents. I checked it against the implementation and it is accurate, including the bit-9/#13704 adjacency note. USER IMPACT: pausing or muting the pendant now survives Bluetooth disconnects and reboots — the device stays muted (no recording, no storage) until you explicitly unmute, and after reconnect the app shows the device's real state. Still wanted:
Leaving for human maintainer review: BLE protocol allocation reconciliation between this PR, #13704, and #10604. AI-generated maintainer feedback 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 |
<!-- claude-projects-attribution: {"github_login":"Git-on-my-level"} -->
_Requested by **David**_
## Status 2026-11-08: verified, ready for release review
All the pre-release gates listed further down have passed. The one left
is David's go. After that, the rollout coordinator handles a staged OTA.
- **Field path proven:** 3.0.21 to 3.0.23 over BLE OTA, on the jig
running the factory 3.0.8 bootloader (the bootloader shipped units
have). Slot1 went to pending+permanent, and after reset slot0 ran the
new image, active and confirmed, with DIS reporting 3.0.23. An earlier
install from an RC start image also passed.
- **Safe mode:** the bench check and all four fault proofs (hard fault,
driver hang, settings hang, watchdog starvation) passed on 6a09d7c. Same
code hash as this head.
- **Host and CI:** firmware host suites, the OTA slot geometry check and
preflight pass. All required CI checks are green. The two red `Analyze`
jobs are CodeQL failing at the SARIF upload step with no alerts. They
aren't required checks and GitHub won't rerun them.
- **Why there is no separate 3.0.22:** safe mode was going to ship alone
as 3.0.22. Its OTA was never proven, because the jig's stock MCUboot
lacks the Omi SD init and erased slot1. Once the jig had the factory
bootloader, the full candidate was proven instead, so safe mode ships
inside 3.0.23.
- **Known telemetry gap:** the boot record decides the update outcome
from the DIS string plus the MCUboot header version, which is 0.0.0 on
every image. So a field unit's first 3.0.23 boot reports UNKNOWN, and a
same-version reinstall reports NOT_INSTALLED. The app's post-reset hash
check stays the authority. A follow-up will switch to image-hash
identity.
- **Still not measured on hardware:** current draw, charger behavior,
and storage after power loss.
Evidence:
`data/run-2026-11-07-cv1-rc/factory-bootloader-install-proof.md` in the
workspace repo. Bench tooling: #24813.
## Update 2026-11-07: safe-mode SD fix, boot telemetry, pinned flash
layout
Four commits on top of the 11-04 head:
- `7a7a6aaa9dd` Safe mode now brings up the SD card before anything
reads the NOR on the shared SPI3 bus. Without that, an uninitialized SD
card drives MISO and corrupts NOR reads. Also adds the persisted boot
record, the saved update outcome, and storage health counters (NOR
read-check failures, SD init failures). These are telemetry items 4-6.
Recovery characteristic `19B10042` moves to v2 (96 bytes, same 16-byte
prefix, version byte 2). `19B10041` is unchanged.
- `481bab7ead1` Docs: `docs/verification/2026-11-07-boot-telemetry.md`,
GATT map.
- `44180c0060a` Hang guard: if SD init hangs and the watchdog fires,
later SAFE boots skip SD init and count a failure instead of looping.
- `6a09d7cbbe5` Pins the app, littlefs, settings and EMPTY_0 partitions
in `boards/omi/pm_static.yml` to the fielded 3.0.21 map. The partition
manager orders the "before: end" partitions in a Python set, so without
the pin the layout depended on the hash seed.
`tests/check_ota_slot_geometry.py` now asserts the pinned map.
Bench evidence on the jig (6a09d7c): the bench check passed, and so did
all four fault proofs (hard fault, driver hang, settings hang, watchdog
starvation). ALL OK at 2026-11-06T22:18:12Z. The jig was restored to
3.0.21 afterwards.
Since proven (see Status above): the jig now runs the factory 3.0.8
bootloader, and a real 3.0.21 to 3.0.23 BLE install passed.
## 3.0.23: merged with safe mode (update 2026-11-04)
This head merges `origin/main` into the backlog candidate. Main now
carries CV1 safe mode (#24505) and its interrupted-update retry fix
(#24514). The version is bumped to **3.0.23**. The original plan was to
ship safe mode alone first, as 3.0.22. That was dropped, and safe mode
ships inside 3.0.23 (see Status above).
- `safe_mode.c`, the retained record layout, the app overlay and the
development-only fault guard match main exactly.
- The replacement SD host joins deferred initialization. The backlog
shutdown worker starts only in normal mode, so SAFE still skips all
application startup.
- **Diagnostics:** the service is registered once, after storage.
`19B10041` keeps the 25-byte telemetry the shipped app parses. Safe
mode's 16-byte recovery state moves to `19B10042`. SAFE exposes only
`42` and Zephyr's static recovery services. `gatt-map.md` matches the
code.
- The merge had seven conflicts: gatt-map, CMakeLists, Kconfig,
diagnostics.h, transport.c, main.c and settings.c. Both sides' behavior
is kept.
- Verified: the host firmware suite and backlog regressions pass, and
preflight passes all 37 checks. Native simulation was skipped because no
Docker daemon was available on the build host.
- **Before any release** (all done except David's go, 2026-11-08):
- An independent review of the merge.
- A build-only CI image of this exact head.
- A normal-mode jig cycle.
- All four safe-mode fault proofs, rerun on this image.
- An app DFU to the jig in SAFE.
- David's go.
## What changed and why
Release candidate for the next CV1 firmware. It combines separately
written PRs so they can be tested together, and fixes what only showed
up once they were combined.
| PR | Author | What it brings |
|---|---|---|
| #24381 (#24137, #19469) | @rgr4y, David | Compiler warning cleanup,
Opus size check, BLE device diagnostics |
| #20450 | David | Ring custody: audio is kept when connected but not
subscribed, and reclaimed only after the phone confirms it |
| #14293 | @apoorvdarshan | Mute survives disconnect and reboot |
| #22659 | @esixce | SD CMD12 reply fix |
| #19719 | David | Per-unit serial number over DIS |
| #13342 | @gianluca-disanto | Audio chunks bounded to ATT MTU |
| #20483 (battery part only) | David | Battery percent doesn't jump on
the charger, and reads correctly after unplugging |
| #23735 (adapted) | @ducanh3005 | BLE power control: resume, pause
capture, power off |
| #23743 (firmware part) | @ducanh3005 | A user-set device name that
persists and advertises |
Also adds `omi/firmware/docs/gatt-map.md`, which assigns each
characteristic UUID to one owner so open PRs stop colliding.
David chose #20450 as the retention fix, accepting that going back to
older firmware loses unsynced audio on the pendant. Release and OTA
publication still need David's go.
**Fixes made on top of the merges:**
- Queued audio could still reach the phone after a mute. A mute now
stops it before sending.
- An unreadable stored mute setting fell back to unmuted, which could
resume capture after a reboot. It now stays muted until an explicit
unmute rewrites the setting. The tradeoff is that a corrupted setting
pauses capture rather than risking recording a user who paused. The app
reads this state back.
- Failed batch media syncs now count as storage errors in diagnostics.
- `check_cv1_mtu.py` passed on its fallback simulation when its compile
failed. A compile failure now fails the check, and only a missing
compiler falls back.
- New `check_ota_slot_geometry.py` keeps OTA slots at the addresses in
every recorded baseline build. It fails on #13855's map.
**Changes from the original PRs:**
- #20483 keeps only the battery fix. Its new diagnostics characteristic
is out, because the existing 25-byte diagnostics packet already covers
this. Diagnostics now report the uncorrected ADC voltage, while critical
shutdown still uses the corrected one.
- #23735 moves from UUID `19B10014` to the allocated `19B10016`, and
from feature bit 9 to bit 11. Pause now uses the same persistent mute as
`19B10015`, so a disconnect or AAD wake can't clear it. Sampling may
continue while paused, with sending and storage both stopped, so this
pause doesn't promise a power saving. A write acknowledges that shutdown
was queued, not that it finished.
- #23743 keeps only the firmware. Its app changes don't apply on this
base, so no app can set a name yet. A name now loads only from a
complete NVS record, and Bluetooth RX can't change it during an
advertising update. A new name takes effect after disconnect, because
advertising is off while connected. The name also moves from the
advertising packet to the scan response, so a passive scanner won't see
it.
**Left out:** #13855, merged and then reverted here. It shrinks both OTA
slots from `0xf0000` to `0xe8000` and moves external network staging and
settings. MCUboot compiles its slot addresses in and OTA doesn't replace
it, while mcumgr uses the app's map. So from reading the design, an app
on that map would write later images and upgrade trailers where the
installed bootloader doesn't look, and OTAs would stop applying.
Settings would also move from `0xfc000`, losing bonds and mute on
update. This hasn't been reproduced on hardware. Generated baseline
builds already end the app at `0xf6000`, below littlefs and settings, so
#5400 needs a fix that keeps the slots where they are.
Also left out: #12102, because #20450 already keeps audio when the clock
is untrusted and its test doesn't link on this branch. Also #14156, held
because it keeps the mic on while connected and that battery cost hasn't
been measured, and #20838 (the retention alternative), #12943 and
#14240.
## Product invariants affected
- INV-CAP-1
This changes what happens to audio while connected but not subscribed,
which is the invariant's main case. Custody host harnesses pass, and the
RC ran on hardware through BLE install and safe-mode fault proofs.
## How it was verified
At `2810eaf`, this head, from a clean clone on the bench Mac, with no
device access:
- `quick-host` and `compile-only` against pinned NCS 2.9.0 pass.
- Host regressions and the OTA slot geometry check pass. The geometry
check also fails on #13855's map, as intended.
- The mute test passes, including new cases for an unreadable setting.
- Custody `make run` passes: `sd_card` and `storage` harnesses report 0
failures.
- The MTU check passes 15 of 15 on the production C seam.
An independent review covered how the merged PRs interact; its three
findings are fixed above. It was a static read and ran no tests.
At the merge of #20483, #23735 and #23743, on the bare CV1 board on the
jig: one app-only cycle passed. The exact image CI built at `07f3866`,
this head, also passed one (build-only run 41523746903, nothing
published). It flashed and verified this image, ran the 30-second boot
check, then restored and verified baseline 3.0.21. The generated slot
map matches the baseline. The same cycle also passed at `2810eaf`. It
proves the image boots and the board can be restored, and nothing about
BLE or audio. Host tests for all three additions pass, and their merge
compiles, links and signs for the real target.
**Not verified at that point (11-04):** anything on hardware beyond that
boot. BLE, GATT, OTA and safe-mode recovery have since been verified
(see Status above). Still open: the new power-off path, renaming,
charger behavior, storage after power loss, the v1 to v2 media upgrade,
and current draw. Going back to pre-#20450 firmware orphans unsynced
audio on the pendant.
## Tests
`omi/firmware/omi/tests/`: custody, `sd_card`, `storage`, capture mute,
OTA slot geometry and host regressions, plus
`omi/firmware/scripts/check_cv1_mtu.py`.
## Failure class
Carried from #14293, which brings these app changes:
Failure-Class: new
Failure-Class-ID: FC-device-mute-cleared-on-disconnect
Line-Count-Exception: app/lib/services/capture/capture_controller.dart |
4609 -> 4670 | Keep durable pendant mute confirmation in the existing
capture owner; unrelated ownership extraction is outside this privacy
fix.
Line-Count-Exception: app/lib/services/capture/capture_coordinator.dart
| 2964 -> 3017 | Confirm device mute before local policy and restore
winning hardware intent on supersession in the existing serialized
owner.
## UI evidence
UI-Evidence: none -- firmware only; the app changes come from #14293 and
aren't exercised in this PR's verification
🤖 Generated with [Claude Code](https://claude.com/claude-code)
…failed read (#26041) ## Problem Crashlytics issue faed8329 is the #2 iOS issue this week: 159 users in 7 days (52, 49 and 35 a day on Nov 20 to 22), on 1.0.592 to 1.0.596. Crashlytics counts it as **NON_FATAL**, but every event carries `error_origin = uncaught_async`, so it reaches the global uncaught handler instead of a handled pause failure. Source: Crashlytics BigQuery (`com_friend_app_with_wearable_ios12_IOS_REALTIME`), `runs/2026-11-22/analysis/voice.md`. Verified cause, from the stack traces (266 events, 7 days, one shape): ``` OmiDeviceConnection.setCaptureMuted omi_connection.dart:1364 CaptureController._writeDeviceMute capture_controller.dart:4831 (1.0.595) CaptureCoordinator._run capture_coordinator.dart:1613 CaptureCoordinator._pump.<fn> capture_coordinator.dart:1507 "Bad state: Unable to confirm device mute capabilities" ``` - `setCaptureMuted` (`omi_connection.dart:1364`) throws whenever the features read is shorter than 4 bytes. `NativeBleTransport.readCharacteristic` (`native_ble_transport.dart:315`) returns `[]` for a characteristic missing from the GATT table, for a 10 s timeout and for any platform error. So the app cannot tell old firmware (where the doc comment promises a no-op) from a failed read. - The coordinator catches the error, but `pauseCapture()`, `resumeCapture()` and `streamDeviceRecording()` rethrow it via `throwIfFailed()` with the original stack. Any caller that does not await and catch turns it into `uncaught_async`. `quick_actions_service.dart:206-208` is one such caller. - The Crashlytics log tail before each event is repeated "Omi Device Disconnected", so many events look like a write issued while a reconnect is settling, not only legacy firmware. Half the events are from a backgrounded app. ## Change No UI change. No change to the BLE protocol, UUIDs, firmware expectations, or connection and reconnect logic. - `omi_connection.dart` `setCaptureMuted`: if the native transport has a discovered GATT table and the features characteristic is not in it, return as the documented legacy no-op. Otherwise a short or failed features read waits 500 ms and retries once, then throws as before. "Not discovered yet" is never treated as legacy: that would report a pause the pendant never applied. - `native_ble_transport.dart`: read-only `servicesDiscovered` getter (no behavior change). - `quick_actions_service.dart`: the mute and unmute shortcuts catch a failure and report it with `reportNonFatal` and `capture_mute_source=quick_action`, `capture_mute_action=mute|unmute`. UI state after a failed write: the coordinator fails closed, so capture state stays as it was. The live page, Home card and device settings show "Something went wrong" (unchanged). The quick action has no screen, so a failed shortcut pause shows nothing to the user; its shortcut label follows the unchanged capture state. Not redesigned here. ## Impact estimate If the missing feature is a no-op and a failed read retries once, faed8329 non-fatal users go 159/week → near 0 (range 0 to ~80, MODELED). Churn effect unmeasured. - Base 159 users/7 d: **ACTUAL**, Crashlytics BigQuery, `runs/2026-11-22/raw/crashes.json`. - Share removed: **MODELED**. The legacy case goes to 0. The transient case goes to 0 when the retry succeeds. Which case dominates is unknown: these events carry no firmware or discovery key. A read that fails twice still throws and is still uncaught from callers outside this diff (below), hence the upper bound of about half. - Crashlytics type: NON_FATAL today, and it stays non-fatal. No app crash is involved. ## Evidence No visible change, so no screenshots. A simulator has no pendant. Unit tests with fake transports: | Case | main | this PR | |---|---|---| | Features characteristic absent after discovery (native transport) | throws | no-op, no read, no write | | Before discovery (native transport, empty table) | throws | throws (not taken as legacy) | | Features read fails once, then succeeds | throws | retries, writes the pause | | Features read fails twice | throws after 1 read | throws after 2 reads, no write | | Quick action mute/unmute fails | uncaught async error fails the test | reported non-fatal with source + action | The first, third, fourth and fifth tests fail on main (run with hook-free copies of the tests against main's `lib/`). ## BLE review needed This touches `app/lib/services/devices/**` (CODEOWNERS: @mdmohsin7). Recent authors of that folder (30 days): @Git-on-my-level (9), @apoorvdarshan (wrote the mute guard, f97e6bf), @deromka. Asking @apoorvdarshan and @Git-on-my-level to review, since the CODEOWNERS entry may be stale. ## Device tests needed (not run) - Omi CV1 on current firmware: pause and unmute from the app and from the iOS quick action, 5 times each. Check that the pendant mute characteristic follows each one. - An older-firmware pendant without the features characteristic: pause and unmute from the app and the quick action. Expect no error and a local-only pause. - Reconnect while paused on CV1: the pendant stays muted. ## At ship - No flags, no new events, no keep-list change. - Calibration read: faed8329 users per day on the first build with this change, against 35 to 52 a day now. ## Product invariants affected - INV-CAP-1 (pendant audio retention): kept. The change only decides whether a deliberate pause or unmute reaches the pendant. It never closes, unsubscribes or fences an uplink. A legacy pendant has no device mute, so the app's local pause stays the only gate, as before #14293. An unmute that fails twice still fails closed in the coordinator and the error stays visible. ## Tests - `flutter test test/unit/omi_capture_mute_ble_test.dart test/services/quick_actions_service_test.dart test/unit/capture_policy_test.dart test/providers/capture_provider_test.dart test/unit/native_ble_transport_resync_test.dart test/services/devices/transports/native_ble_transport_test.dart`: 167 passed. - `make preflight`: passed. UX contract, UI isolate and brand checks are clean on the changed files. ## Not verified - No real pendant was used. Every BLE claim above comes from code and tests. - Which empty-read case dominates in the field. - Callers outside this diff still rethrow a double failure without catching it. Examples: `DeviceProvider._onDeviceConnected` (`device_provider.dart:1129`, a `void async` that awaits `streamDeviceRecording` at 1190) and the Home post-frame callback (`pages/home/page.dart:523-529`). Catching there changes reconnect control flow, which this PR leaves alone. Those are follow-ups for the BLE owners. Failure-Class: FC-empty-ble-read-taken-as-capability Line-Count-Exception: app/lib/services/devices/connectors/omi_connection.dart | 1580 -> 1604 | the legacy check and one retry belong next to the mute write they guard; splitting the connector is out of scope for a crash fix UI-Evidence: none -- no visible change; quick_actions_service.dart only gains error handling (code and unit tests) <!-- This is an auto-generated description by cubic. --> <a href="https://cubic.dev/pr/BasedHardware/omi/pull/26041?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> <a href="https://www.cubic.dev/action/auto-fix/pr/BasedHardware/omi/26041?returnTo=https%3A%2F%2Fgithub.com%2FBasedHardware%2Fomi%2Fpull%2F26041&source=description" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"><img alt="Turn on auto-fix" src="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"></picture></a> <!-- End of auto-generated description by cubic. -->
Pausing a CV1 pendant now persists across Bluetooth disconnects and reboot. The pendant exposes its stored mute on
19B10015/ feature bit 10; reconnect restores that state in the app, and explicit unmute resumes capture. Device rename reserves19B10014/ bit 9.The firmware acknowledges a mute write only after NVS succeeds and keeps the last confirmed runtime value on storage failure. The app checks capability, awaits the write, and verifies readback before committing local pause state; failures reach the existing error UI. Reconnect resolves the device mute into the staged coordinator phase before transport starts, so both pause/resume controls remain effective even when the device and local preferences disagreed. Capture-coordinator integration preserves upstream socket teardown, sync fences, source ownership, and superseded-intent handling. Automatic silence/call/phone transitions never persist a hardware mute.
Protocol coordination
#13704 and this PR use distinct allocations. #10604 conflicts with both: its sleep command uses
19B10014/ bit 9, capture-state uses19B10015, and its separate rename uses19B10016/ bit 10 (checked head0258c7204793). Its protocol and clients need maintainer reconciliation before these proposals are combined. This PR does not change another contributor’s branch or claim that draft allocations are released contracts.Verification
features.h; the runner now exposes only its Zephyr stubs via-I, retaining normal system-header lookup. The production durability/ATT host test passes locally; Linux CI verifies the updated runner.789de5136cd124991e9956f9ff72891b3ad4416d.UI-Evidence: none -- This change is in capture policy, BLE confirmation, and firmware persistence; it adds no screen, control, layout, or visible copy. Regression tests exercise the existing pause/error behavior.
Product invariants affected
Failure class
Failure-Class: new
Failure-Class-ID: FC-device-mute-cleared-on-disconnect
The class record and behavioral regressions cover device-owned mute across disconnects plus truthful acknowledgement when storage or BLE fails.
Line-Count-Exception: app/lib/services/capture/capture_controller.dart | 4609 -> 4670 | Keep durable pendant mute confirmation in the existing capture owner; unrelated ownership extraction is outside this privacy fix.
Line-Count-Exception: app/lib/services/capture/capture_coordinator.dart | 2964 -> 3017 | Confirm device mute before local policy and restore winning hardware intent on supersession in the existing serialized owner.