---
id: TST-ACC-BAT-119
title: Batch rules batch actions
kind: unit
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/unit/actions/batch-actions.spec.js
implements:
  - ATS-ACC-BAT-004-04
  - ATS-ACC-BAT-004-05
  - ATS-ACC-BAT-004-06
  - ATS-ACC-BAT-016-01
environment: mock
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 1
isolation: Each case owns its supplied rule inputs and test doubles.
assertion_sources:
  - scenario: ATS-ACC-BAT-004-04
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/unit/actions/batch-actions.spec.js#offers
      an open batch post, close and archive
  - scenario: ATS-ACC-BAT-004-04
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/unit/actions/batch-actions.spec.js#offers
      a closed batch post, reopen and archive
  - scenario: ATS-ACC-BAT-004-04
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/unit/actions/batch-actions.spec.js#offers
      a verified batch reopen only
  - scenario: ATS-ACC-BAT-004-04
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/unit/actions/batch-actions.spec.js#offers
      an errored batch post again and reopen
  - scenario: ATS-ACC-BAT-004-04
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/unit/actions/batch-actions.spec.js#offers
      an archived batch unarchive only
  - scenario: ATS-ACC-BAT-004-04
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/unit/actions/batch-actions.spec.js#offers
      a posted or downloaded batch unpost only
  - scenario: ATS-ACC-BAT-004-04
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/unit/actions/batch-actions.spec.js#offers
      a batch posting for half an hour nothing, and one stuck in posting for
      over an hour unpost
  - scenario: ATS-ACC-BAT-004-05
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/unit/actions/batch-actions.spec.js#refuses
      a caller without the action’s permission, 403, before the command runs
  - scenario: ATS-ACC-BAT-004-05
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/unit/actions/batch-actions.spec.js#offers
      a caller who may update but not post the status actions alone
  - scenario: ATS-ACC-BAT-004-06
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/unit/actions/batch-actions.spec.js#lists
      a locked batch’s status actions with the refusal the command would answer
      as disabled_reason
  - scenario: ATS-ACC-BAT-016-01
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/unit/actions/batch-actions.spec.js#offers
      a batch posting for half an hour nothing, and one stuck in posting for
      over an hour unpost
evidence:
  - provenance: observed
    source: >-
      services-accounting:modules/batches/tests/unit/actions/batch-actions.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/unit/actions/batch-actions.spec.js#suite
      header
    note: >-
      Real: the action table, its guards (the batch rules the commands apply)
      and the permission check. Doubled: the execution context,
unbound_scope: null
---

# Batch rules batch actions

## Verification Boundary

This suite exercises the named rule functions with controlled inputs. Its boundary ends before persistent accounting and deployed execution.

## What This Suite Proves

Available actions, authorization, confirmation metadata, locks and system-type restrictions are checked at their declared entry points. The assertion anchors identify the supported portions of the bound scenarios.

## What It Does Not Prove

These checks do not prove transport authorization, transactional storage, scheduling delivery or the whole feature workflow.

## Real Dependencies and Test Doubles

The rule inputs and dependency callbacks are controlled by the case. Database, API dispatch and workflow delivery are outside this boundary.

## Must Not Be Doubled

Qualifying transactional integrity requires real storage and accounting execution beyond this rule-only suite.
