Token-expiry Notifications delivered to ntfy #153

Open
opened 2026-11-27 16:44:10 -05:00 by bobby · 0 comments
Owner

Part of #73 (spec: #72)

What to build

The Notification record arrives (recipient Person or Household, kind, dedupe_key unique with kind, title, body, priority, link, delivered state; visible like Personal or Household data; no API). The built-in tokenless scheduler Bot, created by migration, can receive Household grants. hapi notify tokens writes Notifications 30 and 7 days before a Token expires (to the Token's Person, or the Owner for Bot Tokens). hapi notify deliver publishes pending Notifications oldest first to hapi-p-<person-id> or hapi-household, using the Notification id as ntfy's sequence id.

Acceptance criteria

  • With the pinned clock, notify tokens writes one Notification per threshold, and re-running doesn't duplicate it
  • The recipients are correct; the content carries no domain values
  • notify deliver against a fake ntfy publishes with the right topic, priority, and sequence id, then marks the Notification delivered
  • The scheduler Bot can't hold a Token
Part of #73 (spec: #72) ## What to build The Notification record arrives (recipient Person or Household, `kind`, `dedupe_key` unique with `kind`, title, body, priority, link, delivered state; visible like Personal or Household data; no API). The built-in tokenless `scheduler` Bot, created by migration, can receive Household grants. `hapi notify tokens` writes Notifications 30 and 7 days before a Token expires (to the Token's Person, or the Owner for Bot Tokens). `hapi notify deliver` publishes pending Notifications oldest first to `hapi-p-<person-id>` or `hapi-household`, using the Notification id as ntfy's sequence id. ## Acceptance criteria - [ ] With the pinned clock, `notify tokens` writes one Notification per threshold, and re-running doesn't duplicate it - [ ] The recipients are correct; the content carries no domain values - [ ] `notify deliver` against a fake ntfy publishes with the right topic, priority, and sequence id, then marks the Notification delivered - [ ] The `scheduler` Bot can't hold a Token
bobby added the ready-for-agent label 2026-11-27 16:44:10 -05:00
bobby added a new dependency 2026-11-27 16:44:11 -05:00
bobby added a new dependency 2026-11-27 16:44:11 -05:00
bobby added a new dependency 2026-11-27 16:44:12 -05:00
bobby added a new dependency 2026-11-27 16:44:13 -05:00
bobby added a new dependency 2026-11-27 16:44:14 -05:00
bobby added a new dependency 2026-11-27 16:44:14 -05:00
bobby added a new dependency 2026-11-27 16:44:15 -05:00
bobby added a new dependency 2026-11-27 16:44:15 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: bobby/hapi#153