---
id: TST-ACC-BAT-117
title: Batch integration preview next roll
kind: integration
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/integration/services/roll/preview-next-roll.integration.spec.js
implements:
  - 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-010-08
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/integration/services/roll/preview-next-roll.integration.spec.js#answers
      the plan of its next occurrence, dated the occurrence’s local date in the
      schedule’s zone
  - scenario: ATS-ACC-BAT-010-08
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/integration/services/roll/preview-next-roll.integration.spec.js#records
      no run: the schedule’s history is the one run it had
  - scenario: ATS-ACC-BAT-010-08
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/integration/services/roll/preview-next-roll.integration.spec.js#refuses
      409 for an inactive recurring batch
  - scenario: ATS-ACC-BAT-010-08
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/integration/services/roll/preview-next-roll.integration.spec.js#refuses
      409 for a recurring batch whose schedule the system paused
  - scenario: ATS-ACC-BAT-010-08
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/integration/services/roll/preview-next-roll.integration.spec.js#refuses
      409 for a recurring batch whose schedule is disabled with no pause
evidence:
  - provenance: observed
    source: >-
      services-accounting:modules/batches/tests/integration/services/roll/preview-next-roll.integration.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/integration/services/roll/preview-next-roll.integration.spec.js#suite
      header
    note: >-
      Real: PostgreSQL, the persistence services, the fiscal period lookup, the
      Liquid renderer, the execution context and its
  - provenance: documented
    source: >-
      services-accounting:modules/batches/tests/integration/services/roll/preview-next-roll.integration.spec.js#suite
      header
    note: >-
      transactions under `rhythm_accounting_app`. Doubled: the fiscal period
      lookup in the two cases that name it. Never doubled: the
unbound_scope: null
---

# Batch integration preview next roll

## Verification Boundary

This suite exercises the imported batch services or storage against the prepared local database. It does not imply that a deployed workflow is contacted.

## What This Suite Proves

The next plan is read without creating an occurrence, and unavailable or invalid stream plans are refused. 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.
