Skip to content

feat(aggregator): Web Push plumbing — VAPID, subscription store + API, service worker (#1254 slice b) #3316

Open

Description

@dezren39

Implementation slice (b) of the #1254 design (note: doc/2026-11-01T03-54-00Z_design_pwa_push_notifications.md, PR #3314; epic #1184). Depends on slice (a) installability.

Build the push plumbing: VAPID keypair wiring (private key fetched by secret name at runtime, never in repo/Nix store), subscription store push-subscriptions.json in the runtime state dir (shape per design §4, 404/410 pruning), subscription API (create/update/delete with per-class map + quiet-hours prefs), and the real service worker (push + notificationclick handlers routing to the payload URL).

Includes the §6 kill-switch migration: ship the /api/sw-probe reporting first; replace /sw.js with the real worker only when 14 consecutive days of probe data show no foreign registration, otherwise the new worker unregisters foreign registrations on activate for one release. Invariant: no release serves a /sw.js that neither evicts the stranded opencode worker nor is the real worker.

Acceptance:

  • A test subscription receives a push end-to-end on the tailnet origin (branch A); payload click lands on the payload URL
  • Subscription store prunes on 410; per-class map + quiet prefs round-trip via the API
  • The kill-switch migration invariant above holds at every step (probe data or eviction-on-activate present in the replacing release)
  • No secret material in repo, store, or logs

Activity

  1. added
    kind/featureNew feature or capability request
    priority/normalOrdinary priority (the default)
    app/pm-stackpm-stack (Pad/Grist) in developing-today/code
    on Nov 1, 2026
  2. added
    queue/queuedHas a queued task in the Supabase agent queue
    source/creatorFiled by the new-issue-creator job
    task/triageQueue packet kind: verify, reproduce, and route this item
    on Nov 3, 2026
  3. developing-today commented on Nov 3, 2026

    @developing-today
    Contributor

    agent-note:v1
    state: triaged (coverage pass)
    Coverage pass 2026-11-03: reviewed in the fleet-wide per-issue pass (drift / overlap / already-handled / stale / blockers / ordering). Verdict: still live; queued in repo-health-code-pilot as triage at priority 40 (priority/normal). If this is already handled at current main, the triage closes it with evidence; if it needs splitting, the triage files the split.
    Found via: coverage pass 2026-11-03

  4. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 3, 2026
  5. 31 remaining items

  6. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

    • Agent: fleet monitor (repo-fleet-monitor)
    • Session / ID: task 8787
    • Found via: monitor reconciliation
    • Task: claim-evaporated repair — the queue claim on task 8787 ended without complete/park/block, its lease expired, and the task returned to queued unclaimed while this issue still carried claimed labels. Labels reset to the truth: queue/queued + status/needs-triage. Checkpoint stage at evaporation: handed_off.
    • Expectation: the next lane to claim task 8787 posts a fresh pickup note.
  7. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    event: picked_up
    task: 8787 (repo-health-code-pilot; worker repo-worker-code; lane 9aca43b4-5439-4939-9f71-323f5d32521b)
    state: Claimed to verify the remaining live Web Push acceptance.
    next: Revalidate #3316 and PR #3680, confirm documented Tailscale target and intentional installed/subscribed browser access, and send only the labeled test push if those checks pass.

  8. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    queue/blockedQueue or user escalation state
    status/blockedQueue or user escalation state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 4, 2026
  9. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    event: blocked
    task: 8787 (repo-health-code-pilot; worker repo-worker-code; lane 9aca43b4-5439-4939-9f71-323f5d32521b)
    state: Blocked on required live-browser access.
    verified: #3316 remains OPEN; PR #3680 is MERGED. The documented Tailscale origin is reachable (/alerts returned 200), but /api/sw-probe reports zero browser reports. This host exposes headless Chromium only; no interactive browser-control integration or intentionally subscribed browser was available.
    blocker: Live acceptance requires an intentional installed browser subscribed to https://amd-6.raptor-pumpkinseed.ts.net, with notification receipt and click-through to /alerts observable.
    work: No subscription was created and no user-visible push was sent; no code changes.
    resume: Provide an intentional subscribed browser and interactive access, then send only the labeled /alerts test push and verify receipt/click-through.
    bookkeeping: openchamber scheduled lane — sandbox backlog and sweep log deferred to fleet reconciliation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

app/pm-stackpm-stack (Pad/Grist) in developing-today/codekind/featureNew feature or capability requestpriority/normalOrdinary priority (the default)queue/blockedQueue or user escalation statesource/creatorFiled by the new-issue-creator jobstatus/blockedQueue or user escalation statestatus/triagedTriaged and routed (see agent note)task/triageQueue packet kind: verify, reproduce, and route this itemuser/reviewNeeds a user-look: Muse reviews first and handles what it can

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions