---
id: FAS-ACC-BAT-03
feature: FEAT-ACC-BAT-03
product_area: accounting
module: batches
revision: 1
status: proposed
product_intent: proposed
source_sha:
  services-accounting: f47cb263875bbc0c5640fba7dae6785ec32695f8
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
  rhythm-v2-docs: 37405d50d1465ea0571a66095d98ebec4db04175
capabilities:
  - CAP-ACC-BAT-012
  - CAP-ACC-BAT-013
  - CAP-ACC-BAT-014
  - CAP-ACC-BAT-015
  - CAP-ACC-BAT-016
scenarios:
  - id: FAS-ACC-BAT-03-01
    title: Posting connects readiness accounts and entries
    kind: behaviour
    exercises:
      - CAP-ACC-BAT-012
      - CAP-ACC-BAT-013
      - CAP-ACC-BAT-014
      - CAP-ACC-BAT-015
    relies_on:
      - ATS-ACC-BAT-012-03
      - ATS-ACC-BAT-013-02
      - ATS-ACC-BAT-014-01
      - ATS-ACC-BAT-015-03
    preconditions: Morning contains a valid taxed accrual invoice and configured accounts.
    steps:
      - do: >-
          Preview Morning, submit Post and inspect the completed job, line
          snapshots and ledger entry.
        expect: >-
          Readiness identifies Morning, the job completes and the stored entry
          balances with the resolved destinations.
        provenance: proposed
        source: >-
          rhythm-v2-docs:specs/accounting/batches/design/tests/ATS-ACC-BAT-012-check-before-posting-what-would-stop-a-batch.md#ATS-ACC-BAT-012-03;
          rhythm-v2-docs:specs/accounting/batches/design/tests/ATS-ACC-BAT-013-post-batches-to-the-subledger-as-one-watched-job.md#ATS-ACC-BAT-013-02;
          rhythm-v2-docs:specs/accounting/batches/design/tests/ATS-ACC-BAT-014-resolve-and-freeze-the-accounts-when-a-batch-posts.md#ATS-ACC-BAT-014-01;
          rhythm-v2-docs:specs/accounting/batches/design/tests/ATS-ACC-BAT-015-turn-each-document-into-its-balanced-entry.md#ATS-ACC-BAT-015-03
    expected: >-
      Readiness identifies Morning, the job completes and the stored entry
      balances with the resolved destinations.
    negative: false
    data_needs: >-
      An isolated workspace, business unit and owned fixtures matching the
      stated accounting setup.
    bound_to: []
    provenance: proposed
    source: >-
      rhythm-v2-docs:specs/accounting/batches/design/tests/ATS-ACC-BAT-012-check-before-posting-what-would-stop-a-batch.md#ATS-ACC-BAT-012-03;
      rhythm-v2-docs:specs/accounting/batches/design/tests/ATS-ACC-BAT-013-post-batches-to-the-subledger-as-one-watched-job.md#ATS-ACC-BAT-013-02;
      rhythm-v2-docs:specs/accounting/batches/design/tests/ATS-ACC-BAT-014-resolve-and-freeze-the-accounts-when-a-batch-posts.md#ATS-ACC-BAT-014-01;
      rhythm-v2-docs:specs/accounting/batches/design/tests/ATS-ACC-BAT-015-turn-each-document-into-its-balanced-entry.md#ATS-ACC-BAT-015-03
  - id: FAS-ACC-BAT-03-02
    title: Account correction changes preview and posting
    kind: interaction
    exercises:
      - CAP-ACC-BAT-012
      - CAP-ACC-BAT-013
      - CAP-ACC-BAT-014
      - CAP-ACC-BAT-015
    relies_on:
      - ATS-ACC-BAT-012-02
      - ATS-ACC-BAT-013-08
      - ATS-ACC-BAT-014-02
    preconditions: Morning holds an issued invoice with no resolvable revenue account.
    steps:
      - do: >-
          Preview, post, inspect the error, configure the account, preview again
          and retry posting.
        expect: >-
          The first accounting attempt leaves no entry; the correction permits a
          successful retry using the newly resolved destination.
        provenance: proposed
        source: >-
          rhythm-v2-docs:specs/accounting/batches/design/tests/ATS-ACC-BAT-012-check-before-posting-what-would-stop-a-batch.md#ATS-ACC-BAT-012-02;
          rhythm-v2-docs:specs/accounting/batches/design/tests/ATS-ACC-BAT-013-post-batches-to-the-subledger-as-one-watched-job.md#ATS-ACC-BAT-013-08;
          rhythm-v2-docs:specs/accounting/batches/design/tests/ATS-ACC-BAT-014-resolve-and-freeze-the-accounts-when-a-batch-posts.md#ATS-ACC-BAT-014-02
    expected: >-
      The first accounting attempt leaves no entry; the correction permits a
      successful retry using the newly resolved destination.
    negative: true
    data_needs: >-
      An isolated workspace, business unit and owned fixtures matching the
      stated accounting setup.
    bound_to: []
    provenance: proposed
    source: >-
      rhythm-v2-docs:specs/accounting/batches/design/tests/ATS-ACC-BAT-012-check-before-posting-what-would-stop-a-batch.md#ATS-ACC-BAT-012-02;
      rhythm-v2-docs:specs/accounting/batches/design/tests/ATS-ACC-BAT-013-post-batches-to-the-subledger-as-one-watched-job.md#ATS-ACC-BAT-013-08;
      rhythm-v2-docs:specs/accounting/batches/design/tests/ATS-ACC-BAT-014-resolve-and-freeze-the-accounts-when-a-batch-posts.md#ATS-ACC-BAT-014-02
  - id: FAS-ACC-BAT-03-03
    title: Ordinary recovery creates a replacement current set
    kind: lifecycle
    exercises:
      - CAP-ACC-BAT-013
      - CAP-ACC-BAT-014
      - CAP-ACC-BAT-015
      - CAP-ACC-BAT-016
    relies_on:
      - ATS-ACC-BAT-013-03
      - ATS-ACC-BAT-014-03
      - ATS-ACC-BAT-016-02
      - ATS-ACC-BAT-016-05
    preconditions: Morning has a current posting and its fiscal period remains Open.
    steps:
      - do: >-
          Unpost, inspect retained history, correct eligible documents and post
          again.
        expect: >-
          Recovery restores Open without old entries; replacement posting
          creates fresh snapshots and one current entry set.
        provenance: proposed
        source: >-
          rhythm-v2-docs:specs/accounting/batches/design/tests/ATS-ACC-BAT-013-post-batches-to-the-subledger-as-one-watched-job.md#ATS-ACC-BAT-013-03;
          rhythm-v2-docs:specs/accounting/batches/design/tests/ATS-ACC-BAT-014-resolve-and-freeze-the-accounts-when-a-batch-posts.md#ATS-ACC-BAT-014-03;
          rhythm-v2-docs:specs/accounting/batches/design/tests/ATS-ACC-BAT-016-take-a-posting-back-and-post-again.md#ATS-ACC-BAT-016-02;
          rhythm-v2-docs:specs/accounting/batches/design/tests/ATS-ACC-BAT-016-take-a-posting-back-and-post-again.md#ATS-ACC-BAT-016-05
    expected: >-
      Recovery restores Open without old entries; replacement posting creates
      fresh snapshots and one current entry set.
    negative: false
    data_needs: >-
      An isolated workspace, business unit and owned fixtures matching the
      stated accounting setup.
    bound_to: []
    provenance: proposed
    source: >-
      rhythm-v2-docs:specs/accounting/batches/design/tests/ATS-ACC-BAT-013-post-batches-to-the-subledger-as-one-watched-job.md#ATS-ACC-BAT-013-03;
      rhythm-v2-docs:specs/accounting/batches/design/tests/ATS-ACC-BAT-014-resolve-and-freeze-the-accounts-when-a-batch-posts.md#ATS-ACC-BAT-014-03;
      rhythm-v2-docs:specs/accounting/batches/design/tests/ATS-ACC-BAT-016-take-a-posting-back-and-post-again.md#ATS-ACC-BAT-016-02;
      rhythm-v2-docs:specs/accounting/batches/design/tests/ATS-ACC-BAT-016-take-a-posting-back-and-post-again.md#ATS-ACC-BAT-016-05
  - id: FAS-ACC-BAT-03-04
    title: Preview posting and recovery have distinct grants
    kind: permission
    exercises:
      - CAP-ACC-BAT-012
      - CAP-ACC-BAT-013
      - CAP-ACC-BAT-016
    relies_on:
      - ATS-ACC-BAT-012-01
      - ATS-ACC-BAT-013-01
      - ATS-ACC-BAT-016-01
    preconditions: 'Reader, staff and administrator personas share an isolated postable batch.'
    steps:
      - do: >-
          Preview as reader, attempt posting as reader, post as staff, attempt
          recovery as staff and recover as administrator.
        expect: >-
          Readiness succeeds for reader; reader posting and staff recovery fail
          with 403; permitted accounting work succeeds.
        provenance: proposed
        source: >-
          rhythm-v2-docs:specs/accounting/batches/design/tests/ATS-ACC-BAT-012-check-before-posting-what-would-stop-a-batch.md#ATS-ACC-BAT-012-01;
          rhythm-v2-docs:specs/accounting/batches/design/tests/ATS-ACC-BAT-013-post-batches-to-the-subledger-as-one-watched-job.md#ATS-ACC-BAT-013-01;
          rhythm-v2-docs:specs/accounting/batches/design/tests/ATS-ACC-BAT-016-take-a-posting-back-and-post-again.md#ATS-ACC-BAT-016-01
    expected: >-
      Readiness succeeds for reader; reader posting and staff recovery fail with
      403; permitted accounting work succeeds.
    negative: true
    data_needs: >-
      An isolated workspace, business unit and owned fixtures matching the
      stated accounting setup.
    bound_to: []
    provenance: proposed
    source: >-
      rhythm-v2-docs:specs/accounting/batches/design/tests/ATS-ACC-BAT-012-check-before-posting-what-would-stop-a-batch.md#ATS-ACC-BAT-012-01;
      rhythm-v2-docs:specs/accounting/batches/design/tests/ATS-ACC-BAT-013-post-batches-to-the-subledger-as-one-watched-job.md#ATS-ACC-BAT-013-01;
      rhythm-v2-docs:specs/accounting/batches/design/tests/ATS-ACC-BAT-016-take-a-posting-back-and-post-again.md#ATS-ACC-BAT-016-01
  - id: FAS-ACC-BAT-03-05
    title: A stored-write refusal leaves the entire request intact
    kind: regression
    exercises:
      - CAP-ACC-BAT-013
      - CAP-ACC-BAT-014
      - CAP-ACC-BAT-015
      - CAP-ACC-BAT-016
    relies_on:
      - ATS-ACC-BAT-013-07
    preconditions: >-
      A postable request contains valid documents and a controlled database
      write refusal.
    steps:
      - do: >-
          Run the actual task handler, inspect failed job phases and reread
          batch, posting, entries and schedules.
        expect: >-
          The transactional refusal fails the job and preserves pre-request
          accounting without a partial generation.
        provenance: proposed
        source: >-
          services-accounting:modules/batches/tests/integration/services/jobs/deployed-task-handler.integration.spec.js#fails
          the job on a step the database refuses: refused once, recorded by the
          failure task, the batch open and nothing written
    expected: >-
      The transactional refusal fails the job and preserves pre-request
      accounting without a partial generation.
    negative: true
    data_needs: >-
      An isolated workspace, business unit and owned fixtures matching the
      stated accounting setup.
    bound_to: []
    provenance: proposed
    source: >-
      services-accounting:modules/batches/tests/integration/services/jobs/deployed-task-handler.integration.spec.js#fails
      the job on a step the database refuses: refused once, recorded by the
      failure task, the batch open and nothing written
    note: >-
      The inspected handler test asserts batch, posting and entry rollback; it
      does not inspect the entire proposed schedule verification.
evidence:
  - source: CAP-ACC-BAT-012
    provenance: documented
    note: >-
      Feature-level scenarios compose the capability outcomes; no complete
      executable binding is inferred from isolated assertions.
  - source: CAP-ACC-BAT-013
    provenance: documented
    note: >-
      Feature-level scenarios compose the capability outcomes; no complete
      executable binding is inferred from isolated assertions.
  - source: CAP-ACC-BAT-014
    provenance: documented
    note: >-
      Feature-level scenarios compose the capability outcomes; no complete
      executable binding is inferred from isolated assertions.
  - source: CAP-ACC-BAT-015
    provenance: documented
    note: >-
      Feature-level scenarios compose the capability outcomes; no complete
      executable binding is inferred from isolated assertions.
  - source: CAP-ACC-BAT-016
    provenance: documented
    note: >-
      Feature-level scenarios compose the capability outcomes; no complete
      executable binding is inferred from isolated assertions.
---

# Posting and ordinary recovery: Feature Acceptance Suite

## What the Feature Must Do as a Whole

Readiness, submission, resolution, generation and recovery form one accounting outcome. The suite follows failures and correction as well as successful completion.

## Interactions Between Capabilities

Missing destinations affect readiness and generated entries. Recovery revisits snapshots and current entries rather than assuming that a completed job alone proves replacement accounting.

## Regression Record

| Revision | Change | Scenario | Why |
|---|---|---|---|
| 1 | initial | all | Establish cumulative feature acceptance from the pinned planning and design outcomes. |
