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

Merged
timmy merged 1 commits from timmy/297-bounded-background-drain into main 2026-08-08 11:57:10 +00:00
Owner

Closes #297

What changed

  • atomically claim one finite batch, alternating issue and authored-message lanes
  • drain with a three-worker concurrency bound and stable idempotency keys
  • continue healthy deliveries after transient failures, then reject the sync for retry
  • stop admission on 401 and release unstarted claims
  • reuse one session-bound CSRF proof across the drain

Verification

  • RED observed for bounded concurrency/failure isolation, fair batch claims, auth-loss admission stop, CSRF reuse, and cache revision
  • pytest -q tests/test_background_issue_sync.py tests/test_service_worker.py — 40 passed
  • pytest -q — 528 passed
  • node --check frontend/background-issue-sync.js
  • node --check frontend/service-worker.js
Closes #297 ## What changed - atomically claim one finite batch, alternating issue and authored-message lanes - drain with a three-worker concurrency bound and stable idempotency keys - continue healthy deliveries after transient failures, then reject the sync for retry - stop admission on 401 and release unstarted claims - reuse one session-bound CSRF proof across the drain ## Verification - RED observed for bounded concurrency/failure isolation, fair batch claims, auth-loss admission stop, CSRF reuse, and cache revision - `pytest -q tests/test_background_issue_sync.py tests/test_service_worker.py` — 40 passed - `pytest -q` — 528 passed - `node --check frontend/background-issue-sync.js` - `node --check frontend/service-worker.js`
timmy added 1 commit 2026-08-08 11:56:23 +00:00
perf: drain background outbox concurrently (#297)
All checks were successful
CI / lint (pull_request) Successful in 27s
CI / build-frontend (pull_request) Successful in 4s
43c7a85eec
timmy merged commit 207df76b69 into main 2026-08-08 11:57:10 +00:00
Sign in to join this conversation.
No reviewers
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#298
No description provided.