Files
questions/aggregates.yaml
T
Bendik Aagaard LynghaugandClaude Fable 5 dcbeda34b7
Lint and reload / lint (push) Successful in 3s
Lint and reload / reload (push) Successful in 0s
Watchers: double opt-in
redoal_watchers starts pending; /watching (the confirmation mail's
landing page) confirms to open or drops. Only open watchers are told.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-30 19:37:10 +02:00

29 lines
1.0 KiB
YAML

# State graphs for event-sourced buckets - see portal's
# src/aggregates/mod.rs. Bucket names are redoal_-prefixed because
# both portal instances (uhhm.no and redoal.com) share one NATS
# JetStream; a bare "subscribers" would collide with uhhm's.
#
# redoal_gestures (index.yaml's record_as for drawn paths) has no
# entry on purpose: plain KV, no lifecycle - a drawn gesture is a
# fact, not a process.
aggregates:
- bucket: redoal_subscribers
initial: open
states:
open: { event: subscribed }
unsubscribed: { event: unsubscribed }
transitions:
open: [unsubscribed]
# Double opt-in: a watcher is pending until the address confirms from
# the mail n8n sends (redoal: confirm watching); only open watchers
# are told when something lands at their shape.
- bucket: redoal_watchers
initial: pending
states:
pending: { event: requested }
open: { event: confirmed }
unsubscribed: { event: unsubscribed }
transitions:
pending: [open, unsubscribed]
open: [unsubscribed]