01a051f7 - Add self-hosted Web Push with VAPID and an outbox worker - #67
Merged
Conversation
TaprootFreakAI
force-pushed
the
01a051f7-web-push
branch
2 times, most recently
from
August 30, 2026 13:48
376afbc to
d34d0a5
Compare
Store browser subscriptions on the account, enqueue forum and zap notifications, and send them when VAPID is configured. Missing keys keep the process booting; push HTTP returns 503.
Missing keys already returned 503. Garbage keys used to throw inside web-push during sender construction and would take down the process. Validate decoded lengths and subject, and catch constructor throws.
Passing undefined into the helper still applied the configured default, so POST returned 200 and DELETE 404 instead of 503.
Default e2e boot already sets DEBUG_TOKEN, so an unauthenticated debug-ping is 401. Blank VAPID env so host keys cannot leak into the booted process.
…edAt Boot now passes an explicit empty public key so createApp cannot pick VAPID back up from the environment after a sender throw. Subscription upsert returns the persisted createdAt, including rebinds.
Forum and zap ingest now have tests for enqueue throws. The worker tick marks sent or failed without an unreachable else. Document upsert return values.
messagesRoutes handbook and TSDoc now mention optional pushStore. Prettier the env table after merging develop.
Empty/invalid base64, non-numeric push status codes, and Date leases are tested. The interval will not start a second tick until the first has settled.
TaprootFreakAI
force-pushed
the
01a051f7-web-push
branch
from
August 30, 2026 14:04
d34d0a5 to
ed078ae
Compare
The null-lease case must stay null. Map a Date lease in its own test so v8 covers the instanceof Date branch.
Postgres mappers now see both Date and ISO string created_at. createApp without vapidPublicKey still reads a valid env pair.
createdAt of 1 was expired and evicted, so the request returned 401.
Collaborator
Author
|
EN: DE: DetailsGrok quality and logic reached 0 findings. CI is green on this head and the PR is mergeable. Mixed-device retry of a successful endpoint after a sibling failure is the leftover, for a later PR if Codex or operators want it. Codex review itself was deferred to a follow-up PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
EN:
The api stores Web Push subscriptions on the account and sends transactional forum and zap notifications itself. Missing VAPID keys still boot the process; those routes return 503. No third-party push SDK.
DE:
Die API speichert Web-Push-Abos am Account und schickt Forum- und Zap-Nachrichten selbst. Fehlen die VAPID-Schlüssel, bootet der Prozess weiter; die Routen antworten 503. Kein Drittanbieter-SDK.
Details
Self-hosted Web Push (RFC 8030 / VAPID). New tables
push_subscriptionandpush_outbox. Worker sends whenVAPID_PUBLIC_KEYandVAPID_PRIVATE_KEYare set (VAPID_SUBJECTdefaults tohttps://21.gifts).HTTP:
GET /push/vapid-public(Bearer)POST/DELETE /me/push-subscriptions(Bearer)POST /debug/push-ping(DEBUG_TOKEN)Enqueue:
tag: forum)Secret columns
endpoint,p256dh, andauthare hashed indb_changelikeview_key.Deploy: put the VAPID private key in the secret store; the public key is not a secret. The process does not fail boot if they are unset.