---
id: TST-ACC-REC-069
title: Draft workspace preparation
kind: integration
product_area: accounting
module: reconciliation
revision: 1
status: draft
source_sha:
  services-accounting: f47cb263875bbc0c5640fba7dae6785ec32695f8
repository: services-accounting
files:
  - >-
    modules/reconciliation/tests/integration/services/persistence/reconciliation-workspaces.integration.spec.js
implements:
  - ATS-ACC-REC-008-01
  - ATS-ACC-REC-008-03
  - ATS-ACC-REC-008-08
environment: local
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 5
isolation: Suite-owned workspace fixtures and deterministic records removed by suite cleanup.
evidence:
  - >-
    services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-workspaces.integration.spec.js
  - 'Declared test doubles: Doubled: the clock (a manual clock the suite advances between commands).'
bindings:
  - scenario: ATS-ACC-REC-008-01
    assertions:
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-workspaces.integration.spec.js#refuses
        a voided payout with 409 payout-voided naming it
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-workspaces.integration.spec.js#refuses
        payouts of two merchant accounts with 400
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-workspaces.integration.spec.js#refuses
        more than 50 payouts with 400
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-workspaces.integration.spec.js#writes
        no batch for a refused create
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-workspaces.integration.spec.js#answers
        the same Idempotency-Key and payouts with the same batch
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-workspaces.integration.spec.js#refuses
        the same Idempotency-Key for other payouts with 409 idempotency-key-reused
  - scenario: ATS-ACC-REC-008-03
    assertions:
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-workspaces.integration.spec.js#writes
        an open draft batch numbered 10001, prepared by the caller, with the payouts’ total
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-workspaces.integration.spec.js#links
        each payout at its net amount, payout number order
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-workspaces.integration.spec.js#records
        batch.created with its number, payouts, total and version and the idempotency key
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-workspaces.integration.spec.js#numbers
        the tenant’s next batch 10002
  - scenario: ATS-ACC-REC-008-08
    assertions:
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-workspaces.integration.spec.js#writes
        the notes one version on, by the caller
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-workspaces.integration.spec.js#records
        batch.notes-updated with the versions
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-workspaces.integration.spec.js#refuses
        notes at a version that is not the batch’s with 409 StaleObject
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-workspaces.integration.spec.js#clears
        the notes with null
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-workspaces.integration.spec.js#refuses
        notes in a batch that is not open with 409 batch-not-open
---

# Draft workspace preparation

## Verification Boundary

This suite calls production services over the real test database. Fixture setup may write records directly; the exercised commands and queries retain their normal database enforcement.

## What This Suite Proves

The executable assertions identified in the binding records supply the registered scenario observations. When a scenario names several suites, this suite supplies its listed assertions and does not independently establish every clause.

## What It Does Not Prove

Deployed infrastructure, live console behavior and shared scheduling delivery are outside this local boundary.

## Real Dependencies and Test Doubles

PostgreSQL, migrations and the exercised production code are real. Fixtures supply the financial world and caller context; deterministic setup and owner-side inspection do not replace database enforcement.

## Must Not Be Doubled

The exercised database constraints, transactional services and route enforcement remain real. Replacing them would remove the boundary this suite registers.
