Repository navigation
Conversation
There was a problem hiding this comment.
All reported issues were addressed across 14 files
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
|
Verdict: this is a correct, well-scoped fix for #24777 — waiting recordings reappear for the same account after an app update or sign-out/sign-in — and the root-cause analysis matches the code. Before merge it needs CI green on this head and a maintainer sign-off on the custody semantics (end of comment). What I verified across the 14 files:
Notes:
USER IMPACT: recordings waiting to be transcribed no longer vanish from Home after an app update or after signing back into the same account. What I'd still want:
Human maintainer sign-off needed before merge: this changes multi-account recording custody on the WAL ledger, and there is no CI evidence on this head yet. 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! |
Builds on the closed, unmerged BasedHardware#24845 and adds sign-out read fencing, retained job receipts and persistence verification. Co-authored-by: cocvn157 <[email protected]>
Description
Fixes #24777
/claim #24777
Addresses the issue where local waiting recordings ("Transcribe Later" / pending WALs) disappear from Home after an app update and subsequent sign-in to the same account.
Root Cause & Changes
Singleton Ledger Rehydration After Signed-Out Cold Start or Re-Authentication (
wal_account_purge.dart,local_wal_sync.dart,wal_interfaces.dart,wal_syncs.dart):LocalWalSyncImpl,LocalRecordingsProvider, andSyncProviderare singletons created at app startup beforeOnboardingWrapperorAppShellcompletes authentication.clearUserData()and signs back in with the same account),_admitLoadedWals()parks account-stamped WALs in_foreignWals(orclearUserData()moves them to_retiredWals), andNativeRecordingIntake.scan()returns early whileuidis empty._reconcileCurrentOwnerSync()andrehydrateForCurrentUser()so once the user is signed in, active (_wals), foreign (_foreignWals), and retired (_retiredWals) buckets are reconciled for the current account while foreign accounts' WALs remain isolated.Pre-Upgrade Unstamped Index Entries in Native Intake (
native_recording_intake.dart,on_device_overflow_intake.dart,local_recordings_provider.dart):NativeRecordingIntake._scan()encountered a.binfile already indexed inwals.jsonfrom before the owner-stamping upgrade (existing != nullwithexisting.ownerUid == null), it skipped owner resolution (continue;) and deletedomibatch_owners.json, whileLocalRecordingsProvider._readLedger()skipped any WAL withwal.ownerUid == null.NativeRecordingIntake._scan()andintakeOnDeviceOverflow()to resolve and persistexisting.ownerUidwhenexisting.ownerUid == null || existing.ownerUid == 'legacy'before retiringomibatch_owners.json.LocalRecordingsProvider._readLedger()to guard against foreign owners while allowing non-batch legacy records when signed in.Post-Auth Provider Refresh & Sign-Out Preference Retention (
wrapper.dart,app_shell.dart,home/page.dart,sign_out.dart):LocalRecordingsProvider.refresh()andSyncProvider.refreshWals()on sign-in inOnboardingWrapper,AppShell._initializeProviders(), andHomePage.initState().batchAudioDir,localRecordingJobs, andlocalRecordingJobsCorruptacrossclearPreferencesForSignOut()so un-migrated local recording job receipts on disk are not lost on sign-out.Tests & Changelog:
app/test/unit/local_wal_sync_owner_uid_test.dartandapp/test/unit/local_recordings_owner_test.dart.app/changelog/unreleased/20261107-rehydrate-waiting-recordings-after-signin.json.Product invariants affected
UI-Evidence: none -- Custody rehydration and provider refresh fix; no visual UI design changes.