Surfaced during the max-effort code review of PR #46 (default fetch-all history + device-only retention). Below the cut of the reported/fixed findings — filed for tracking.
Problem.SyncScheduler enqueues the periodic sync, backfill, and prune workers with ExistingPeriodicWorkPolicy.KEEP. On an already-installed device, a future app version that changes a worker's interval or constraints will not apply the change — WorkManager keeps the previously-enqueued request.
Impact. Maintainability/upgrade correctness: tuning a cadence or constraint won't reach existing installs. Pre-existing pattern (also used by the original periodic sync); low priority.
Suggested fix. Use ExistingPeriodicWorkPolicy.UPDATE (AndroidX WorkManager 2.8+), or version the unique-work name so a changed schedule replaces the old one on upgrade.
_Surfaced during the max-effort code review of PR #46 (default fetch-all history + device-only retention). Below the cut of the reported/fixed findings — filed for tracking._
**Problem.** `SyncScheduler` enqueues the periodic sync, backfill, and prune workers with `ExistingPeriodicWorkPolicy.KEEP`. On an already-installed device, a future app version that changes a worker's interval or constraints will not apply the change — WorkManager keeps the previously-enqueued request.
**Location.** `app/src/main/kotlin/org/libremail/data/sync/SyncScheduler.kt` (`schedulePeriodicSync` / `schedulePeriodicBackfill` / `schedulePeriodicPrune`).
**Impact.** Maintainability/upgrade correctness: tuning a cadence or constraint won't reach existing installs. Pre-existing pattern (also used by the original periodic sync); low priority.
**Suggested fix.** Use `ExistingPeriodicWorkPolicy.UPDATE` (AndroidX WorkManager 2.8+), or version the unique-work name so a changed schedule replaces the old one on upgrade.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Surfaced during the max-effort code review of PR #46 (default fetch-all history + device-only retention). Below the cut of the reported/fixed findings — filed for tracking.
Problem.
SyncSchedulerenqueues the periodic sync, backfill, and prune workers withExistingPeriodicWorkPolicy.KEEP. On an already-installed device, a future app version that changes a worker's interval or constraints will not apply the change — WorkManager keeps the previously-enqueued request.Location.
app/src/main/kotlin/org/libremail/data/sync/SyncScheduler.kt(schedulePeriodicSync/schedulePeriodicBackfill/schedulePeriodicPrune).Impact. Maintainability/upgrade correctness: tuning a cadence or constraint won't reach existing installs. Pre-existing pattern (also used by the original periodic sync); low priority.
Suggested fix. Use
ExistingPeriodicWorkPolicy.UPDATE(AndroidX WorkManager 2.8+), or version the unique-work name so a changed schedule replaces the old one on upgrade.