---
id: TST-ACC-BAT-109
title: Batch integration rebuilt service periods
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/posting/rebuilt-service-periods.integration.spec.js
implements:
  - ATS-ACC-BAT-019-06
  - ATS-ACC-BAT-019-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-019-06
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/integration/services/posting/rebuilt-service-periods.integration.spec.js#writes
      the memo's schedule on A's entries after the effective date alone: the 20
      September primary and its split, −54.00 and −6.00
  - scenario: ATS-ACC-BAT-019-06
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/integration/services/posting/rebuilt-service-periods.integration.spec.js#writes
      the memo's schedule by days: the 20 August entries carry 25 of their 31
      days, the 20 September entries all of theirs, summing to −60.00
  - scenario: ATS-ACC-BAT-019-09
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/integration/services/posting/rebuilt-service-periods.integration.spec.js#answers
      A’s line with 240.00 still deferred across the invoice’s and the memo’s
      schedules, on the view and on the read
evidence:
  - provenance: observed
    source: >-
      services-accounting:modules/batches/tests/integration/services/posting/rebuilt-service-periods.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/posting/rebuilt-service-periods.integration.spec.js#suite
      header
    note: >-
      Real: the integration database, the invoice and memo commands, the tenant
      settings and their routes, the billing service
  - provenance: documented
    source: >-
      services-accounting:modules/batches/tests/integration/services/posting/rebuilt-service-periods.integration.spec.js#suite
      header
    note: >-
      function (its handler and the dispatcher in trusted-invoke mode), the
      native posting engine, the reads. Doubled: the Lambda
unbound_scope: null
---

# Batch integration rebuilt service periods

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

Service-period generation and effective-date correction are checked against the configured period and day weighting. 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.
