Drain closed-app queued work concurrently without failure starvation #297

Closed
opened 2026-08-08 11:49:21 +00:00 by timmy · 0 comments
Owner

Problem

When connectivity returns after an operator queues several issues or replies offline and closes the app, Background Sync delivers records serially and aborts on the first transient failure. One slow or unavailable repository can strand unrelated queued work within the browser's bounded sync window.

Slice

  • Claim a finite, fair batch across issue and authored-message lanes.
  • Drain it with bounded concurrency.
  • Attempt each eligible record at most once per sync event.
  • Continue unrelated delivery after transient failures while preserving claim release, receipts, and idempotency keys.
  • Stop admission on authentication loss.

Acceptance

  • Delayed records execute concurrently without exceeding the configured bound.
  • A transiently failing record is released while healthy records in both lanes are delivered and receipted.
  • No record is retried in the same sync event.
  • Authentication loss stops new work and releases affected claims.
  • Focused tests and full suite pass.

Implementation must use strict test-first RED/GREEN and close this issue through a linked PR.

## Problem When connectivity returns after an operator queues several issues or replies offline and closes the app, Background Sync delivers records serially and aborts on the first transient failure. One slow or unavailable repository can strand unrelated queued work within the browser's bounded sync window. ## Slice - Claim a finite, fair batch across issue and authored-message lanes. - Drain it with bounded concurrency. - Attempt each eligible record at most once per sync event. - Continue unrelated delivery after transient failures while preserving claim release, receipts, and idempotency keys. - Stop admission on authentication loss. ## Acceptance - Delayed records execute concurrently without exceeding the configured bound. - A transiently failing record is released while healthy records in both lanes are delivered and receipted. - No record is retried in the same sync event. - Authentication loss stops new work and releases affected claims. - Focused tests and full suite pass. Implementation must use strict test-first RED/GREEN and close this issue through a linked PR.
timmy self-assigned this 2026-08-08 11:49:21 +00:00
timmy closed this issue 2026-08-08 11:57:10 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: stackchain/stackchain-dashboard#297
No description provided.