Repository navigation
firmware: CV1 3.0.23 release candidate (backlog + safe mode) - #24393
Conversation
chore: sync fork main from BasedHardware/omi
- Reserve ATT_NOTIFICATION_HEADER_SIZE (3 bytes: opcode 0x1B + 16-bit handle) when computing audio packet size in push_to_gatt(). - Prevent bt_gatt_notify_cb from returning -EMSGSIZE and dropping packets when negotiated current_mtu is small. - Add check_cv1_mtu.py regression test script covering 12 MTU test cases. - Update firmware README with ATT MTU notification constraints documentation. Fixes #13265
- Add BLE default/minimum ATT MTU 23 boundary cases (0, 17, and 18 audio bytes). - Compare received payload directly with buffer in assertion (received == buffer) to ensure content integrity and ordering. - Add C production seam execution via compiler if available, with explicit source-string static tripwire verification. - Wire check_cv1_mtu.py into build-cv1.sh firmware CI lane. - Update total test case count to 15 cases (all passing).
Fixes #5400. Shrink the MCUboot app slot to end at 0xF8000 and add a 32 KiB settings_storage partition at the top of internal flash, matching storage_partition in omi-cpuapp_partitioning.dtsi and Nordic nRF5340 layout. Keep mcuboot_secondary share_size aligned with mcuboot_primary. Set CONFIG_PM_PARTITION_SIZE_SETTINGS_STORAGE=0x8000 so Kconfig matches the static partition size (NCS default is 8 KiB). Verification: partition address arithmetic checked locally; full west sysbuild not run on this Linux cloud VM (see .cursor/cloud-agent-environment.md). Co-authored-by: Apoorv Darshan <[email protected]>
app address/size now match mcuboot_primary_app (0x10200, 0xe7e00) so the linked image cannot exceed the MCUboot primary slot by 4 KiB. Verification: python partition arithmetic (pad+app=0xe8000). Co-authored-by: Apoorv Darshan <[email protected]>
Move mcuboot_secondary_1 to 0xe8000 so it abuts the 0xe8000 secondary slot and shift the external_flash filler to 0x128000, closing the 32 KiB hole that made partition manager fail on external_flash packing. Co-authored-by: Apoorv Darshan <[email protected]>
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 #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]>
#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]>
…te-7fe8 # Conflicts: # app/lib/services/capture/capture_controller.dart
CV1 reports only build-wide DIS constants (model, manufacturer, hardware revision 5.0), so field defects cannot be attributed to a physical unit or its production lot. Read the immutable nRF5340 FICR device ID via hwinfo, publish it as the DIS Serial Number String (0x2A25) through the DIS settings handler after settings_load(), and print UNIT_ID on the console next to BLE_ADDR for production-line fixtures. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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 #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.
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.
Preserve packed frames and make live packet boundaries explicit for app-owned reclaim. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Negotiate live persistence per connection and bind reclaim to durable, incarnation-scoped app advances instead of Bluetooth delivery. Order SD batch commits before metadata and cover recovery with native fault tests. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
… 18 and 19+
The Formatting check runs the ubuntu-24.04 default clang-format (18.1.x),
which rejects the cast-space and brace-in-macro style that clang-format 19+
produces (and vice versa), so the new test stubs could not satisfy both.
- Guard the contested BT_GATT_*/BT_UUID_INIT_128/GPIO_DT_SPEC_GET_OR/K_* stub
macros with clang-format off/on regions kept in compact hand-written form.
- Replace the (sd_ring_info_t) {...} reset in test_storage.c with direct
field assignments.
Verified: all 29 changed C files pass clang-format --dry-run --Werror under
both 18.1.3 and 20.1.8; tests/ suites pass (custody 47 checks, sd_card and
storage harnesses 0 failures).
Preserve the fixed NVS reservation and current external flash device binding. Add a static partition contract in the shared local/CI manifest, document inherited littlefs placement and migration limits. Host partition contract and five rejection mutations passed. NCS build and physical OTA remain unverified; cloud build follows push. Failure-Class: none
…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
Restore-only cleanup: every staged file is unrelated to the partition repair and byte-identical to pinned main 789de51. One-command core.hooksPath=/dev/null exception authorized to avoid repeated inherited-source formatting; checked identity, conflict markers, authored formatter, and partition guard. Original preflight and pre-push remain enabled; no global hook change.
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]>
|
Jig results for head 47924af (3.0.23 candidate):
Nothing is published. Release still needs #24477 (app-only OTA zips) and the owner's go. |
There was a problem hiding this comment.
41 issues found across 136 files
Confidence score: 2/5
- In
sdhc_spi_cmd12_fix.c, CMD12 error handling can turn a failed multi-block read or busy stop into success. Preserve and return the transfer and wait errors. - In
sdhc_spi_cmd12_fix.c, the write busy wait can loop forever because callers pass a zero interval. Ensure elapsed time advances so the timeout can fire. - In
check_ota_slot_geometry.py, a missingsettings_storagepartition can pass the release check, risking loss of bonds and mute state on update. Fail when the partition lookup is missing or incorrect. - In
capture_silence_policy.dart, the pendant can be muted on the hardware while the coordinator still reports live capture. Update the phase when this branch persists the mute.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="app/lib/services/capture/device_mute_sync.dart">
<violation number="1" location="app/lib/services/capture/device_mute_sync.dart:9">
P3: `firmwareShouldCapture` has no production caller; only the unit test uses it. Because it is just `!muted`, it does not verify firmware behavior. Either wire it into the path it documents or drop it and test the firmware behavior directly.</violation>
</file>
<file name="app/changelog/unreleased/20260925-device-mute-survives-disconnect.json">
<violation number="1" location="app/changelog/unreleased/20260925-device-mute-survives-disconnect.json:1">
P3: The note covers only the Bluetooth drop, but the PR also persists mute across reboots. Consider naming the reboot case too, so the release note matches the shipped behavior. Keep the fragment held until the BLE verification gates pass.</violation>
</file>
<file name="app/test/unit/omi_capture_mute_ble_test.dart">
<violation number="1" location="app/test/unit/omi_capture_mute_ble_test.dart:101">
P3: This test name says "after reconnect", but it never disconnects or reconnects. It only reads a pre-set characteristic value. Rename it to match what it checks, or add a real disconnect/reconnect sequence if reconnect persistence is the intent.</violation>
</file>
<file name="app/test/unit/device_mute_sync_test.dart">
<violation number="1" location="app/test/unit/device_mute_sync_test.dart:13">
P2: The 'after BLE disconnect' test repeats the connected-case assertion and never models a disconnect, so it proves nothing about disconnect behavior. The 'reconnect must not flip the flag' check in the last test is also a no-op repeat. Remove these, or drive the real reconnect path (`applyReconnectMute` in capture_controller.dart, already covered in capture_provider_test.dart) with a disconnect/reconnect sequence.</violation>
</file>
<file name="omi/firmware/omi/tests/test_capture_mute_settings.c">
<violation number="1" location="omi/firmware/omi/tests/test_capture_mute_settings.c:64">
P2: This does not model a reboot: `app_settings_init()` reuses the already-mutated static `muted` cache, so the assertion can pass even when persisted state is never loaded. Reset the cache through a test seam or run the load assertion in a fresh process before claiming reboot persistence.</violation>
</file>
<file name="omi/firmware/omi/tests/host/codec_regression.c">
<violation number="1" location="omi/firmware/omi/tests/host/codec_regression.c:32">
P2: The init-error case does not assert that ring initialization was skipped, so a regression that runs `ring_buf_init()` before returning the init failure can pass this check. Add `ring_init_calls == 0` to keep this case consistent with the control-failure checks.</violation>
</file>
<file name="app/lib/services/capture/capture_silence_policy.dart">
<violation number="1" location="app/lib/services/capture/capture_silence_policy.dart:63">
P2: Routing this branch through `_reducePause` persists the hardware mute but leaves the phase unchanged, so a pendant that is `pendantLive` ends up muted on the device while the coordinator still reports live capture. Restore the marker-only transition for this legacy branch.</violation>
</file>
<file name="omi/firmware/omi/src/lib/core/utils.h">
<violation number="1" location="omi/firmware/omi/src/lib/core/utils.h:15">
P2: The fixed temporary name can capture a caller's valid `result` expression. `ASSERT_TRUE(omi_assert_true_value_)` then reads the newly declared uninitialized local in its initializer, so the assertion can behave unpredictably; remove the temporary and test `result` directly (the expression is evaluated once).</violation>
</file>
<file name="omi/firmware/omi/tests/run_host_regressions.py">
<violation number="1" location="omi/firmware/omi/tests/run_host_regressions.py:38">
P3: A hung regression raises `TimeoutExpired` before `run()` records the command, leaving `results.json` without the command or captured output needed to diagnose the failure. Catch the timeout, append a timeout result, save the report, then re-raise.</violation>
</file>
<file name="omi/firmware/omi/src/sdfix/sdhc_spi_cmd12_fix.c">
<violation number="1" location="omi/firmware/omi/src/sdfix/sdhc_spi_cmd12_fix.c:200">
P1: The write busy wait can loop forever because both callers pass `0` for `interval_ticks`, leaving `timeout_ms` unchanged. Use a minimum positive elapsed interval so a busy SD card eventually reaches the timeout.</violation>
<violation number="2" location="omi/firmware/omi/src/sdfix/sdhc_spi_cmd12_fix.c:323">
P1: The R1b busy-wait error is discarded, so CMD12 can report success while the card is still busy or the SPI poll failed. Return the wait error from this branch before accepting the stop command.</violation>
<violation number="3" location="omi/firmware/omi/src/sdfix/sdhc_spi_cmd12_fix.c:527">
P1: The CRC SPI transfer error is ignored before parsing `crc`. Return the transfer error immediately, before CRC validation or the next-block token read can hide it.</violation>
<violation number="4" location="omi/firmware/omi/src/sdfix/sdhc_spi_cmd12_fix.c:640">
P2: CMD12 response parsing mutates `stop_cmd` even though it is defined const; casting away const does not make that object safely writable. Define `stop_cmd` as mutable before passing it to `sdhc_spi_send_cmd`.</violation>
<violation number="5" location="omi/firmware/omi/src/sdfix/sdhc_spi_cmd12_fix.c:678">
P1: The CMD12 retry assignment overwrites a failed data-transfer result with a successful stop result. A failed multi-block read can therefore return success with incomplete data; preserve the transfer error and propagate stop errors separately.</violation>
</file>
<file name="sdks/device/PROTOCOL.md">
<violation number="1" location="sdks/device/PROTOCOL.md:23">
P3: The shared protocol table omits the new `19b10016` power-control characteristic. Document its read/write command and state values alongside capture mute so SDK clients can discover and implement it.</violation>
<violation number="2" location="sdks/device/PROTOCOL.md:25">
P2: This wording overstates the mute guarantee: disconnect preserves the mute gate for transmission and storage, but the firmware can continue sampling and queueing audio. Document the invariant as preventing sending and storage rather than preventing capture.</violation>
</file>
<file name=".github/checks-manifest.yaml">
<violation number="1" location=".github/checks-manifest.yaml:27">
P2: The mute durability check does not trigger for `button.c`, even though this PR adds offline double-tap persistence there. Add that source path so regressions in the offline toggle run the required check.</violation>
</file>
<file name="omi/firmware/tests/Makefile">
<violation number="1" location="omi/firmware/tests/Makefile:18">
P2: This recipe does not propagate command-line `CC` overrides into `test_rc_integration.py`; `make CC=clang test` can therefore fail or exercise a different compiler. Invoke the script with `CC="$(CC)"` so all host checks use the selected compiler.</violation>
</file>
<file name="omi/firmware/tools/cv1/ble_central/Logic.swift">
<violation number="1" location="omi/firmware/tools/cv1/ble_central/Logic.swift:143">
P2: `decodeRecovery` accepts the payload size but not the version byte, so a future or malformed 16-byte state is mislabeled as `recovery_v1`. Validate byte 0 is `1` before assigning the v1 layout; otherwise preserve the raw payload as unknown.</violation>
</file>
<file name="omi/firmware/omi/README.md">
<violation number="1" location="omi/firmware/omi/README.md:72">
P3: This device-name contract is now specified in three places: this README, `docs/gatt-map.md`, and `AGENTS.md`. Keep the GATT and retry details in `docs/gatt-map.md` and link to it from here, so the spec has one source to update.</violation>
</file>
<file name="omi/firmware/omi/tests/host/codec-stubs/zephyr/logging/log.h">
<violation number="1" location="omi/firmware/omi/tests/host/codec-stubs/zephyr/logging/log.h:10">
P2: This `va_arg` uses an incompatible type for the `%s` argument: `__FILE__` is passed as `char *`, not `const char *`. Retrieve it as `char *` so the host test does not rely on undefined variadic behavior.</violation>
</file>
<file name="omi/firmware/omi/tests/battery/test_broadcast.c">
<violation number="1" location="omi/firmware/omi/tests/battery/test_broadcast.c:10">
P2: This host test uses a 3400 mV critical threshold, but production uses 3500 mV, so it does not cover the production boundary and can miss a shutdown regression between 3400 and 3499 mV. Set the test threshold to 3500 mV.</violation>
</file>
<file name="omi/firmware/omi/tests/host/diagnostics_cache_regression.c">
<violation number="1" location="omi/firmware/omi/tests/host/diagnostics_cache_regression.c:78">
P3: The concurrent stress does not verify snapshot coherence: a cache reset between the two callbacks can replace the snapshot, but this assertion checks only the returned length. Compare the assembled packet with a consistency oracle (or explicitly limit this stress to race-safety) so the test cannot report coherence while accepting a torn long read.</violation>
</file>
<file name="omi/firmware/omi/src/lib/core/settings.h">
<violation number="1" location="omi/firmware/omi/src/lib/core/settings.h:106">
P2: The `@return` note says "default unmuted", but an unreadable persisted mute value now reads as muted (fail-closed in `settings_set`). Document both cases so callers do not assume a read failure yields unmuted.</violation>
<violation number="2" location="omi/firmware/omi/src/lib/core/settings.h:116">
P3: The public contract also accepts `NULL`, which clears the name, but the doc does not say so. Document that `NULL` clears the device name.</violation>
</file>
<file name="omi/firmware/omi/tests/check_ota_slot_geometry.py">
<violation number="1" location="omi/firmware/omi/tests/check_ota_slot_geometry.py:39">
P2: This release check silently accepts a missing `settings_storage` partition, so a layout that drops or relocates the NVS area can pass despite losing bonds and mute state on update. Compare the lookup directly and fail when the entry is absent.</violation>
</file>
<file name="omi/firmware/omi/src/lib/core/storage.c">
<violation number="1" location="omi/firmware/omi/src/lib/core/storage.c:591">
P2: This custody-enable ACK can be lost on transient `-ENOMEM`, leaving the phone unaware that firmware enabled custody and without the returned capability state. Retry the three-byte ACK using the same retry policy as other control responses.</violation>
<violation number="2" location="omi/firmware/omi/src/lib/core/storage.c:641">
P2: Live-mark notifications are dropped on any send failure after the queue entry is consumed. Preserve the mark and retry or otherwise provide a later replay path; losing this one-shot boundary can leave acknowledged audio permanently unreclaimable.</violation>
</file>
<file name="app/lib/services/devices/connectors/omi_connection.dart">
<violation number="1" location="app/lib/services/devices/connectors/omi_connection.dart:1296">
P2: `getCaptureMuted` goes through `getFeatures()`, which caches a failed features read as 0 for the connection's lifetime. Then the device mute is never read and the app falls back to the local pref. Read the features characteristic directly here, as `setCaptureMuted` already does, so a failed read returns null without poisoning the cache.</violation>
</file>
<file name="omi/firmware/omi/tests/Makefile">
<violation number="1" location="omi/firmware/omi/tests/Makefile:2">
P3: `CFLAGS ?=` leaves GNU make’s predefined empty `CFLAGS` unchanged, so `test_custody` is compiled without the strict flags shown here. Use an additive assignment such as `CFLAGS += ...` so this test actually enforces the intended compiler checks.</violation>
<violation number="2" location="omi/firmware/omi/tests/Makefile:10">
P2: These targets omit the project headers consumed by their included firmware sources, so `make run` can execute stale binaries after a header-only interface or behavior change. Add the project headers to each prerequisite list or enable compiler-generated dependency files.</violation>
</file>
<file name="omi/firmware/omi/tests/settings_stubs/zephyr/settings/settings.h">
<violation number="1" location="omi/firmware/omi/tests/settings_stubs/zephyr/settings/settings.h:6">
P2: Declare `settings_read_cb` with Zephyr’s `ssize_t` return type so this test stub matches the production settings API; include `<sys/types.h>` for the type.</violation>
</file>
<file name="omi/firmware/omi/src/recovery_diagnostics.h">
<violation number="1" location="omi/firmware/omi/src/recovery_diagnostics.h:13">
P2: This GATT snapshot can be internally inconsistent while a DFU or persistence transition updates the recovery state under `bootstate_lock`, because `safe_mode_snapshot_get` reads that state without the lock. Synchronize the getter or capture the complete state under the same lock before encoding it.</violation>
</file>
<file name="omi/firmware/omi/src/lib/core/custody.c">
<violation number="1" location="omi/firmware/omi/src/lib/core/custody.c:52">
P2: A zero-capacity pack corrupts memory: `capacity - 1U` wraps to `UINT32_MAX`, allowing the frame write to proceed despite no record space. Reject capacities below two before calculating `limit`.</violation>
</file>
<file name="omi/firmware/scripts/check_cv1_mtu.py">
<violation number="1" location="omi/firmware/scripts/check_cv1_mtu.py:197">
P2: Without a native compiler, this path tests a Python reimplementation rather than `transport.c`, so it can pass while `push_to_gatt()` is broken. Make the source-level seam mandatory or clearly non-gating instead of returning success from an unconnected simulation.</violation>
<violation number="2" location="omi/firmware/scripts/check_cv1_mtu.py:299">
P1: An aborted native seam returns a negative signal code, so this condition treats assertion failures or crashes as “compiler unavailable” and runs the unrelated Python simulation. Return only the explicit `-1` fallback sentinel, such as `if c_res != -1:`, so native failures fail the gate.</violation>
</file>
<file name="omi/firmware/omi/src/sd_card.c">
<violation number="1" location="omi/firmware/omi/src/sd_card.c:745">
P2: The mount continuity probe undercounts storage errors because its failed disk read returns `-EIO` without incrementing `omi_diagnostics_inc_storage_error()`. Increment the counter before logging this failure.</violation>
<violation number="2" location="omi/firmware/omi/src/sd_card.c:1038">
P2: `advance_read_seq_internal` persists `new_read_seq` but never reruns `live_mark_eval_committed()`. When an earlier live mark was blocked by unread backlog, this advance can satisfy its `read_seq` floor; without another batch flush, the phone never receives the mark and those records remain unreleasable.</violation>
<violation number="3" location="omi/firmware/omi/src/sd_card.c:1263">
P2: `sd_mount` returns after the new tail or continuity recovery failures while the disk remains initialized; these exits only disable power and never issue `DISK_IOCTL_CTRL_DEINIT`. A transient recovery read failure can then retry `CTRL_INIT` against uncleared driver state; deinitialize before each power-off exit.</violation>
</file>
<file name="omi/firmware/omi/src/lib/core/capture_mute_gatt.h">
<violation number="1" location="omi/firmware/omi/src/lib/core/capture_mute_gatt.h:17">
P3: The mute characteristic defines only 0 and 1, but this accepts and persists every nonzero byte. Reject values greater than 1 with `BT_ATT_ERR_VALUE_NOT_ALLOWED` before calling `capture_mute_set`.</violation>
</file>
<file name="omi/firmware/omi/src/lib/core/transport.c">
<violation number="1" location="omi/firmware/omi/src/lib/core/transport.c:1792">
P2: The pusher's shutdown drain bypasses the mute check and persists the remaining TX queue while capture is muted. Gate both the tail drain and its final `storage_pack_drain()` with `capture_mute_should_capture()`, or discard the queued frames when muted.</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
| return ret; | ||
| } | ||
| /* Read CRC16 plus one end byte */ | ||
| ret = sdhc_spi_rx(config->spi_dev, dev_data->spi_cfg, crc, sizeof(crc)); |
There was a problem hiding this comment.
P1: The CRC SPI transfer error is ignored before parsing crc. Return the transfer error immediately, before CRC validation or the next-block token read can hide it.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At omi/firmware/omi/src/sdfix/sdhc_spi_cmd12_fix.c, line 527:
<comment>The CRC SPI transfer error is ignored before parsing `crc`. Return the transfer error immediately, before CRC validation or the next-block token read can hide it.</comment>
<file context>
@@ -0,0 +1,845 @@
+ return ret;
+ }
+ /* Read CRC16 plus one end byte */
+ ret = sdhc_spi_rx(config->spi_dev, dev_data->spi_cfg, crc, sizeof(crc));
+ if (crc16_itu_t(0, read_location, data->block_size) != sys_get_be16(crc)) {
+ /* Bad CRC */
</file context>
| ret = sdhc_spi_rx(config->spi_dev, dev_data->spi_cfg, crc, sizeof(crc)); | |
| ret = sdhc_spi_rx(config->spi_dev, dev_data->spi_cfg, crc, sizeof(crc)); | |
| if (ret) { | |
| return ret; | |
| } |
| value = cmd->timeout_ms; | ||
| response--; | ||
| /* Periodically check busy line */ | ||
| ret = sdhc_spi_wait_unbusy(dev, SPI_R1B_TIMEOUT_MS, 1000); |
There was a problem hiding this comment.
P1: The R1b busy-wait error is discarded, so CMD12 can report success while the card is still busy or the SPI poll failed. Return the wait error from this branch before accepting the stop command.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At omi/firmware/omi/src/sdfix/sdhc_spi_cmd12_fix.c, line 323:
<comment>The R1b busy-wait error is discarded, so CMD12 can report success while the card is still busy or the SPI poll failed. Return the wait error from this branch before accepting the stop command.</comment>
<file context>
@@ -0,0 +1,845 @@
+ value = cmd->timeout_ms;
+ response--;
+ /* Periodically check busy line */
+ ret = sdhc_spi_wait_unbusy(dev, SPI_R1B_TIMEOUT_MS, 1000);
+ }
+ break;
</file context>
| ret = sdhc_spi_wait_unbusy(dev, SPI_R1B_TIMEOUT_MS, 1000); | |
| ret = sdhc_spi_wait_unbusy(dev, SPI_R1B_TIMEOUT_MS, 1000); | |
| if (ret) { | |
| return ret; | |
| } |
| stop_ret = sdhc_spi_send_cmd(dev, (struct sdhc_command *) &stop_cmd, false); | ||
| while ((stop_ret != 0) && (stop_retries > 0)) { | ||
| /* Retry stop command */ | ||
| ret = stop_ret = sdhc_spi_send_cmd(dev, (struct sdhc_command *) &stop_cmd, false); |
There was a problem hiding this comment.
P1: The CMD12 retry assignment overwrites a failed data-transfer result with a successful stop result. A failed multi-block read can therefore return success with incomplete data; preserve the transfer error and propagate stop errors separately.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At omi/firmware/omi/src/sdfix/sdhc_spi_cmd12_fix.c, line 678:
<comment>The CMD12 retry assignment overwrites a failed data-transfer result with a successful stop result. A failed multi-block read can therefore return success with incomplete data; preserve the transfer error and propagate stop errors separately.</comment>
<file context>
@@ -0,0 +1,845 @@
+ stop_ret = sdhc_spi_send_cmd(dev, (struct sdhc_command *) &stop_cmd, false);
+ while ((stop_ret != 0) && (stop_retries > 0)) {
+ /* Retry stop command */
+ ret = stop_ret = sdhc_spi_send_cmd(dev, (struct sdhc_command *) &stop_cmd, false);
+ stop_retries--;
+ }
</file context>
| k_msleep(k_ticks_to_ms_floor32(interval_ticks)); | ||
| timeout_ms -= k_ticks_to_ms_floor32(interval_ticks); |
There was a problem hiding this comment.
P1: The write busy wait can loop forever because both callers pass 0 for interval_ticks, leaving timeout_ms unchanged. Use a minimum positive elapsed interval so a busy SD card eventually reaches the timeout.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At omi/firmware/omi/src/sdfix/sdhc_spi_cmd12_fix.c, line 200:
<comment>The write busy wait can loop forever because both callers pass `0` for `interval_ticks`, leaving `timeout_ms` unchanged. Use a minimum positive elapsed interval so a busy SD card eventually reaches the timeout.</comment>
<file context>
@@ -0,0 +1,845 @@
+ if (response == 0xFF) {
+ return 0;
+ }
+ k_msleep(k_ticks_to_ms_floor32(interval_ticks));
+ timeout_ms -= k_ticks_to_ms_floor32(interval_ticks);
+ }
</file context>
| k_msleep(k_ticks_to_ms_floor32(interval_ticks)); | |
| timeout_ms -= k_ticks_to_ms_floor32(interval_ticks); | |
| int interval_ms = k_ticks_to_ms_floor32(interval_ticks); | |
| if (interval_ms == 0) { | |
| interval_ms = 1; | |
| } | |
| k_msleep(interval_ms); | |
| timeout_ms -= interval_ms; |
|
|
||
| # Attempt C production seam compilation if compiler is present | ||
| c_res = run_c_seam(source_path) | ||
| if c_res >= 0: |
There was a problem hiding this comment.
P1: An aborted native seam returns a negative signal code, so this condition treats assertion failures or crashes as “compiler unavailable” and runs the unrelated Python simulation. Return only the explicit -1 fallback sentinel, such as if c_res != -1:, so native failures fail the gate.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At omi/firmware/scripts/check_cv1_mtu.py, line 299:
<comment>An aborted native seam returns a negative signal code, so this condition treats assertion failures or crashes as “compiler unavailable” and runs the unrelated Python simulation. Return only the explicit `-1` fallback sentinel, such as `if c_res != -1:`, so native failures fail the gate.</comment>
<file context>
@@ -0,0 +1,307 @@
+
+ # Attempt C production seam compilation if compiler is present
+ c_res = run_c_seam(source_path)
+ if c_res >= 0:
+ return c_res
+
</file context>
| if c_res >= 0: | |
| if c_res != -1: |
| - [ ] Fix in-accurated battery level, especially on charging | ||
| - [x] Charger | ||
|
|
||
| ### Persistent device name |
There was a problem hiding this comment.
P3: This device-name contract is now specified in three places: this README, docs/gatt-map.md, and AGENTS.md. Keep the GATT and retry details in docs/gatt-map.md and link to it from here, so the spec has one source to update.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At omi/firmware/omi/README.md, line 72:
<comment>This device-name contract is now specified in three places: this README, `docs/gatt-map.md`, and `AGENTS.md`. Keep the GATT and retry details in `docs/gatt-map.md` and link to it from here, so the spec has one source to update.</comment>
<file context>
@@ -68,3 +68,19 @@ Note: Open "firmware" folder in your code editor. Don't open the root omi folder
- [ ] Fix in-accurated battery level, especially on charging
- [x] Charger
+
+### Persistent device name
+
+The settings characteristic `19B10014-E8F2-537E-4F6C-D104768A1214` reads/writes
</file context>
| for (unsigned i = 0; i < 10000; i++) { | ||
| assert(diagnostics_read_handler(c, 0, b, 22, 0) == 22); | ||
| omi_diagnostics_inc_storage_error(); | ||
| assert(diagnostics_read_handler(c, 0, b + 22, 3, 22) == 3); |
There was a problem hiding this comment.
P3: The concurrent stress does not verify snapshot coherence: a cache reset between the two callbacks can replace the snapshot, but this assertion checks only the returned length. Compare the assembled packet with a consistency oracle (or explicitly limit this stress to race-safety) so the test cannot report coherence while accepting a torn long read.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At omi/firmware/omi/tests/host/diagnostics_cache_regression.c, line 78:
<comment>The concurrent stress does not verify snapshot coherence: a cache reset between the two callbacks can replace the snapshot, but this assertion checks only the returned length. Compare the assembled packet with a consistency oracle (or explicitly limit this stress to race-safety) so the test cannot report coherence while accepting a torn long read.</comment>
<file context>
@@ -0,0 +1,130 @@
+ for (unsigned i = 0; i < 10000; i++) {
+ assert(diagnostics_read_handler(c, 0, b, 22, 0) == 22);
+ omi_diagnostics_inc_storage_error();
+ assert(diagnostics_read_handler(c, 0, b + 22, 3, 22) == 3);
+ if (i % 7 == 0)
+ diagnostics_reset_read_cache(c);
</file context>
| /** | ||
| * @brief Save the device name setting to onboard persistent storage. | ||
| * | ||
| * @param name The new device name (null-terminated string, up to 25 UTF-8 bytes payload). |
There was a problem hiding this comment.
P3: The public contract also accepts NULL, which clears the name, but the doc does not say so. Document that NULL clears the device name.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At omi/firmware/omi/src/lib/core/settings.h, line 116:
<comment>The public contract also accepts `NULL`, which clears the name, but the doc does not say so. Document that `NULL` clears the device name.</comment>
<file context>
@@ -92,4 +92,37 @@ int app_settings_save_lsm6dsl_time_base(uint64_t epoch_s, uint32_t imu_timestamp
+/**
+ * @brief Save the device name setting to onboard persistent storage.
+ *
+ * @param name The new device name (null-terminated string, up to 25 UTF-8 bytes payload).
+ * @return 0 on success, negative error code otherwise.
+ */
</file context>
| * @param name The new device name (null-terminated string, up to 25 UTF-8 bytes payload). | |
| * @param name The new device name (null-terminated string, up to 25 UTF-8 bytes payload). NULL clears the name. |
| @@ -0,0 +1,24 @@ | |||
| CC ?= cc | |||
| CFLAGS ?= -std=c99 -Wall -Wextra -Werror -I../src/lib/core | |||
There was a problem hiding this comment.
P3: CFLAGS ?= leaves GNU make’s predefined empty CFLAGS unchanged, so test_custody is compiled without the strict flags shown here. Use an additive assignment such as CFLAGS += ... so this test actually enforces the intended compiler checks.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At omi/firmware/omi/tests/Makefile, line 2:
<comment>`CFLAGS ?=` leaves GNU make’s predefined empty `CFLAGS` unchanged, so `test_custody` is compiled without the strict flags shown here. Use an additive assignment such as `CFLAGS += ...` so this test actually enforces the intended compiler checks.</comment>
<file context>
@@ -0,0 +1,24 @@
+CC ?= cc
+CFLAGS ?= -std=c99 -Wall -Wextra -Werror -I../src/lib/core
+SD_CFLAGS ?= -std=c99 -Wall -Wextra -Werror -Istubs -I../src -I../src/lib/core -Wno-unused-parameter -Wno-unused-variable
+STUB_HEADERS := $(wildcard stubs/*.h stubs/*/*.h stubs/*/*/*.h stubs/*/*/*/*.h)
</file context>
| CFLAGS ?= -std=c99 -Wall -Wextra -Werror -I../src/lib/core | |
| CFLAGS += -std=c99 -Wall -Wextra -Werror -I../src/lib/core |
| if (len != 1) { | ||
| return BT_GATT_ERR(BT_ATT_ERR_INVALID_ATTRIBUTE_LEN); | ||
| } | ||
| if (capture_mute_set(((const uint8_t *) buf)[0] != 0)) { |
There was a problem hiding this comment.
P3: The mute characteristic defines only 0 and 1, but this accepts and persists every nonzero byte. Reject values greater than 1 with BT_ATT_ERR_VALUE_NOT_ALLOWED before calling capture_mute_set.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At omi/firmware/omi/src/lib/core/capture_mute_gatt.h, line 17:
<comment>The mute characteristic defines only 0 and 1, but this accepts and persists every nonzero byte. Reject values greater than 1 with `BT_ATT_ERR_VALUE_NOT_ALLOWED` before calling `capture_mute_set`.</comment>
<file context>
@@ -0,0 +1,21 @@
+ if (len != 1) {
+ return BT_GATT_ERR(BT_ATT_ERR_INVALID_ATTRIBUTE_LEN);
+ }
+ if (capture_mute_set(((const uint8_t *) buf)[0] != 0)) {
+ return BT_GATT_ERR(BT_ATT_ERR_UNLIKELY);
+ }
</file context>
…the NOR Safe mode powered the SD card off but left its chip-select idling high, which back-powers the card and corrupts the shared SPI3 bus. Every secondary-slot transfer then timed out, so phone DFU in safe mode could never stage an image. Park CS at 0 V as sd_card.c does, and log whether the secondary slot is readable before advertising. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Parking the SD chip-select did not help: the jig still timed out on SPI3 and reported the secondary slot unreadable. Leave the SD rail as the boot hog and MCUboot leave it (on), which is the state in which the NOR is known to work. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Safe-mode DFU blocker found during the owner's phone test, fixed in 7350201 (head 6b449b2).
Still to do: the owner's phone DFU retry from SAFE, then all four proofs plus a CI-bytes bench on the new head. Nothing is published. |
# Conflicts: # .github/checks-manifest.yaml # omi/firmware/AGENTS.md
…merging main Co-Authored-By: Claude Opus 5.5 <[email protected]>
Initialize only the SD host and MMC child before recovery NOR reads. Reuse retained RAM and settings for boot/fatal history, image update outcomes, and throttled storage health counters. Append a versioned recovery record with coherent ATT long reads and host regression coverage.
…advertises A hung SD card init is cut by the watchdog, but every later SAFE boot would repeat it before advertising. Guard the call with a retained bit; once a hang leaves it set, skip the init and count an SD failure. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…d layout littlefs_storage and settings_storage both ask for "before: end". The NCS partition manager orders such partitions by iterating a Python set, so the layout depended on the per-run hash seed: two bench builds of one source tree produced different maps (storage at 0xf6000/0xfc000 vs 0xfa000/0xf8000). Shipped 3.0.21 uses 0xf6000/0xfc000. An update built with the other order would move settings and offline storage. Pin app, both storage partitions and EMPTY_0 to the fielded generated map and check the static file against it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
gcc's -Wclobbered rejects a non-volatile local that is live across setjmp/longjmp; the CI host build compiles with -Werror. Co-Authored-By: Claude Opus 5.5 <[email protected]>
gcc's -Warray-parameter rejects a pointer definition of a function the header declares with an array bound; the CI host build uses -Werror. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…4806) <!-- claude-projects-attribution: {"github_login":"Git-on-my-level"} --> _Requested by **David**_ ## What changed and why Fixes the Repo Checks / Formatting failure on PRs that touch firmware C files with compound literals, for example #24393 (run 42305654687, job 128194880599, `tests/test_power_off_queue.c`). GitHub's `ubuntu-latest` moved to ubuntu-26.04. Its clang-format adds a space before compound-literal braces, while the firmware pre-commit hook pins clang-format 18, which removes it. The hosted check therefore rejects files the local hook accepts. The Formatting job now installs `clang-format==18.1.8` into a dedicated venv under `$RUNNER_TEMP` and runs that binary. That matches the local pre-commit pin and holds when runners change again. No runner image is pinned. ## Product invariants affected None. The change is limited to the CI formatting step. ## How it was verified - The workflow file parses as YAML. - The local firmware formatter check is still clang-format 18, per scripts/pre-commit. - Not run here: the hosted Formatting job. The first real run on this PR is the check. ## Tests None added. The hosted Formatting job is the test. ## UI evidence Not applicable. ## Failure class (fixes) Failure-Class: new New class definition: `.github/failure-classes/FC-clang-format-runner-image-drift.json`. This PR is its evidence. ## New guards (only when adding a check or ratchet) The Formatting job now pins the formatter version itself. The local pre-commit guard already refuses other versions. <!-- This is an auto-generated description by cubic. --> <a href="https://cubic.dev/pr/BasedHardware/omi/pull/24806?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/24806?returnTo=https%3A%2F%2Fgithub.com%2FBasedHardware%2Fomi%2Fpull%2F24806&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. -->
… central (#24813) <!-- claude-projects-attribution: {"github_login":"Git-on-my-level"} --> _Requested by **David**_ ## What changed and why The CV1 macOS BLE bench central (`omi/firmware/tools/cv1/ble_central`) gains MCUmgr SMP image commands (`image-state`, `image-upload`) and a CoreBluetooth peripheral pin. Fielded 3.0.21 exposes no DIS serial, so the existing serial pin can't tell a bench unit from any other 3.0.21 pendant in Bluetooth range. That makes an upload from 3.0.21 unsafe. With `--expect-peripheral UUID` (the host's CoreBluetooth identifier): - Discovery ignores every other peripheral. - Each connection re-checks the identifier. - SMP access fails closed on a mismatch. Receipts record the connected identifier, so it can be learned from a serial-matched run. `image-upload` and `audio` accept either pin. The branch also carries the recovery-characteristic reader (`tools(cv1)`, also on #24393), which the SMP commands build on. This is bench tooling only; no firmware changes. ## Product invariants affected none ## How it was verified - `sh omi/firmware/tools/cv1/ble_central/test.sh`: 1094 pure Swift checks pass. These cover the pin parse/normalization, a wrong peripheral leaving no SMP access, a pin without serial allowing SMP, a pin plus serial still requiring the serial, and a mismatch never being rescued by later reads. - `build.sh` to a scratch bundle, then `check_rejections.py` against it: 32 pre-Bluetooth refusal cases pass, including a malformed `--expect-peripheral` and scan with a pin. - The SMP commands (serial pin) were used on the bench unit on 2026-11-07. They installed the 3.0.23 RC through the factory MCUboot (slot1 pending/permanent, then slot0 hash changed after reset). - Not yet exercised live: `--expect-peripheral`. The rebuilt bundle needs a fresh macOS Bluetooth grant on the bench host first. - An independent read-only review found no path to a wrong-device SMP write. Its two minor findings (re-check the pin on every connection, README overview wording) are fixed. ## Tests `Tests.swift` adds peripheral-pin cases to the parse and SMP gate checks. `check_rejections.py` adds the two refusal cases and the new `peripheralMismatch` receipt field. ## UI evidence UI-Evidence: none -- command-line bench tool, no UI ## Failure class (fixes) Failure-Class: none 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated description by cubic. --> <a href="https://cubic.dev/pr/BasedHardware/omi/pull/24813?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/24813?returnTo=https%3A%2F%2Fgithub.com%2FBasedHardware%2Fomi%2Fpull%2F24813&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. -->
## What changed and why Fixes #24664. Refs #24762. - **Double-tap unmute from idle:** device resume now uses the same resume reducer as the Home control, so a CV1 double-tap clears a persisted mute after capture has gone idle. - **Reconnect while muted:** a device start under persisted user mute keeps a paused pendant session and its button listener, instead of failing closed with `capture_unavailable`. - **Foreground recovery while muted:** `_recoverCaptureOnResume` restarted a connected pendant that capture left idle, but only when unmuted. A muted pendant whose start failed or was skipped stayed dead: no Paused card, no button listener, so the double-tap could not reach the app (the #24762 relaunch symptom). It is now restarted too and lands paused. A pendant the user stopped, batch mode, calls and phone-owned capture stay excluded, and orphan-audio recovery keeps its mute check. Rebased on main after #24393 (CV1 3.0.23 device mute). Device resume still delegates to `_reduceResume`, so it carries `PersistDeviceMuteStage` like every other resume. On 3.0.21, which has no mute characteristic, `setCaptureMuted` is a no-op. A muted reconnect now resolves the device mute first and then lands paused. The reporter reproduced this on iOS app 1.0.586 / CV1 firmware 3.0.21. App-icon quick action Mute → Unmute followed by reopening the app restored capture. Line-Count-Exception: app/lib/services/capture/capture_controller.dart | 4916 -> 4926 | Keep muted-connect pause handling at the existing BLE admission boundary; splitting this controller is outside this regression fix. ## Product invariants affected INV-CAP-1: explicit user mute permits suspended audio, and unmute restores live delivery. The paused state stays visible while audio admission is denied, including after a relaunch or a failed start. ## How it was verified On the rebased head: - `bash app/test.sh`: 8,728 passed, 5 skipped. This Linux host used a local `g++` shim for the script's unavailable `clang++`. - `flutter test test/services/capture/`: 441 passed. - `bash scripts/analyze_ratchet.sh`: passed. - Earlier head: `make preflight`, `make mobile-verify` j5 (3/3), and the offline iPhone/BLE harness all passed. - iOS build and a physical-device retest are not possible on this Linux host. ## Tests New coordinator tests cover: - muted idle resume, plus call/phone/no-device exclusions; - a muted ended session; - a persisted-mute relaunch through a tracked BLE button listener; - foreground recovery of a muted idle pendant (Paused card, button listener, double-tap resumes); - a pendant the user stopped staying stopped. The idle-resume, relaunch and foreground tests failed before their fixes. ## UI evidence UI-Evidence: none -- no widget or layout changes. ## Failure class (fixes) Failure-Class: none 🤖 Generated with [Claude Code](https://claude.com/claude-code)
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.
Analyzejobs are CodeQL failing at the SARIF upload step with no alerts. They aren't required checks and GitHub won't rerun them.Evidence:
data/run-2026-11-07-cv1-rc/factory-bootloader-install-proof.mdin 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:
7a7a6aaa9ddSafe 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 characteristic19B10042moves to v2 (96 bytes, same 16-byte prefix, version byte 2).19B10041is unchanged.481bab7ead1Docs:docs/verification/2026-11-07-boot-telemetry.md, GATT map.44180c0060aHang guard: if SD init hangs and the watchdog fires, later SAFE boots skip SD init and count a failure instead of looping.6a09d7cbbe5Pins the app, littlefs, settings and EMPTY_0 partitions inboards/omi/pm_static.ymlto 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.pynow 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/maininto 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.19B10041keeps the 25-byte telemetry the shipped app parses. Safe mode's 16-byte recovery state moves to19B10042. SAFE exposes only42and Zephyr's static recovery services.gatt-map.mdmatches the code.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.
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:
check_cv1_mtu.pypassed on its fallback simulation when its compile failed. A compile failure now fails the check, and only a missing compiler falls back.check_ota_slot_geometry.pykeeps OTA slots at the addresses in every recorded baseline build. It fails on fix(firmware): reserve explicit settings_storage in pm_static #13855's map.Changes from the original PRs:
fix(firmware): freeze CV1 SOC while charging and expose diagnostics #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.
feat(firmware): add BLE power-off and recording pause characteristic (#22927) #23735 moves from UUID
19B10014to the allocated19B10016, and from feature bit 9 to bit 11. Pause now uses the same persistent mute as19B10015, 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.feat(firmware+app): rename Omi device with onboard persistent storage (#2824) #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
0xf0000to0xe8000and 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 from0xfc000, losing bonds and mute on update. This hasn't been reproduced on hardware. Generated baseline builds already end the app at0xf6000, 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
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-hostandcompile-onlyagainst pinned NCS 2.9.0 pass.make runpasses:sd_cardandstorageharnesses report 0 failures.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 at2810eaf. 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, plusomi/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