---
id: TST-ACC-REC-024
title: Outstanding money and investigation routes
kind: api-lifecycle
product_area: accounting
module: reconciliation
revision: 1
status: draft
source_sha:
  services-accounting: f47cb263875bbc0c5640fba7dae6785ec32695f8
repository: services-accounting
files:
  - modules/reconciliation/tests/e2e/outstanding.e2e.spec.js
implements:
  - ATS-ACC-REC-006-03
  - ATS-ACC-REC-006-04
  - ATS-ACC-REC-006-05
  - ATS-ACC-REC-006-07
  - ATS-ACC-REC-007-01
  - ATS-ACC-REC-007-02
  - ATS-ACC-REC-007-04
  - ATS-ACC-REC-007-06
  - ATS-ACC-REC-007-07
  - ATS-ACC-REC-015-01
  - ATS-ACC-REC-015-04
  - ATS-ACC-REC-015-05
  - ATS-ACC-REC-015-06
  - ATS-ACC-REC-015-08
  - ATS-ACC-REC-015-10
  - ATS-ACC-REC-016-01
  - ATS-ACC-REC-016-02
  - ATS-ACC-REC-016-03
  - ATS-ACC-REC-016-04
  - ATS-ACC-REC-016-07
  - ATS-ACC-REC-017-07
  - ATS-ACC-REC-019-01
  - ATS-ACC-REC-019-02
  - ATS-ACC-REC-019-04
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/e2e/outstanding.e2e.spec.js'
  - >-
    Declared test doubles: Doubled: the signing key pair, which is the run's own. Never doubled: the
    dispatcher, the route table, the verification, the evaluation or the persistence services. Every call acts
    in tenants of the spec's own (`testId`), registered in the local `platform.tenants` stand-in and removed
    in `after`. proves_controls: [TC-IAM-001, TC-AZ-002, TC-TEN-002, TC-PI-001, TC-PI-002]
bindings:
  - scenario: ATS-ACC-REC-006-03
    assertions:
      - >-
        services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#answers 200 with alpha’s
        items oldest first, each with its derived state at asOf
      - >-
        services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#answers the calendar days
        each item has been outstanding since its local occurrence date
      - >-
        services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#answers the claiming
        batch of a claimed item
      - >-
        services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#filters by the states
        named, comma-separated
      - >-
        services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#refuses a state outside
        the vocabulary with 400
      - >-
        services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#refuses a cursor it did
        not answer with 400
      - >-
        services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#refuses an asOf that is
        not YYYY-MM-DD with 400
  - scenario: ATS-ACC-REC-006-04
    assertions:
      - >-
        services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#answers 200 with alpha’s
        counts and totals by state, processor and currency
  - scenario: ATS-ACC-REC-006-05
    assertions:
      - >-
        services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#answers 200 with the
        item, its state facts and the payout that may carry it
  - scenario: ATS-ACC-REC-006-07
    assertions:
      - >-
        services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#refuses the list without
        accounting.settlement-items.read with 403
      - >-
        services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#refuses the summary
        without accounting.settlement-items.read with 403
      - >-
        services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#refuses tenant A’s item
        in tenant B with 404
      - >-
        services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#lists none of tenant A’s
        items in tenant B
  - scenario: ATS-ACC-REC-007-01
    assertions:
      - >-
        services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#answers 200 with the item
        resolved as split by the caller
  - scenario: ATS-ACC-REC-007-02
    assertions:
      - >-
        services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#refuses an item claimed
        by a reconciliation with 409 item_claimed
  - scenario: ATS-ACC-REC-007-04
    assertions:
      - >-
        services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#refuses a resolution
        outside the vocabulary with 400
  - scenario: ATS-ACC-REC-007-06
    assertions:
      - >-
        services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#answers 200 with the item
        resolved otherwise by the caller
  - scenario: ATS-ACC-REC-007-07
    assertions:
      - >-
        services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#refuses a principal
        without accounting.settlement-items.resolve with 403
      - >-
        services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#answers the same request
        under the same key with the first answer
      - >-
        services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#refuses the same key with
        another request with 409 idempotency_key_reused
      - >-
        services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#refuses a split without
        an Idempotency-Key with 400 idempotency_key_required
  - scenario: ATS-ACC-REC-015-01
    assertions:
      - >-
        services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#answers 200 with the
        exception open, numbered, of kind manual
      - >-
        services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#answers every subject
        with the console route that opens it
      - >-
        services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#answers its steps, none
        done
      - >-
        services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#refuses a body without a
        title with 400
      - >-
        services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#refuses a subject the
        business unit does not have with 400 subject_not_found
  - scenario: ATS-ACC-REC-015-04
    assertions:
      - >-
        services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#refuses a blank note with
        400
  - scenario: ATS-ACC-REC-015-05
    assertions:
      - >-
        services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#refuses a position
        outside 1 to 20 with 400
      - >-
        services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#refuses a step the
        exception does not have with 404
  - scenario: ATS-ACC-REC-015-06
    assertions:
      - >-
        services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#refuses a body without a
        resolution with 400
  - scenario: ATS-ACC-REC-015-08
    assertions:
      - >-
        services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#answers 200 with the
        exceptions about a subject, newest first
      - >-
        services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#filters by severity and
        kind
      - >-
        services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#pages by the cursor it
        answers, the last page answering none
  - scenario: ATS-ACC-REC-015-10
    assertions:
      - >-
        services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#lets a principal with the
        read keys alone list exceptions
      - >-
        services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#refuses a principal
        without accounting.reconciliation-exceptions.read with 403
      - >-
        services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#refuses a principal
        without accounting.reconciliation-exceptions.update with 403
      - >-
        services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#refuses tenant A’s
        exception in tenant B with 404
  - scenario: ATS-ACC-REC-016-01
    assertions:
      - >-
        services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#answers 200 with a
        warning accepted by one user, with no approver
  - scenario: ATS-ACC-REC-016-02
    assertions:
      - >-
        services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#answers 200 with the
        blocker still open and its acceptance requested by the caller
      - >-
        services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#refuses an approvedById
        in the body with 400 approved_by_id_not_allowed
  - scenario: ATS-ACC-REC-016-03
    assertions:
      - >-
        services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#answers 200 with the
        blocker accepted, the requester its resolver and the second user its approver
  - scenario: ATS-ACC-REC-016-04
    assertions:
      - >-
        services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#records the withdrawal in
        the exception’s history
  - scenario: ATS-ACC-REC-016-07
    assertions:
      - >-
        services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#refuses a principal who
        may update exceptions but not accept them with 403
      - >-
        services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#refuses an accept without
        an Idempotency-Key with 400 idempotency_key_required
      - >-
        services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#records each refused
        acceptance command in the exception’s history
  - scenario: ATS-ACC-REC-017-07
    assertions:
      - >-
        services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#runs the totals drift
        check for the tenant and answers its outcome
      - >-
        services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#runs the overdue sweep as
        of today in the tenant’s zone
      - >-
        services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#runs the idempotency
        purge
      - >-
        services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#refuses a job that is not
        one of the three with 400
      - >-
        services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#refuses a principal
        without accounting.reconciliation-exceptions.accept with 403
  - scenario: ATS-ACC-REC-019-01
    assertions:
      - >-
        services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#answers 200 with alpha’s
        stages, recent payouts and what needs attention
  - scenario: ATS-ACC-REC-019-02
    assertions:
      - >-
        services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#refuses a from after its
        to with 400
  - scenario: ATS-ACC-REC-019-04
    assertions:
      - >-
        services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#lets a principal with the
        read keys alone read the overview
      - >-
        services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#refuses a principal
        without accounting.reconciliation-batches.read with 403
---

# Outstanding money and investigation routes

## Verification Boundary

This suite dispatches Accounting routes locally with enforcing security over a real test database. Its route responses and retained records form the verification boundary.

## 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.
