Isolate unexpected Web Push device failures #655

Closed
opened 2026-08-12 13:50:56 +00:00 by timmy · 0 comments
Owner

Problem

dispatch_unread_updates awaits per-device jobs with fail-fast asyncio.gather. An unexpected validator, checkpoint, or device-specific runtime failure can abort the poll while a healthy sibling delivery is still running, release the global dispatch lease prematurely, and leave healthy work vulnerable to duplicate dispatch. Ordinary provider failures are isolated, but exceptions outside the existing send handlers are not.

User impact

One broken mobile push subscription must not delay or duplicate notifications for every other signed-in device.

Acceptance criteria

  • An unexpected failure for one device does not abort healthy sibling delivery.
  • The global dispatch lease remains held until every started device job settles.
  • Healthy devices checkpoint successfully; the failed device remains retryable.
  • A later poll retries only the failed device without duplicating the healthy push.
  • Unsafe endpoint deletion and cancellation behavior remain unchanged.
  • Focused and full test suites pass.

Non-duplication evidence

Complete issue/PR title history and recent commits were reviewed. #551/#552 added the global lease, #557/#558 bounded fan-out and handled provider failures, and #653/#654 added endpoint validation. None isolates unexpected exceptions escaping a per-device job.

## Problem `dispatch_unread_updates` awaits per-device jobs with fail-fast `asyncio.gather`. An unexpected validator, checkpoint, or device-specific runtime failure can abort the poll while a healthy sibling delivery is still running, release the global dispatch lease prematurely, and leave healthy work vulnerable to duplicate dispatch. Ordinary provider failures are isolated, but exceptions outside the existing send handlers are not. ## User impact One broken mobile push subscription must not delay or duplicate notifications for every other signed-in device. ## Acceptance criteria - An unexpected failure for one device does not abort healthy sibling delivery. - The global dispatch lease remains held until every started device job settles. - Healthy devices checkpoint successfully; the failed device remains retryable. - A later poll retries only the failed device without duplicating the healthy push. - Unsafe endpoint deletion and cancellation behavior remain unchanged. - Focused and full test suites pass. ## Non-duplication evidence Complete issue/PR title history and recent commits were reviewed. #551/#552 added the global lease, #557/#558 bounded fan-out and handled provider failures, and #653/#654 added endpoint validation. None isolates unexpected exceptions escaping a per-device job.
timmy self-assigned this 2026-08-12 13:50:56 +00:00
timmy closed this issue 2026-08-12 13:55:57 +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#655
No description provided.