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.MailBackfiller.reachedRetentionFloor (age branch) stops paging once oldestSyncedTimestamp(folder) < cutoff. Backfill pages by UID (≈ arrival order), but the age floor is by the message Date header. A single message with a high UID but an old Date (e.g. moved/imported mail) can drag oldestSyncedTimestamp below the cutoff prematurely, so backfill stops before it has cached all messages that are actually within the age window, leaving a gap.
Impact. Under-fetch: some within-retention history for a folder is never cached. Low probability (needs Date/UID inversion) and no data loss (server copy intact).
Suggested fix. Base the age-floor decision on the batch actually fetched (e.g. stop only once a full page is entirely older than the cutoff), or reconcile against the server's within-window count, rather than the single oldest cached timestamp.
_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.** `MailBackfiller.reachedRetentionFloor` (age branch) stops paging once `oldestSyncedTimestamp(folder) < cutoff`. Backfill pages by UID (≈ arrival order), but the age floor is by the message Date header. A single message with a high UID but an old Date (e.g. moved/imported mail) can drag `oldestSyncedTimestamp` below the cutoff prematurely, so backfill stops before it has cached all messages that are actually within the age window, leaving a gap.
**Location.** `app/src/main/kotlin/org/libremail/data/sync/MailBackfiller.kt` (`reachedRetentionFloor`).
**Impact.** Under-fetch: some within-retention history for a folder is never cached. Low probability (needs Date/UID inversion) and no data loss (server copy intact).
**Suggested fix.** Base the age-floor decision on the batch actually fetched (e.g. stop only once a full page is entirely older than the cutoff), or reconcile against the server's within-window count, rather than the single oldest cached timestamp.
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.
MailBackfiller.reachedRetentionFloor(age branch) stops paging onceoldestSyncedTimestamp(folder) < cutoff. Backfill pages by UID (≈ arrival order), but the age floor is by the message Date header. A single message with a high UID but an old Date (e.g. moved/imported mail) can dragoldestSyncedTimestampbelow the cutoff prematurely, so backfill stops before it has cached all messages that are actually within the age window, leaving a gap.Location.
app/src/main/kotlin/org/libremail/data/sync/MailBackfiller.kt(reachedRetentionFloor).Impact. Under-fetch: some within-retention history for a folder is never cached. Low probability (needs Date/UID inversion) and no data loss (server copy intact).
Suggested fix. Base the age-floor decision on the batch actually fetched (e.g. stop only once a full page is entirely older than the cutoff), or reconcile against the server's within-window count, rather than the single oldest cached timestamp.