Repository navigation
fix(app): soft-retry leave/background offline upload aborts (#4587) - #11166
Conversation
…dware#4587) Leaving the sync page or backgrounding mid-upload aborts multipart sockets (ClientSoftware connection abort). Those batches already leave WALs as miss; stop painting SyncStatus.error and re-arm coordinator recovery instead. Co-authored-by: Cursor <[email protected]>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
All reported issues were addressed across 4 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Distinguish permanent local upload refusals from transient leave/background aborts so 400/413 still surface SyncStatus.error. Match only the full "software caused connection abort" phrase. Do not double-wake cooldown on coordinator drains (rethrowOnError) or after soft-retry syncWal. Co-authored-by: Cursor <[email protected]>
|
Addressed all four cubic findings on the new tip: P1 — no double cooldown wake: local-failure / transient soft paths wake only when P2 — ClientSoftware token: P2 — permanent refusals: batch catch now tracks P3 — wake assertion: regression test expects exactly
|
|
Thanks @aryanorastar — solid fix for #4587. The approach is well-scoped and the reasoning is sound:
A couple of things worth a human maintainer's eye before merge:
No security, privacy, or dependency concerns. Checks are green. Leaving a positive signal — requesting a maintainer's final product/UX judgment before merge since the on-device confirmation is still outstanding. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
|
@mdmohsin7 all required checks are green on the current head (fa7750c), and @Git-on-my-level left a positive signal after the cubic follow-up hardening.\n\nThis is now only waiting on code-owner approval.\n\nCould you please take a quick review pass and approve if it looks good? |
kodjima33
left a comment
There was a problem hiding this comment.
Leave/background mid-upload now soft-retries instead of painting a terminal Processing Failed; 7 passing tests.
Summary
ClientSoftware caused connection abortred error (Offline sync errors if I leave offline sync page #4587).syncProcessingBackgroundHint), but architecture is foreground-only. OS aborts in-flight multipart; batches incrementlocalUploadFailuresand correctly leave WALs asmiss, thenSyncProvider._performSyncfail-closed withtoError.localUploadFailures > 0→toIdle+ cooldown wake (matches schema: retryable, re-arm recovery — not completed, not terminal error). Transient network catch (incl. connection abort / ClientSoftware) same soft path. No FGS/Workmanager.Test plan
flutter test test/providers/sync_provider_sync_wal_wake_test.dart test/unit/transient_network_error_test.dart→ 7 passedFailure-Class: none
Fixes #4587