Repository navigation
fix(app): skip legacy SD card sync on ring-buffer firmware and fail fast on ACK rejection (#24663) - #24820
fix(app): skip legacy SD card sync on ring-buffer firmware and fail fast on ACK rejection (#24663)#24820cocvn157 wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
All reported issues were addressed across 6 files
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
…ast on ACK rejection (BasedHardware#24663)
e311a43 to
3e44d22
Compare
|
Verdict: this correctly implements the skip suggested in #24663 and I found no blocking issues; two follow-ups below. Findings:
Blast radius: if firmware detection ever misidentified a legacy-SD device as ring, its SD sync would be silently skipped; in practice both gates require a confirmed >= 3.0.20 revision and the DIS fallback fails open, so legacy devices are not at risk. USER IMPACT: on ring-buffer firmware (3.0.20+), the app no longer queues a phantom "legacy SD" recording that could never download and was retried on every connect; ring storage sync itself is unchanged. Follow-ups:
by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
|
Hey @cocvn157 👋 Thank you so much for taking the time to contribute to Omi! We truly appreciate you putting in the effort to submit this pull request. After careful review, we've decided not to merge this particular PR. Please don't take this personally — we genuinely try to merge as many contributions as possible, but sometimes we have to make tough calls based on:
Before your next PR, please skim:
If this was declined for direction or taste, maintainers should cite an invariant ID or open a proposed one — ask if that citation is missing. Your contribution is still valuable to us, and we'd love to see you contribute again in the future! If you'd like feedback on how to improve this PR or want to discuss alternative approaches, please don't hesitate to reach out. Thank you for being part of the Omi community! |
Skip legacy SD-card listing (
SDCardWalSync) and legacy storage commands (0/1) when connected to a ring-buffer firmware device (>= 3.0.20), while preserving cached SD recordings when the device detaches.Root Cause
>= 3.0.20),storageReadControlCharacteristicUuid(0x30231002-...) returns the 16-byte ring status[used_bytes, unread_packets, free_bytes, rtc_valid]rather than legacy SD-card[totalBytes, storageOffset, listedStart]. WhenSDCardWalSync._getMissingWals()ran against a raw'Unknown'connect object before firmware resolution, it could interpretused_bytesandunread_packetsas a legacyfileNum: 1SD-card recording (WalStorage.sdcard).OmiDeviceConnection.performWriteToStoragecould still send legacy SD-card read/delete commands (command == 0 || command == 1) when the connection was initialized with a raw'Unknown'firmware revision.Changes
app/lib/services/wals/wal_syncs.dart&app/lib/services/wals/sdcard_wal_sync.dart:_sdcardSync.setFirmwareVersion(...)insetDevice()andrefreshWalsFromDevice(), while resetting_firmwareVersionon detach so cached legacy SD recordings stay visible when disconnected._getMissingWals(),deleteWal(),syncAll(), andsyncWal()on ring-buffer firmware (both viasetFirmwareVersion/device.firmwareRevisionand aftergetDeviceInfo/connection.lastRingInforesolution when raw discoveryfirmwareRevisionis'Unknown').app/lib/services/devices/connectors/omi_connection.dart:performWriteToStorageagainst sending legacy SD-card read/delete commands (command == 0 || command == 1) when connected to a ring-buffer device, resolvingfirmwareRevisionfrom DIS when the connection object still holds'Unknown'.app/test/unit/sdcard_legacy_sync_test.dart:lastRingInfodiscovery on'Unknown'devices) andOmiDeviceConnection.performWriteToStoragecommand0/1refusal on ring-buffer firmware.app/changelog/unreleased/fix-sdcard-ring-buffer-phantom-sync-24663.json:Product invariants affected
UI-Evidence: none
Fixes #24663