Repository navigation
fix(sync): recover waiting recordings at startup before another upload - #23233
Conversation
Refs #23223 Failure-Class: FC-sync-gated-on-consumer-trigger
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Verdict: the production change is correct and well scoped; nothing blocking from my side — leaving for human maintainer review before merge. The bug: at startup the coordinator could reconcile/discover while
Security/privacy: the generation binding closes a real cross-account window (an old pass reconciling results into a replacement account) — covered by the replacement-account regression. Performance: one extra reconcile/discovery pass at startup; no new per-call queries. Cost: none. USER IMPACT: when you reopen Omi, recordings that finished processing while the app was closed appear (and the On the Way queue updates) without needing a new upload to trigger it; pending device recordings are discovered at startup even with auto-upload off. Nothing blocking. Optional follow-up: assert the auto-sync opt-in path ( by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
kodjima33
left a comment
There was a problem hiding this comment.
Trusted contributor bug fix (startup sync admission), scores ~4/5 (diff >300 lines is the only miss, tests present, CI green), but mergeStateStatus is DIRTY — per no-rebase hard rule, holding at approve rather than merging.
Preserve the current dismissal controls and the system-back guard. Focused provider/coordinator/navigation verification: 45 tests passed; analyzer ratchet passed. Full-suite and final-head CI verification remain in progress; keep draft.
|
The production change here is correct and nicely scoped — admission is bound before any async yield and every recovery path is generation-fenced; no blocking issues found.
UX: reopening the app now surfaces completed syncs and runs device discovery without another upload first; genuinely queued jobs stay pending — no duplicate uploads, and auto-sync opt-out is still respected. USER IMPACT: recordings that finished syncing while the app was closed now appear when you reopen it, instead of waiting for the next upload. Still wanted before merge: full-suite CI confirmation on the final commit (the checklist itself flags this), and flipping the PR out of draft once that's green — the merged head is already green on Dart Analyze & Tests and Android Emulator Acceptance. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
|
Merged current main ( The only conflict was in Checks after the merge:
The PR diff against main is unchanged: the same 8 files. |
Final merge acceptance — 2026-10-23
Final diff reviewed at
970d03e6e77ed0c65a2a97b9e77eab47660f6611. Aryan explicitly accepts appropriate simulator/local integration evidence for Omi; the earlier physical-only merge prerequisites below are superseded, not represented as completed physical testing.cd app && flutter test --no-pub --concurrency 1 --reporter expanded test/providers/sync_provider_background_admission_test.dart test/providers/sync_provider_startup_reconciliation_test.dart test/providers/sync_provider_session_generation_test.dart test/services/wals/recording_transfer_coordinator_test.dart test/widgets/trial_paywall_navigation_test.dart.app/iosandpubspec.lockmatch the previously compiled shell's source; the only pubspec difference is removal of bundled fonts, covered by fresh assets. No new full native-build claim. Simulator BGTaskScheduler scheduling was unavailable, as expected; no physical/background-execution evidence is claimed.Merge is separate from release and customer resolution. Refs #23223 stays open pending release and customer outcome. No deployment, customer-account access, recording deletion or production job mutation is authorized/performed by this verification. Final current-head required checks and approval are rechecked immediately before merge.
On relaunch, the transfer coordinator can reconcile an uploaded recording while
SyncProvider._admittedWorkGenerationis still -1: the returned completed conversation is not surfaced, device discovery is skipped, and recovery depends on another upload starting first. Refactoring native keep-alive acquisition alone would also risk admitting an old account after an asynchronous lease wait.The existing coordinator now admits a transfer synchronously before native acquisition. Native lease holds for abandoned bodies do not re-admit work. Reconciliation, discovery, inventory refresh, reconnect retry resets and drains use the admitted account generation. A reconcile pass snapshots its conversation callback with its phone owner, so reattachment cannot deliver an old result into a replacement callback. Auto-sync opt-out remains respected; genuinely queued jobs remain pending with their original handles.
Refs #23223. The Discord screenshot (381 recordings / 42 hours / nine almost ready) shows On the Way, not the on-device transcription banner. These are reproduced code defects, not a confirmed diagnosis or recovery of that account's backlog. #22484 is the existing merged missing-handle/poll-order fix; #21999 is a separate open proposal for legacy sequenced jobs and does not establish this account's cause.
Validation:
a8fdd3889dand pass after the fix: completed-conversation delivery before a new upload, startup device discovery, account replacement during native acquisition, and callback replacement during a status read.trial_paywall_freewidget; it also failed with all three production sync files restored to unchanged main. A separate test-only commit exercises system back and the actual close control, retaining restore/no-pop/late-completion assertions. All four navigation tests and the final full suite pass; paywall production code is unchanged.07ea53ac7898e859f492aa81d4adc257e654f942, checked 2026-10-23 through Code Review: Dart Analyze & Tests, Android compile/emulator/JVM, metadata, hygiene, formatting and backend merge gate pass; no failed or running checks remain. iOS compile and seeded-journey lanes were skipped; local hermetic journeys above are separate evidence. Cubic reported its review quota exhausted, which is not a completed independent review.TZ=UTC bash app/test.sh;(cd app && flutter test test/widgets/trial_paywall_navigation_test.dart);(cd app && flutter test test/providers/sync_provider_background_admission_test.dart test/providers/sync_provider_startup_reconciliation_test.dart test/providers/sync_provider_session_generation_test.dart test/services/wals/recording_transfer_coordinator_test.dart);(cd app && bash scripts/analyze_ratchet.sh);make mobile-verify ARGS="fast --paths app/lib/providers/sync_provider.dart app/lib/services/wals/recording_transfer_coordinator.dart app/lib/services/wals/sync_reconciler.dart";make preflight.Release and limits:
1.0.570+1430,b859b78f821217c0df0082359cbcf70b6f29987d) includes fix(app): confirm missing sync jobs across restarts; dead backlogs no longer starve new uploads #22484 by commit ancestry. The public page does not expose the binary build number, and the customer's installed build is unverified; later TestFlight artifacts are not a public release.app/docs/offline-sync-stall-recovery.md, startup transfer admission.Product invariants affected
app/lib/services/capture/OWNERSHIP.mddefines pre-await generation capture and owner-ready recovery.Failure-Class: FC-sync-gated-on-consumer-trigger
UI-Evidence: none -- startup/session wiring only; no widget layout or user-facing copy changes. Existing On the Way transition is tested through the real provider; no physical-device or native-build qualification is claimed.
Merge verification gate
Marked ready for code review on 2026-10-23 at Aryan's request. The former physical-only gate is superseded by the final simulator-first acceptance above; current-commit CI and independent approval still apply. Passing automated CI does not establish recovery of this customer’s recordings.
2026-10-23 maintainer review and merge gates
Main integration conflict resolved without dropping system-back coverage; pushed c4aa08b. The 45 focused provider/coordinator/navigation tests, analyzer ratchet, 24 selected preflight checks and 23 hermetic cases across six mobile journeys pass. The bounded full Flutter run completed with 7,123 passed, 9 skipped and one failure in the unchanged Siri cooldown timing test. That file and service match main; its isolated suite then passed all 28 tests. This is not a green full-suite claim: the timing failure is tracked in #23380. Exact-head GitHub checks were green at the final review snapshot. The former installed-phone prerequisite is superseded by the final simulator-first acceptance above. Customer-specific verification remains post-release follow-up, not a claim of recovery. No recordings, customer account, or production jobs were changed. Current main was merged again in 970d03e (docs-only conflict).