Skip to content

Feat/notifications: In-app notification system with placed inboxes#307

Open
St4NNi wants to merge 16 commits into
feat/public-accessfrom
feat/notifications
Open

Feat/notifications: In-app notification system with placed inboxes#307
St4NNi wants to merge 16 commits into
feat/public-accessfrom
feat/notifications

Conversation

@St4NNi

@St4NNi St4NNi commented Jul 6, 2026

Copy link
Copy Markdown
Member

Adds the backend of the in-app notification system as one shared primitive: mutating operations emit ephemeral post-commit events, routing mints recipient-addressed records, and a durable per-origin FIFO outbox delivers them to a deterministic per-user inbox holder over a dedicated ALPN. Any node serves the REST API by proxying one hop to the holder, so the portal stays topology-blind.

Stacked on #306 (feat/public-access); diff shows only the notification commits.

Changes

  • Adds notification core structs, kinds, and keyspaces: ephemeral events, recipient-addressed records, and per-user inbox rows.
  • Adds a post-commit emission helper so events are emitted only after the host transaction commits and the notification path can never fail the host operation.
  • Resolves a deterministic per-user inbox holder over sync rendezvous (R=1) so every node agrees where a user's inbox lives.
  • Adds a durable per-origin FIFO outbox with local delivery for records whose holder is the origin node.
  • Adds a notification delivery RPC over a dedicated ALPN for records whose holder is remote.
  • Drains the entire outbox each run to avoid head-of-line starvation behind an unreachable holder.
  • Adds notification read and mark-read operations on the holder.
  • Adds GET /api/v1/notifications with cursor pagination, GET /api/v1/notifications/unread, and POST /api/v1/notifications/read, each served from any node via holder proxy.
  • Adds a TTL prune task: direct notifications expire after 90 days, transient ones after 30 days, plus a per-user inbox cap.
  • Emits notifications for group membership changes and node onboarding.
  • Adds multi-node delivery integration tests, plus coverage for the remote dispatch arms from a non-holder node.
  • Adds the design document docs/design/notifications.md.
  • Upgrades workspace dependencies.

GitHub Issues

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant