Skip to content

fix(app): let Transfer to Phone move a Limitless recording after the pendant is listed again - #22895

Merged
kodjima33 merged 1 commit into
BasedHardware:mainfrom
sauranshbhardwaj:fix/limitless-transfer-after-relisting
Oct 21, 2026
Merged

kodjima33 merged 1 commit into
BasedHardware:mainfrom
sauranshbhardwaj:fix/limitless-transfer-after-relisting

Conversation

@sauranshbhardwaj

@sauranshbhardwaj sauranshbhardwaj commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

What's wrong

Transfer to Phone on a Limitless recording fails with "Device recording list changed; go back and try again" whenever the pendant has been listed again since the recording page opened. The page passes the Wal it was opened with, and FlashPageWalSyncImpl.syncWal looked it up by object:

// app/lib/services/wals/flash_page_wal_sync.dart
final matches = _wals.where((w) => w == wal).toList();
if (matches.isEmpty) throw Exception('Device recording list changed; go back and try again');

Wal has no value equality, and the flash-page list is rebuilt with new Wal objects on connect, on every discovery wake and after each sync pass. Since #22417 the relisted recording keeps its id, so the page and the list name the same recording, but the lookup by object misses it. Going back and trying again only works until the next wake.

This is the instance of FC-wal-lookup-by-object-misses-rebuilt-list that #22414 fixed for the SD card sync, on the Limitless side. deleteWal in the same file already matches by id.

page opened before before after
no relisting transfers transfers
a discovery wake or reconnect (same recording, same id) "Device recording list changed" transfers the listed recording
the recording left the list (transferred or deleted elsewhere) fails fails, pendant not touched

Change

syncWal matches by id and storage, as the SD card sync does, and runs the transfer and its state changes on the listed entry, which is the one the sync pages read. A recording that is no longer listed still throws, so the page never reports a transfer that did not happen.

Tests

test/unit/legacy_storage_limitless_seam_test.dart:

  • "Limitless: Transfer to Phone moves a recording opened before the pendant was listed again" (fails on main with the exception above).
  • "Limitless: Transfer to Phone fails for a recording that is no longer listed" (the pendant is never put in batch mode).

flutter test test/unit/legacy_storage_limitless_seam_test.dart test/unit/flash_page_wal_listing_test.dart test/unit/flash_page_stall_classification_test.dart: 24 passed. Full bash test.sh: 6,744 passed, 23 skipped, exit 0.

Product invariants affected

  • INV-CAP-1: path match only (app/lib/services/wals/flash_page_wal_sync.dart). Only which listed entry a transfer runs on changes. Audio is still ACKed off the pendant only after it is saved on the phone, a cancelled or stalled transfer still keeps the recording on the pendant, and an unlisted recording never starts a transfer.

UI-Evidence: none -- no new UI; the existing Transfer to Phone result is now correct, and the seam test drives the real transfer path with a fake pendant.

Failure-Class: FC-wal-lookup-by-object-misses-rebuilt-list

View guided diff

…pendant is listed again

FlashPageWalSyncImpl.syncWal looked the recording up by object in its list.
That list is rebuilt with new Wal objects when the pendant connects, on
every discovery wake and after each sync pass, while the recording page
keeps the Wal it was opened with. Since BasedHardware#22417 the relisted recording keeps
its id, but the lookup by object still found nothing, so Transfer to Phone
failed with "Device recording list changed; go back and try again" for a
recording that was still listed.

Match by id and storage, as deleteWal and the SD card sync (BasedHardware#22414) do, and
run the transfer on the listed entry. A recording that is no longer listed
still fails without asking the pendant for audio.
@Git-on-my-level Git-on-my-level added positive-signal Automation verified a genuine fix/quality contribution flutter flutter work labels Oct 20, 2026
@Git-on-my-level

Copy link
Copy Markdown
Member

The fix is correct and nicely scoped — matching the relisted recording by id instead of object identity, with the failure path preserved. Nothing blocking.

  • app/lib/services/wals/flash_page_wal_sync.dart — syncWal now resolves walToSync via w.storage == wal.storage && w.id == wal.id instead of object equality. Verified the premise in the surrounding code: Wal has no operator ==, and _getMissingWals (~line 182) rebuilds _wals with fresh Wal objects on every discovery wake/connect/sync pass while deliberately carrying over timerStart — and id is device_timerStart — for the same backlog. So the old w == wal lookup could only succeed until the first relist. The id match mirrors deleteWal (line 140) and the SD-card sync convention, and running the transfer on the listed entry means isSyncing/status land on the object the sync pages actually read.
  • app/test/unit/legacy_storage_limitless_seam_test.dart — the right pair of tests: the relist case (opened vs listed instances; asserts the listed entry ends synced and the pendant acks page 0) and the not-listed case (still throws; card.batchMode stays false so the pendant is never asked for audio).
  • app/changelog/unreleased/20261020-limitless-transfer-after-relisting.json — accurate, user-facing wording.

Blast radius: if the id match ever missed, the failure mode is the same exception as today — no new data-loss path. No new surfaces; pure lookup change inside the existing BLE sync path.

USER IMPACT: Transfer to Phone on a Limitless recording now succeeds even if the pendant reconnected or woke since the recording page was opened, instead of failing with "Device recording list changed".

Nothing further needed from my side — leaving the merge call with the requested maintainer.


by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.

@kodjima33 kodjima33 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Scoped bug fix: WAL lookup by object identity misses rebuilt list after pendant relist/reconnect; now matches by id+storage like deleteWal already does. Test reproduces failure on main, CI green.

@kodjima33
kodjima33 merged commit 3f54aba into BasedHardware:main Oct 21, 2026
47 of 48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

flutter flutter work positive-signal Automation verified a genuine fix/quality contribution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants