---
id: STATE-ACC-REC-005
title: Exception status and acceptance
object: DOM-ACC-REC-004
product_area: accounting
module: reconciliation
revision: 3
status: draft
design_intent: confirmed
origin: >-
  Andrew's Decision 2, 2026-10-16 (a blocker is accepted by a request and a
  second user's approval), recorded in services-accounting
  docs/reconciliation/architecture.md §13.2
implementation_evidence: observed
source_sha:
  services-accounting: f47cb263875bbc0c5640fba7dae6785ec32695f8
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
states:
  - name: open
    meaning: The concern is active; blocker severity contributes to readiness.
  - name: investigating
    meaning: Investigation is active and blocker severity still applies.
  - name: acceptance-requested
    meaning: >-
      A request overlays open or investigating status and awaits independent
      acceptance.
  - name: resolved
    meaning: A written conclusion closes the concern.
  - name: accepted
    meaning: Policy acceptance closes it; blockers retain independent approval.
transitions:
  - from: open
    to: investigating
    trigger: Start investigation and optionally assign ownership.
    guard: Update authority and current version are supplied.
    side_effects:
      - Retain investigation activity.
    who: Authorized investigator
    provenance: observed
    source: >-
      services-accounting:modules/reconciliation/services/persistence/reconciliation-exceptions.ts:updateException
  - from: investigating
    to: open
    trigger: Return investigation to the open queue.
    guard: The version is current and the concern remains active.
    side_effects:
      - Retain status-change activity.
    who: Authorized investigator
    provenance: observed
    source: >-
      services-accounting:modules/reconciliation/services/rules/transitions.ts:EXCEPTION_TRANSITIONS
  - from: open
    to: resolved
    trigger: Resolve active work or clear a detected condition.
    guard: >-
      Human resolution requires text and current version; overdue checks use the
      judged day.
    side_effects:
      - Clear pending acceptance and resolve enabled attention.
    who: Authorized investigator or detector
    provenance: observed
    source: >-
      services-accounting:modules/reconciliation/services/persistence/reconciliation-exceptions.ts:resolveException
  - from: investigating
    to: resolved
    trigger: Conclude investigation or clear its detected condition.
    guard: The applicable human or detector resolution checks pass.
    side_effects:
      - Clear pending acceptance and enabled attention.
    who: Authorized investigator or detector
    provenance: observed
    source: >-
      services-accounting:modules/reconciliation/services/persistence/reconciliation-exceptions.ts:clearExceptionsOf
  - from: open
    to: accepted
    trigger: Accept a warning under policy.
    guard: >-
      Warning severity, written conclusion, current version and valid key; no
      approver is supplied.
    side_effects:
      - Retain the accepter as resolver without independent approval.
    who: Authorized policy accepter
    provenance: observed
    source: >-
      services-accounting:modules/reconciliation/services/persistence/reconciliation-exceptions.ts:acceptException
  - from: open
    to: acceptance-requested
    trigger: Request policy acceptance of a blocker.
    guard: >-
      Blocker severity, conclusion, current version and valid key; no request or
      supplied approver.
    side_effects:
      - >-
        Retain the request while preserving open or investigating status and
        blocking effect.
    who: Authorized acceptance requester
    provenance: observed
    source: >-
      services-accounting:modules/reconciliation/services/persistence/reconciliation-exceptions.ts:acceptException
  - from: acceptance-requested
    to: accepted
    trigger: Grant independent acceptance.
    guard: >-
      A pending request and current version exist; the keyed approver differs
      from the requester.
    side_effects:
      - >-
        Retain accepted status, requester as resolver and independent approver;
        close enabled attention.
    who: Independent authorized accepter
    provenance: observed
    source: >-
      services-accounting:modules/reconciliation/services/persistence/reconciliation-exceptions.ts:approveExceptionAcceptance
  - from: acceptance-requested
    to: open
    trigger: Withdraw the current acceptance request.
    guard: >-
      Only its requester may use the withdrawal key; no expected version is
      required.
    side_effects:
      - >-
        Remove request fields and preserve the underlying open or investigating
        status.
    who: Current acceptance requester
    provenance: observed
    source: >-
      services-accounting:modules/reconciliation/services/persistence/reconciliation-exceptions.ts:withdrawExceptionAcceptance
  - from: acceptance-requested
    to: resolved
    trigger: Resolve work while acceptance is pending.
    guard: The applicable resolution checks pass.
    side_effects:
      - Clear the request and record its removal with the conclusion.
    who: Authorized investigator or detector
    provenance: observed
    source: >-
      services-accounting:modules/reconciliation/services/persistence/reconciliation-exceptions.ts:resolveException
  - from: resolved
    to: open
    trigger: Detect the resolved condition again.
    guard: The detector finds the matching resolved condition key.
    side_effects:
      - Reopen the retained concern and invoke enabled attention publication.
    who: Condition detector
    provenance: observed
    source: >-
      services-accounting:modules/reconciliation/services/persistence/reconciliation-exceptions.ts:raiseException
invalid:
  - from: resolved
    to: investigating
    why: >-
      Staff cannot reopen closed work; a detector reopens a resolved concern to
      open.
  - from: accepted
    to: open
    why: >-
      The transition rule permits detector reopening, but raising currently
      suppresses accepted conditions.
  - from: accepted
    to: resolved
    why: Accepted work cannot move directly to resolved.
  - from: open
    to: open
    why: An unchanged requested status is refused.
concurrency: >-
  Versioned edits compare the locked concern. Notes and withdrawal do not
  require an expected version; acceptance keys replay retained results and
  attention writes occur only when enabled.
invariants:
  - INV-DOM-ACC-REC-004-01
  - INV-DOM-ACC-REC-004-02
  - INV-DOM-ACC-REC-004-03
  - INV-DOM-ACC-REC-004-04
  - INV-DOM-ACC-REC-004-05
  - INV-DOM-ACC-REC-004-07
evidence:
  - >-
    services-accounting at f47cb263:
    modules/reconciliation/services/persistence/reconciliation-exceptions.ts,
    reconciliation-blocker-items.ts; services/rules/transitions.ts,
    blocker-attention.ts; db/reconciliation-exceptions.table.ts;
    docs/reconciliation/architecture.md §13.
---
# Exception status and acceptance

## The Lifecycle

```mermaid
stateDiagram-v2
  [*] --> open : detector or person raises
  open --> investigating : worked
  investigating --> open : returned
  open --> resolved : resolved or cleared
  investigating --> resolved : resolved or cleared
  open --> accepted : warning accepted by one person
  open --> acceptance_requested : blocker acceptance asked
  investigating --> acceptance_requested : blocker acceptance asked
  acceptance_requested --> accepted : second person approves
  acceptance_requested --> open : withdraw from open
  acceptance_requested --> investigating : withdraw from investigating
  acceptance_requested --> resolved : resolved or cleared
  resolved --> open : condition found again
```

## Transitions Explained

Investigation moves active concerns between open and investigating. Acceptance-requested overlays either active status; warning acceptance is immediate and blocker acceptance requires independent approval.

## What Cannot Happen

Staff cannot reopen closed concerns or approve their own blocker request. Withdrawal returns to the underlying active status, and accepted conditions remain suppressed by raising.

## Concurrency and Timing

Versioned edits compare the locked concern. Notes and withdrawal do not require an expected version; acceptance keys replay retained results and attention writes occur only when enabled.
