2026-08-23 13:06:10 +02:00
|
|
|
# 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]
|
2026-08-30 19:37:10 +02:00
|
|
|
# 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.
|
2026-08-30 16:05:26 +02:00
|
|
|
- bucket: redoal_watchers
|
2026-08-30 19:37:10 +02:00
|
|
|
initial: pending
|
2026-08-30 16:05:26 +02:00
|
|
|
states:
|
2026-08-30 19:37:10 +02:00
|
|
|
pending: { event: requested }
|
|
|
|
|
open: { event: confirmed }
|
2026-08-30 16:05:26 +02:00
|
|
|
unsubscribed: { event: unsubscribed }
|
|
|
|
|
transitions:
|
2026-08-30 19:37:10 +02:00
|
|
|
pending: [open, unsubscribed]
|
2026-08-30 16:05:26 +02:00
|
|
|
open: [unsubscribed]
|
2026-08-31 17:22:48 +02:00
|
|
|
# Reports on recordings. The relay watches this bucket: a record
|
|
|
|
|
# moved to "removed" deletes the recording from its store, the varde
|
|
|
|
|
# pin, and discovery. "kept" closes the report with the recording in
|
|
|
|
|
# place. Decisions are human, never automatic.
|
|
|
|
|
- bucket: redoal_reports
|
|
|
|
|
initial: open
|
|
|
|
|
states:
|
|
|
|
|
open: { event: reported }
|
|
|
|
|
removed: { event: removed }
|
|
|
|
|
kept: { event: kept }
|
|
|
|
|
transitions:
|
|
|
|
|
open: [removed, kept]
|