Repository navigation
fix(app): centralize recording sync recovery - #9763
Merged
Git-on-my-level merged 7 commits intoJul 15, 2026
Merged
Conversation
Remove CaptureController's delayed startup recovery wake because proxy-provider updates can repeat it after the coordinator has completed a pass. Add a fake-async regression test that repeated external-action updates do not schedule recovery timers. Verification: - cd app && flutter test test/providers/capture_provider_test.dart test/services/wals/recording_transfer_coordinator_test.dart - cd app && bash test.sh - cd app && ./scripts/analyze_ratchet.sh - make preflight - scripts/pr-preflight --pr-body-file /tmp/omi-9752-pr-body.md
Delay startup recovery until persisted phone WALs are loaded and prevent background lifecycle events from beginning a recovery pass. Regression tests hold readiness behind a completer and prove background connectivity waits for foreground. Verification: - cd app && flutter test test/providers/sync_provider_startup_reconciliation_test.dart test/services/wals/recording_transfer_coordinator_test.dart test/providers/capture_provider_test.dart - cd app && bash test.sh - cd app && ./scripts/analyze_ratchet.sh - make preflight - scripts/pr-preflight --pr-body-file /tmp/omi-9752-pr-body.md
Capture the Flutter JSON reporter and complete console output when the test step fails, then summarize failed test names in the GitHub Actions job summary. Verification: cd app && bash test.sh --reporter expanded --file-reporter json:/tmp/omi-flutter-test-results.json (813 passed); bash -n app/test.sh; Ruby YAML parse; make preflight.
UI syncWal bypassed the coordinator after 202 uploads, so uploaded WALs never reconciled until an incidental wake. Also process conversation results before surfacing partial upload failures, reconcile before retry on failed drains, and treat contended drains as retryable instead of success. Co-authored-by: Cursor <[email protected]>
Prevent UI single-WAL sync from racing an in-flight coordinator drain, and await LocalWalSync stop in walReady teardown so concurrent Flutter CI no longer flakes. Co-authored-by: Cursor <[email protected]>
Git-on-my-level
deleted the
codex/issue-9752-recording-recovery-coordinator
branch
July 15, 2026 02:06
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
RecordingTransferCoordinatoras the single foreground owner for recording recovery wakes.Root cause and durable guard
Recovery ownership was split:
CaptureControllerretried only orphan WALs when startup had been skipped,SyncReconcileronly polled uploaded jobs, andSyncProviderseparately auto-drained phone files. Consequently, restoring connectivity after a successful startup pass did not drain retryable WALs until an incidental device reconnect.This PR makes the coordinator the authoritative wake owner and adds a hermetic production-coordinator harness covering connectivity recovery, post-startup recovery, singleflight coalescing, retryable failures, restart backlog recovery, preference gating/user retry, uploaded-job ordering, and background cooldown cancellation.
The coordinator's post-configuration wake is the sole startup emitter.
CaptureControllerno longer schedules recovery from proxy-provider external-action updates; a fake-async regression test proves repeated updates add no delayed startup timers. Startup waits for the persisted phone-WAL readiness barrier before the coordinator attaches, and background lifecycle state prevents connectivity/device recovery wakes from starting discovery or a drain until foregrounded.Recurrence evidence: #7373, #9471, and the stranded-backlog aspect of #7240.
Verification
cd app && flutter test test/services/wals/recording_transfer_coordinator_test.dartcd app && flutter test test/providers/sync_provider_startup_reconciliation_test.dart test/services/wals/recording_transfer_coordinator_test.dart test/providers/capture_provider_test.dartcd app && bash test.sh(813 tests passed)cd app && flutter test test/widgets/transcript_test.dartcd app && ./scripts/analyze_ratchet.shmake preflightI could not perform the required physical-device airplane-mode flow: this Mac has no connected Omi device and no iOS/Android emulator. The PR does not claim that hardware verification occurred.
Scope
Closes #9752.
Does not close #9471, #7240, or #7221. No backend, protocol, persistence-schema, or OS background-execution changes.