Make Web Push pagination-complete and reconcile unread delivery state #573

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

Problem

Web Push polling and subscription baselining read only the first 50 unread Gitea notifications. Operators with larger inboxes can receive stale pre-subscription threads as “new” when pagination shifts, while the per-device delivery ledger grows for the lifetime of a subscription.

Vertical slice

  • Build a bounded, deadline-aware complete unread snapshot across Gitea notification pages.
  • Use the complete snapshot for both subscription baselining and recurring push dispatch.
  • Reconcile delivery checkpoints only after a complete successful snapshot; partial scans must fail closed without sending or pruning.

Acceptance tests

  • A 125-thread, three-page baseline records every thread and sends no stale alerts when page boundaries shift.
  • A newer revision for any baselined thread still produces exactly one fresh alert.
  • Complete snapshots prune checkpoints for no-longer-unread threads.
  • Timeout, malformed pagination, changing totals, or scan-limit exhaustion sends nothing and prunes nothing.
  • Fetch concurrency, total deadline, and existing push delivery guarantees remain bounded.

Evidence / non-duplication

Current origin/main exposes pagination metadata in notification_page, but notifications() loads only page 1 and is used by both push call sites. Review of all 289 historical issue titles, 280 PRs, and recent commits found pagination for the interactive inbox and Web Push delivery/revision work, but no complete push snapshot or ledger reconciliation.

## Problem Web Push polling and subscription baselining read only the first 50 unread Gitea notifications. Operators with larger inboxes can receive stale pre-subscription threads as “new” when pagination shifts, while the per-device delivery ledger grows for the lifetime of a subscription. ## Vertical slice - Build a bounded, deadline-aware complete unread snapshot across Gitea notification pages. - Use the complete snapshot for both subscription baselining and recurring push dispatch. - Reconcile delivery checkpoints only after a complete successful snapshot; partial scans must fail closed without sending or pruning. ## Acceptance tests - A 125-thread, three-page baseline records every thread and sends no stale alerts when page boundaries shift. - A newer revision for any baselined thread still produces exactly one fresh alert. - Complete snapshots prune checkpoints for no-longer-unread threads. - Timeout, malformed pagination, changing totals, or scan-limit exhaustion sends nothing and prunes nothing. - Fetch concurrency, total deadline, and existing push delivery guarantees remain bounded. ## Evidence / non-duplication Current `origin/main` exposes pagination metadata in `notification_page`, but `notifications()` loads only page 1 and is used by both push call sites. Review of all 289 historical issue titles, 280 PRs, and recent commits found pagination for the interactive inbox and Web Push delivery/revision work, but no complete push snapshot or ledger reconciliation.
timmy self-assigned this 2026-08-11 14:21:16 +00:00
timmy closed this issue 2026-08-11 14:34:40 +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#573
No description provided.