---
id: TST-ACC-BAT-061
title: Batch API recurring batches
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/recurring-batches.e2e.spec.js
implements:
  - ATS-ACC-BAT-009-01
  - ATS-ACC-BAT-009-02
  - ATS-ACC-BAT-009-03
  - ATS-ACC-BAT-009-04
  - ATS-ACC-BAT-009-06
  - ATS-ACC-BAT-009-07
  - ATS-ACC-BAT-009-08
  - ATS-ACC-BAT-009-10
  - ATS-ACC-BAT-010-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: >-
  The suite owns its test workspace or fixed integration fixtures in the
  prepared local database.
assertion_sources:
  - scenario: ATS-ACC-BAT-009-01
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/e2e/recurring-batches.e2e.spec.js#answers
      409 to a change of business unit
  - scenario: ATS-ACC-BAT-009-02
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/e2e/recurring-batches.e2e.spec.js#answers
      400 naming schedule to a body without one
  - scenario: ATS-ACC-BAT-009-02
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/e2e/recurring-batches.e2e.spec.js#answers
      400 to a name whose id the tenant already has
  - scenario: ATS-ACC-BAT-009-03
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/e2e/recurring-batches.e2e.spec.js#answers
      400 to a schedule that would run more often than once a day
  - scenario: ATS-ACC-BAT-009-03
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/e2e/recurring-batches.e2e.spec.js#writes
      no recurring batch for that refused create: its id reads back 404
  - scenario: ATS-ACC-BAT-009-04
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/e2e/recurring-batches.e2e.spec.js#answers
      400 naming batch_name_template to a template Liquid cannot read
  - scenario: ATS-ACC-BAT-009-04
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/e2e/recurring-batches.e2e.spec.js#answers
      400 naming batch_code_template to a template using a variable a batch
      template does not provide
  - scenario: ATS-ACC-BAT-009-06
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/e2e/recurring-batches.e2e.spec.js#answers
      no next run once deactivated
  - scenario: ATS-ACC-BAT-009-06
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/e2e/recurring-batches.e2e.spec.js#answers
      the next run again once reactivated
  - scenario: ATS-ACC-BAT-009-07
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/e2e/recurring-batches.e2e.spec.js#moves
      the next run and the sentence to the new time, where they were 5 PM
  - scenario: ATS-ACC-BAT-009-07
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/e2e/recurring-batches.e2e.spec.js#answers
      409 StaleObject to a replacement at the version first read
  - scenario: ATS-ACC-BAT-009-07
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/e2e/recurring-batches.e2e.spec.js#answers
      400 to a replacement without sys_version
  - scenario: ATS-ACC-BAT-009-08
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/e2e/recurring-batches.e2e.spec.js#answers
      409 naming the settings and how they name it
  - scenario: ATS-ACC-BAT-009-10
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/e2e/recurring-batches.e2e.spec.js#answers
      409 naming recurring batches
  - scenario: ATS-ACC-BAT-009-10
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/e2e/recurring-batches.e2e.spec.js#keeps
      the unit
  - scenario: ATS-ACC-BAT-010-08
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/e2e/recurring-batches.e2e.spec.js#records
      nothing: the history is still empty
evidence:
  - provenance: observed
    source: >-
      services-accounting:modules/batches/tests/e2e/recurring-batches.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/recurring-batches.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/recurring-batches.e2e.spec.js#suite
      header
    note: >-
      Liquid renderer and PostgreSQL (its triggers, row-level security).
      Doubled: the signing key pair, which is the run's own; the
  - provenance: documented
    source: >-
      services-accounting:modules/batches/tests/e2e/recurring-batches.e2e.spec.js#suite
      header
    note: >-
      generated by the fiscal-years persistence service with its clock at
      `STARTS_AT`, as no route generates that far ahead. Never doubled: the
      dispatcher, the route
unbound_scope: null
---

# Batch API recurring batches

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

Configuration creation, versioned replacement, scheduling fields and guarded removal are checked against their owned records. 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.
