---
id: TST-ACC-BAT-056
title: Batch API batch assignment settings
kind: api-lifecycle
product_area: accounting
module: batches
revision: 1
status: draft
product_intent: proposed
implementation_evidence: observed
source_sha:
  services-accounting: f47cb263875bbc0c5640fba7dae6785ec32695f8
repository: services-accounting
files:
  - modules/batches/tests/e2e/batch-assignment-settings.e2e.spec.js
implements:
  - ATS-ACC-BAT-011-01
  - ATS-ACC-BAT-011-03
  - ATS-ACC-BAT-011-04
  - ATS-ACC-BAT-011-05
  - ATS-ACC-BAT-011-08
  - ATS-ACC-BAT-011-09
environment: local
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 5
isolation: >-
  The suite owns its test workspace or fixed integration fixtures in the
  prepared local database.
assertion_sources:
  - scenario: ATS-ACC-BAT-011-01
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/e2e/batch-assignment-settings.e2e.spec.js#accepts
      100 rules, the most a unit’s settings hold
  - scenario: ATS-ACC-BAT-011-01
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/e2e/batch-assignment-settings.e2e.spec.js#answers
      400 to 101 rules
  - scenario: ATS-ACC-BAT-011-03
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/e2e/batch-assignment-settings.e2e.spec.js#answers
      404 to a read of its settings
  - scenario: ATS-ACC-BAT-011-03
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/e2e/batch-assignment-settings.e2e.spec.js#creates
      the settings and answers the rules numbered from 1 in the order sent,
      every empty criterion null
  - scenario: ATS-ACC-BAT-011-03
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/e2e/batch-assignment-settings.e2e.spec.js#answers
      400 to a save without sys_version
  - scenario: ATS-ACC-BAT-011-03
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/e2e/batch-assignment-settings.e2e.spec.js#answers
      409 StaleObject to a save at the version first read
  - scenario: ATS-ACC-BAT-011-04
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/e2e/batch-assignment-settings.e2e.spec.js#answers
      400 to another unit’s recurring batch as the default
  - scenario: ATS-ACC-BAT-011-04
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/e2e/batch-assignment-settings.e2e.spec.js#answers
      400 to another unit’s recurring batch in a rule
  - scenario: ATS-ACC-BAT-011-05
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/e2e/batch-assignment-settings.e2e.spec.js#answers
      400 naming bank_account_id to a rule naming both a merchant and a bank
      account
  - scenario: ATS-ACC-BAT-011-05
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/e2e/batch-assignment-settings.e2e.spec.js#answers
      400 to a transaction type the vocabulary does not have
  - scenario: ATS-ACC-BAT-011-08
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/e2e/batch-assignment-settings.e2e.spec.js#answers
      the first rule by position when two rules match
  - scenario: ATS-ACC-BAT-011-08
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/e2e/batch-assignment-settings.e2e.spec.js#answers
      the default with no position when no rule matches
  - scenario: ATS-ACC-BAT-011-08
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/e2e/batch-assignment-settings.e2e.spec.js#answers
      404 to an evaluation
  - scenario: ATS-ACC-BAT-011-08
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/e2e/batch-assignment-settings.e2e.spec.js#answers
      400 to facts without a transaction type
  - scenario: ATS-ACC-BAT-011-09
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/e2e/batch-assignment-settings.e2e.spec.js#frees
      the recurring batches the settings named: the default deletes now
evidence:
  - provenance: observed
    source: >-
      services-accounting:modules/batches/tests/e2e/batch-assignment-settings.e2e.spec.js
    note: >-
      The executable file is inspected at the pinned revision; duration is an
      unmeasured planning estimate.
  - provenance: documented
    source: >-
      services-accounting:modules/batches/tests/e2e/batch-assignment-settings.e2e.spec.js#suite
      header
    note: >-
      Real: the composed handler (the dispatcher, the tenant access gate, the
      application access and licence steps), the routes,
  - provenance: documented
    source: >-
      services-accounting:modules/batches/tests/e2e/batch-assignment-settings.e2e.spec.js#suite
      header
    note: >-
      PostgreSQL (its same-unit keys, triggers, row-level security). Doubled:
      the signing key pair, which is the run's own. Never
unbound_scope: null
---

# Batch API batch assignment settings

## Verification Boundary

This suite invokes the composed Accounting dispatcher locally against the prepared database. It exercises request mapping, declared authorization checks and the asserted persistence results.

## What This Suite Proves

Ordered rules, reference validation, replacement and selection are checked against saved routing configuration. The assertion anchors identify the supported portions of the bound scenarios.

## What It Does Not Prove

Local assertions do not establish deployment configuration, remote delivery guarantees, or unasserted lifecycle and concurrency paths.

## Real Dependencies and Test Doubles

PostgreSQL and the exercised persistence or accounting functions are real. Controlled clocks, imported test fixtures and any suite-specific doubles delimit the asserted behavior.

## Must Not Be Doubled

The database constraints, transaction boundaries and exercised accounting functions must remain real when qualifying the asserted persistence or generation behavior.
