---
id: STATE-PFM-ELG-007
title: Attention occurrence lifecycle
object: DOM-PFM-ELG-005
product_area: platform
module: eligibility
revision: 1
status: draft
design_intent: confirmed
origin: >-
  Responsibilities and attention architecture D-03, D-06 and D-07 (escalation in
  phase 2), approved by Andrew 2026-10-18 (PLAT-M15 "Decisions"); partition
  standard for the thirteen-month drop
implementation_evidence: observed
source_sha:
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
states:
  - name: open
    meaning: >-
      The condition remains open and its provider can refresh the same
      occurrence.
  - name: escalated
    meaning: >-
      The occurrence remains open with a permanent escalation marker and added
      audience; escalated is not a separate stored status.
  - name: resolved
    meaning: The occurrence was closed with an outcome and cannot reopen.
  - name: expired
    meaning: The sweep closed the occurrence after its expiry instant.
  - name: dropped
    meaning: >-
      The occurrence was removed with an old monthly partition; dropped is not a
      stored status.
transitions:
  - from: open
    to: open
    trigger: publish_attention_item with an already-open key
    guard: 'Owning service and workspace with validated facts, scopes and audiences.'
    side_effects:
      - 'Refresh content, timing, scope, rank and surfaces'
      - Replace provider audiences but retain escalation audiences
      - Advance confirmation time
    who: Owning application or Platform evaluator
    provenance: observed
    source: 'services-platform:docs/attention.md#2. The write functions'
  - from: open
    to: escalated
    trigger: Scheduled attention escalation phase
    guard: A declared effective escalation policy is overdue and its stamp is absent.
    side_effects:
      - Add the escalation audience
      - Audit escalation
      - Permit escalation reminder planning
    who: Platform attention sweep
    provenance: observed
    source: >-
      services-platform:modules/attention/services/persistence/items.ts:escalateOverdueItems
  - from: open
    to: resolved
    trigger: resolve_attention_item or scoped resolve_unconfirmed_attention_items
    guard: >-
      Owning service; unconfirmed resolution also requires an older confirmation
      within the selected scope.
    side_effects:
      - Release the open-key reference
      - Return whether an occurrence closed
    who: Owning application or Platform evaluator
    provenance: observed
    source: >-
      services-platform:modules/attention/services/persistence/items.ts:resolveItem
  - from: escalated
    to: resolved
    trigger: 'Provider resolution, scoped unconfirmed resolution or resolveAttentionItem'
    guard: Apply open-occurrence resolution checks.
    side_effects:
      - Release its key reference
    who: 'Owning application, Platform evaluator or administrator'
    provenance: observed
    source: 'services-platform:modules/attention/rules.ts:ITEM_TRANSITIONS'
  - from: open
    to: resolved
    trigger: resolveAttentionItem
    guard: 'Manual-resolution authority, an open occurrence and a reason.'
    side_effects:
      - Store manual outcome
      - Audit and emit the manual metric
    who: Attention administrator
    provenance: observed
    source: >-
      services-platform:modules/attention/aws/api/attention.routes.ts:resolveAttentionItem
  - from: open
    to: resolved
    trigger: Registration retirement and its bounded sweep repair
    guard: >-
      The deployment retired the kind; after-commit resolution and
      recent-retirement sweep repair run.
    side_effects:
      - Use the retirement outcome
      - Retain workspace settings
    who: Attention registration and sweep
    provenance: observed
    source: >-
      services-platform:modules/attention/services/persistence/items.ts:resolveRetiredDefinitionItems
  - from: open
    to: expired
    trigger: Scheduled attention expiry phase
    guard: The expiry instant is strictly earlier than sweep time.
    side_effects:
      - Release its key reference
    who: Platform attention sweep
    provenance: observed
    source: >-
      services-platform:modules/attention/services/persistence/items.ts:expireItems
  - from: escalated
    to: expired
    trigger: Scheduled attention expiry phase
    guard: The expiry instant is strictly earlier than sweep time.
    side_effects:
      - Release its key reference
    who: Platform attention sweep
    provenance: observed
    source: >-
      services-platform:modules/attention/services/persistence/items.ts:expireItems
  - from: open
    to: dropped
    trigger: Scheduled monthly partition removal
    guard: The opened month exceeds thirteen completed retention months.
    side_effects:
      - Remove supporting orphans on later sweep
      - Permit provider republication if the condition still holds
    who: Partition maintenance
    provenance: documented
    source: 'services-platform:docs/attention.md#1. The tables'
invalid:
  - from: resolved
    to: open
    why: >-
      A recurring condition creates another occurrence rather than reopens
      resolved history.
  - from: expired
    to: open
    why: Expired occurrences cannot reopen.
  - from: escalated
    to: open
    why: Provider refresh cannot remove the escalation marker or its audiences.
concurrency: >-
  Publish locks or creates the key row and serializes one key’s writers.
  Escalation updates only an unstamped open item. Provider writes share their
  business transaction, but scheduled phases have separate transactions.
invariants:
  - INV-DOM-PFM-ELG-005-01
  - INV-DOM-PFM-ELG-005-02
  - INV-DOM-PFM-ELG-005-03
  - INV-DOM-PFM-ELG-005-04
  - INV-DOM-PFM-ELG-005-07
evidence:
  - >-
    services-platform at ad3f6a6: modules/attention/rules.ts;
    services/persistence/items.ts; services/sweep/sweep-tenant.ts;
    services/registration/register-service-attention.ts;
    aws/api/attention.routes.ts; db/attention-items.table.ts,
    attention-item-keys.table.ts; docs/attention.md §1, §2, §7.
---
# Attention occurrence lifecycle

## The Lifecycle

```mermaid
stateDiagram-v2
  open --> escalated
  open --> resolved
  escalated --> resolved
  open --> expired
  escalated --> expired
  open --> dropped
```

## Transitions Explained

Occurrence status and escalation describe the condition, independently of each person’s response. Partition retention can remove an open occurrence; generation continuity depends on key retention, not on a permanent counter.

## What Cannot Happen

A recurring condition creates another occurrence rather than reopens resolved history. Expired occurrences cannot reopen. Provider refresh cannot remove the escalation marker or its audiences.

## Concurrency and Timing

Publish locks or creates the key row and serializes one key’s writers. Escalation updates only an unstamped open item. Provider writes share their business transaction, but scheduled phases have separate transactions.
