Skip to content

Offline queue edge cases: 5xx entries retry forever; sign-out mid-flush can send under the next account #156

Description

@Muawiya-contact

Two offline-queue replay edges (#133):

(a) Unbounded 5xx retry. On status >= 500 the entry is kept and re-attempted on every reconnect and every app foreground, with no attempt counter, backoff, or TTL — plus a full /me/state fetch each time. A persistently-500ing slug fires forever. (Note: coalescing bounds entry count, learn staleness and 4xx-drop are handled — this is the remaining unbounded-retry hazard.)

  • mobile/src/services/remoteProgressRepository.tsflushQueue 5xx continue; ProgressContext.tsx foreground/connectivity triggers.

(b) Sign-out mid-flush cross-account send (privacy). flushQueue checks epoch only at the top of each loop iteration and before the final reconcile. If forget() (sign-out / expired-token SIGNED_OUT) runs while a replay() is in flight, that request still completes and getAccessToken() returns the now-current session — so a queued mutation from account A can be POSTed under account B’s token before the next epoch check aborts. Narrow (one-mutation window) but real on a shared device.

Suggested direction — (a) per-entry attempt/first-seen timestamp; drop or back off after N tries / age. (b) re-check epoch immediately after each await this.replay(...) before treating it as applied, and/or thread an epoch-keyed abort signal into the in-flight request.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions