---
id: WF-ACC-REC-003
title: Save a draft from the workspace
trigger: >-
  Save, authoritative acceptance or finalization first synchronizes the visible
  workspace draft.
product_area: accounting
module: reconciliation
revision: 3
status: draft
design_intent: proposed
implementation_evidence: observed
inference: []
source_sha:
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
  services-accounting: f47cb263875bbc0c5640fba7dae6785ec32695f8
implements:
  - CAP-ACC-REC-008
  - CAP-ACC-REC-009
  - CAP-ACC-REC-010
moves:
  - STATE-ACC-REC-003
  - STATE-ACC-REC-004
crosses:
  - SVC-ACC-REC-reconciliation
idempotency: >-
  No key covers the complete save. Keyed creation and manual additions mint new
  keys; other financial steps compare versions, and dismissals are unversioned.
concurrency: >-
  Each versioned step uses the preceding response version. Dismissals lock the
  open record without a version comparison; a failed reload can leave retry
  planning stale.
hops:
  - 'n': 1
    actor_or_service: Console store
    action: >-
      Plan differences from the loaded record; create an explanation when the
      payout has none.
    anchor: 'react-console:lib/accounting/reconciliation/adapter.ts:planSync'
    seam: sync
    on_failure: A creation refusal stops synchronization and shows the error.
    left_inconsistent: No draft command follows a failed creation.
    observer: The workspace displays the refusal.
    provenance: observed
    source: 'react-console:lib/accounting/reconciliation/store.tsx:syncDraft'
  - 'n': 2
    actor_or_service: Reconciliation matching operations
    action: >-
      Release unwanted claims and remove unwanted manual entries as separate
      commands.
    anchor: >-
      services-accounting:modules/reconciliation/services/persistence/reconciliation-allocations.ts:releaseSettlementItems
    seam: sync
    on_failure: Stop on the first refusal and attempt to reload.
    left_inconsistent: Earlier commands remain committed.
    observer: The workspace and retained activity reveal applied changes.
    provenance: observed
    source: 'react-console:lib/accounting/reconciliation/store.tsx:syncDraft'
  - 'n': 3
    actor_or_service: Reconciliation matching operations
    action: Claim new effects and add new manual entries one command at a time.
    anchor: >-
      services-accounting:modules/reconciliation/services/persistence/reconciliation-allocations.ts:claimSettlementItems
    seam: sync
    on_failure: Stop if a claim or manual entry fails; retain earlier results.
    left_inconsistent: Releases may be saved while replacement claims are absent.
    observer: The response can identify the competing holder.
    provenance: observed
    source: 'react-console:lib/accounting/reconciliation/store.tsx:syncDraft'
  - 'n': 4
    actor_or_service: Reconciliation matching operations
    action: 'Replace notes, then apply dismissal additions and removals.'
    anchor: >-
      services-accounting:modules/reconciliation/services/persistence/reconciliation-dismissals.ts:dismissSettlementItem
    seam: sync
    on_failure: Stop and reload after a refusal.
    left_inconsistent: >-
      Financial changes may be committed without the intended notes or
      dismissals.
    observer: The person receives the service message.
    provenance: observed
    source: 'react-console:lib/accounting/reconciliation/adapter.ts:planSync'
  - 'n': 5
    actor_or_service: Console store
    action: >-
      Submit finalize or authoritative acceptance after synchronization, then
      reload the unit.
    anchor: 'react-console:lib/accounting/reconciliation/store.tsx:finalizeRecon'
    seam: sync
    on_failure: A refused follow-up leaves the synchronized draft committed.
    left_inconsistent: Qualifying saved contributions can make the attempted approver a preparer.
    observer: The workspace shows the refusal and saved activity.
    provenance: observed
    source: 'react-console:lib/accounting/reconciliation/store.tsx:finalizeRecon'
branches:
  - A draft with no differences requires no synchronization commands.
waits: []
evidence:
  - >-
    react-console at baf6dae3: lib/accounting/reconciliation/store.tsx
    (syncDraft, saveRecon, finalizeRecon, acceptAuthoritative), adapter.ts
    (planSync), client.ts, draft.ts.
  - >-
    services-accounting at f47cb263:
    modules/reconciliation/aws/api/matching.routes.ts;
    services/persistence/reconciliation-allocations.ts,
    reconciliation-dismissals.ts, reconciliation-workspaces.ts.
controls: [TC-IAM-001, TC-IAM-002, TC-IAM-004, TC-IAM-005, TC-AZ-001, TC-AZ-002, TC-AZ-003, TC-AZ-004, TC-AZ-006, TC-TEN-001, TC-TEN-002, TC-TEN-003, TC-DAT-001, TC-LOG-004, TC-LOG-005, TC-PI-001, TC-PI-002, TC-PI-003, TC-PI-005]
---
# Save a draft from the workspace

## What It Does

The workspace stages local selection, adjustments and notes, then converts differences into service commands. Save orders releases and removals before claims, additions, notes and dismissal changes.

## The Flow

```mermaid
sequenceDiagram
  participant P as Preparer (workspace)
  participant C as Console store
  participant S as Reconciliation service
  P->>C: Save, Accept Authoritative or Finalize
  opt no reconciliation yet
    C->>S: open over the payout
  end
  C->>S: release and remove (each versioned)
  C->>S: claim and add manual entries (each versioned)
  C->>S: notes, dismiss, undismiss
  opt Finalize or Accept Authoritative
    C->>S: finalize or accept authoritative at the last version
  end
  C->>S: reread the unit
```

## When Something Fails

The sequence has no compensation or shared transaction. Earlier commands survive a later refusal, and a failed reload may prevent the screen from accurately showing that partial result. Only qualifying contributions establish preparer status.

## Open Design Questions

Atomic draft saving remains an open decision. Until then, review must account for partial saves and fresh keys on retries.
