---
id: STATE-PFM-NOT-008
title: Notification digest
object: DOM-PFM-NOT-003
product_area: platform
module: notifications
revision: 1
status: draft
design_intent: proposed
implementation_evidence: partially-observed
source_sha:
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
states:
- name: open
  meaning: The digest collects notices for a person, category and time window.
- name: delivering
  meaning: The digest is claimed for delivery.
- name: delivered
  meaning: The digest has completed delivery.
- name: failed
  meaning: Digest delivery ended in failure.
- name: empty
  meaning: The window closed without content.
transitions:
- from: open
  to: delivering
  trigger: A caller begins delivery at the end of a window.
  guard: Persistence requires only an open digest; it does not check the deadline or collected count.
  side_effects: []
  who: A later digest sender (not built)
  provenance: observed
  source: services-platform:modules/notifications/services/persistence/digests.ts:DIGEST_TRANSITIONS
- from: open
  to: empty
  trigger: A caller closes a window as empty.
  guard: No additional condition is imposed beyond its source state.
  side_effects: []
  who: A later digest sender (not built)
  provenance: observed
  source: services-platform:modules/notifications/services/persistence/digests.ts:DIGEST_TRANSITIONS
- from: delivering
  to: delivered
  trigger: The channel confirms digest sending.
  guard: No additional condition is imposed beyond its source state.
  side_effects: []
  who: A later digest sender (not built)
  provenance: observed
  source: services-platform:modules/notifications/services/persistence/digests.ts:DIGEST_TRANSITIONS
- from: delivering
  to: failed
  trigger: The channel reports terminal digest failure.
  guard: No additional condition is imposed beyond its source state.
  side_effects: []
  who: A later digest sender (not built)
  provenance: observed
  source: services-platform:modules/notifications/services/persistence/digests.ts:DIGEST_TRANSITIONS
invalid:
- from: delivered
  to: open
  why: Completed digests cannot resume collection.
- from: empty
  to: delivering
  why: An empty terminal digest cannot be claimed for delivery.
concurrency: Find-or-create uses the unique person, category and window. Contributions require an open
  digest, and conditional settlement allows a single completion. No current worker drives this dormant
  model.
evidence:
- 'services-platform at ad3f6a65: modules/notifications/services/persistence/digests.ts; db/notification-digests.table.ts;
  docs/notifications.md §8.'
---
# Notification digest

## The Lifecycle

```mermaid
stateDiagram-v2
    state "open" as s0
    state "delivering" as s1
    state "delivered" as s2
    state "failed" as s3
    state "empty" as s4
    s0 --> s1
    s0 --> s4
    s1 --> s2
    s1 --> s3
```

## Transitions Explained

Each transition row distinguishes the triggering caller from the condition persistence checks and the effects it writes. Dormant models describe available persistence operations rather than a deployed channel worker.

## What Cannot Happen

Completed digests cannot resume collection. An empty terminal digest cannot be claimed for delivery.

## Concurrency and Timing

Find-or-create uses the unique person, category and window. Contributions require an open digest, and conditional settlement allows a single completion. No current worker drives this dormant model.
