Make unread Web Push delivery multi-worker safe #551

Closed
opened 2026-08-11 07:19:34 +00:00 by timmy · 0 comments
Owner

Problem

Every app worker starts the unread Web Push poller, while the current store only reads unseen work before delivery. Concurrent workers can send the same notification, and one transient endpoint failure aborts delivery to healthy subscriptions.

Slice

Add a durable, lease-fenced claim for each polling cycle, isolate endpoint failures, enforce a per-send timeout, and keep abandoned work recoverable after lease expiry. Preserve expired-subscription cleanup and privacy-safe payloads.

Acceptance criteria

  • Two stores sharing one SQLite database cannot concurrently own push dispatch.
  • An expired lease can be reclaimed; stale owners cannot release a successor lease.
  • A transiently failing or timed-out endpoint does not block healthy devices in the same poll.
  • 404/410 still removes expired subscriptions.
  • New push state storage uses private directory/database permissions.
  • Focused behavioral tests and the full suite pass.
## Problem Every app worker starts the unread Web Push poller, while the current store only reads unseen work before delivery. Concurrent workers can send the same notification, and one transient endpoint failure aborts delivery to healthy subscriptions. ## Slice Add a durable, lease-fenced claim for each polling cycle, isolate endpoint failures, enforce a per-send timeout, and keep abandoned work recoverable after lease expiry. Preserve expired-subscription cleanup and privacy-safe payloads. ## Acceptance criteria - Two stores sharing one SQLite database cannot concurrently own push dispatch. - An expired lease can be reclaimed; stale owners cannot release a successor lease. - A transiently failing or timed-out endpoint does not block healthy devices in the same poll. - 404/410 still removes expired subscriptions. - New push state storage uses private directory/database permissions. - Focused behavioral tests and the full suite pass.
timmy self-assigned this 2026-08-11 07:19:34 +00:00
timmy closed this issue 2026-08-11 07:27:56 +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#551
No description provided.