---
id: TST-ACC-CLS-035
title: Outstanding transaction classification
kind: integration
product_area: accounting
module: close
revision: 1
status: draft
source_sha:
  services-accounting: f47cb263875bbc0c5640fba7dae6785ec32695f8
repository: services-accounting
files:
  - >-
    modules/fiscal-close/tests/integration/services/persistence/unaccounted-transactions.queries.integration.spec.js
implements:
  - ATS-ACC-CLS-005-03
environment: local
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 3
isolation: >-
  The suite owns test-identifier workspaces and fixture records, removed by its
  teardown.
binding_policy: >-
  Each binding identifies the assertions this suite executes; combined scenarios
  may require other bound suites. Existence is not a recorded execution result.
evidence:
  - >-
    services-accounting:modules/fiscal-close/tests/integration/services/persistence/unaccounted-transactions.queries.integration.spec.js
  - provenance: test
    source: >-
      services-accounting:modules/fiscal-close/tests/integration/services/persistence/unaccounted-transactions.queries.integration.spec.js
    assertion_titles:
      - >-
        fiscal close persistence: reading a period’s unaccounted transactions
        (integration)
      - >-
        holds the draft, the pro forma, the posted and the downloaded documents
        of faa’s September (premise for their absence below)
      - 'answers every kind, mapped whole, by date with each reason'
      - counts them all
      - answers the first `limit` with the count of all
      - >-
        orders the ids of one date and kind in byte order, whatever the
        database’s collation
      - >-
        answers the dates outside September in their own periods (premise for
        their absence above)
      - answers gamma its own transaction (premise for its absence from faa’s)
      - answers nothing and a count of 0 for a period with nothing unaccounted
      - never answers another tenant’s transactions
real_dependencies: >-
  Production persistence and mapping run with application-role transactions and
  workspace policies on PostgreSQL. Fixture records and fixed context values
  supply the inputs; the service and database enforcement under assertion remain
  real.
product_intent: proposed
implementation_evidence: observed
---
# Outstanding transaction classification

## Verification Boundary

The suite checks its declared service or persistence boundary against local PostgreSQL. Bindings identify the assertions it contributes to a capability case; they do not establish every assertion in a combined case.

## What This Suite Proves

The query suite maps eligible document kinds to their incomplete-posting reasons, excludes drafts and completed posting, bounds returned items and preserves ordering and workspace isolation.

## What It Does Not Prove

This register records assertion scope without claiming a passing run or complete coverage of every rule and scenario variant.

## Real Dependencies and Test Doubles

Production persistence and mapping run with application-role transactions and workspace policies on PostgreSQL. Fixture records and fixed context values supply the inputs; the service and database enforcement under assertion remain real.

## Must Not Be Doubled

Keep production queries, writes, mappings, application-role privileges and database constraints real wherever they are the subject of an assertion. Recording financial ports establish invocation behavior; actual recognition and reversal require the suite using the real posting service.
