Skip to content

ATS-ACC-CLS-008Complete a guarded month-end close: Capability Test Specification

Markdown

ATS-ACC-CLS-008

Complete a guarded month-end close: Capability Test Specification

Markdown
  • DocumentProposed

KindAcceptance test setProduct areaAccountingModuleMonth-End ClosingRevision1

Read atservices-accounting f47cb263react-console baf6dae3

Coverage

  • Rule gap: FND-ACC-CLS-064
  • Transition covered
  • Validation covered
  • Permission gap: FND-ACC-CLS-064
  • Edge covered
  • Failure covered
  • Boundary covered
  • Concurrency covered
  • Invariant covered
  • Interaction covered

Test Scenarios

10 scenarios proving CAP-ACC-CLS-008; 7 bound to an existing test.

01 Reject an incomplete or unauthorized close requestvalidationapinegativetest
Proves
BR-CAP-ACC-CLS-008-01 BR-CAP-ACC-CLS-008-02
Preconditions
A closer and reader can address the period.
Steps
Submit without a command key, submit as the reader and read a foreign run.
Expected
The requests return validation failure, access denied and not found respectively.
Data
Two callers and a foreign run.
Bound to
services-accounting:modules/fiscal-close/tests/e2e/fiscal-close-runs.e2e.spec.js#refuses a principal without accounting.fiscal-periods.close with 403
Source
services-accounting:modules/fiscal-close/tests/e2e/fiscal-close-runs.e2e.spec.js#the close
02 Reuse matching commands and reject competing contentconcurrencyapinegativetest
Proves
BR-CAP-ACC-CLS-008-03 BR-CAP-ACC-CLS-008-05 INV-DOM-ACC-CLS-003-02 INV-DOM-ACC-CLS-003-05
Preconditions
An open month is eligible for closing.
Steps
Repeat a keyed command, submit a competing key and reuse the first key with another note.
Expected
One run and job remain; competing or changed commands return conflicts.
Data
One period with repeated and competing requests.
Bound to
services-accounting:modules/fiscal-close/tests/integration/services/jobs/close-job.integration.spec.js#refuses another key while the first run holds the period, as period-run-active
services-accounting:modules/fiscal-close/tests/integration/services/jobs/close-job.integration.spec.js#refuses the same key with another body as idempotency-key-reused (409)
services-accounting:modules/fiscal-close/tests/integration/services/persistence/period-close-runs.integration.spec.js#refuses the second request once the first commits, telling it to repeat the request
Source
services-accounting:modules/fiscal-close/tests/integration/services/jobs/close-job.integration.spec.js#idempotency keys
03 Reject another requester’s reused keyedgeapinegativeproposed
Proves
BR-CAP-ACC-CLS-008-04
Preconditions
A saved command belongs to the first closer.
Steps
A colleague submits identical content under that key.
Expected
The product should return a conflict without changing or duplicating the original run.
Data
Two closers sharing one command key.
Source
services-accounting:docs/milestones/ACCT-M4-contracts-and-events-for-commerce.md#Rulings recorded during the milestone
04 Release the period after readiness refusalfailureapinegativetest
Proves
BR-CAP-ACC-CLS-008-06 BR-CAP-ACC-CLS-008-10 INV-DOM-ACC-CLS-002-04
Preconditions
The month contains an unposted batch.
Steps
Submit a close and execute its job.
Expected
Revalidation identifies the blocker, fails without retry, releases the month and writes no close snapshot.
Data
An open batch in the selected period.
Bound to
Source
services-accounting:modules/fiscal-close/tests/integration/services/jobs/close-job.integration.spec.js#a period blocked by an unposted batch
05 Retain the clean close resulttransitionapitest
Proves
BR-CAP-ACC-CLS-008-08 BR-CAP-ACC-CLS-008-13 BR-CAP-ACC-CLS-008-07
Preconditions
A clean period has no recognition work, with a final-period variant.
Steps
Close the period and inspect the run and calendar.
Expected
Ordered steps settle, skipped work is explained, the snapshot and requester are retained and final-period kind is year close.
Data
Clean monthly and year-end fixtures.
Bound to
services-accounting:modules/fiscal-close/tests/integration/services/jobs/close-job.integration.spec.js#settles every step: the revenue and COGS steps skipped, the others completed
Source
services-accounting:modules/fiscal-close/tests/integration/services/jobs/close-job.integration.spec.js#a clean period
06 Replay committed recognition without duplicationinvariantapitest
Proves
BR-CAP-ACC-CLS-008-09 INV-DOM-ACC-CLS-003-07
Preconditions
Recognition has completed or failed before its transaction committed.
Steps
Repeat the step and retry the failed attempt.
Expected
Committed output is reused and the successful recognition posts one batch.
Data
A due schedule and replay or fault fixture.
Bound to
services-accounting:modules/fiscal-close/tests/integration/services/jobs/revenue-recognition.integration.spec.js#answers the step run again once done with what it recorded, writing nothing
services-accounting:modules/fiscal-close/tests/integration/services/jobs/revenue-recognition.integration.spec.js#posts August's batch once, under the run's key: the failed attempt left nothing
Source
services-accounting:modules/fiscal-close/tests/integration/services/jobs/revenue-recognition.integration.spec.js#a retried recognition step
07 Record warnings omitted from the commandedgeapiproposed
Proves
BR-CAP-ACC-CLS-008-11
Preconditions
Readiness has an advisory unverified-payout warning.
Steps
Submit a close without acknowledging that check.
Expected
Execution completes and records the omitted warning in its history.
Data
A reconciled unverified payout.
Source
services-accounting:modules/fiscal-close/services/jobs/fiscal-close-job-tasks.ts:revalidate
08 Confirm the month label in the consolevalidationbrowsertest
Proves
BR-CAP-ACC-CLS-008-12
Preconditions
The clean month has no warning outcomes.
Steps
Enter an incorrect label and then the exact label in the close dialog.
Expected
The incorrect label prevents submission and the exact label leads to the run page.
Data
The clean-close browser fixture.
Bound to
Source
react-console:acceptance/accounting/playwright/journeys/reconciliation-close/ACT-ACC-0613.spec.ts#ACT-ACC-0613
09 Keep one close outcome across financial work and recoveryinteractionapiproposed
Proves
BR-CAP-ACC-CLS-008-05 BR-CAP-ACC-CLS-008-08 BR-CAP-ACC-CLS-008-09 BR-CAP-ACC-CLS-008-13
Preconditions
An ended final month has due revenue, complete readiness and a following open month.
Steps
Start closing; after recognition, inject a finalization failure, inspect protection and refuse cancellation, then retry and read the calendar, close record and aging output.
Expected
The recovered close retains one financial recognition result and one captured record; year standing and aging output refer to that successful close.
Data
An ended final month has due revenue, complete readiness and a following open month.
Source
rhythm-v2-docs:specs/accounting/close/design/workflows/WF-ACC-CLS-001-close-a-month.md#What It Does,services-accounting:modules/fiscal-close/tests/integration/services/jobs/close-job.integration.spec.js#refuses another key while the first run holds the period, as period-run-active,services-accounting:modules/fiscal-close/tests/e2e/fiscal-close-runs.e2e.spec.js#reads the run succeeded with its six steps,services-accounting:modules/fiscal-close/services/jobs/fiscal-close-job-tasks.ts:rollForward,services-accounting:modules/fiscal-close/tests/integration/services/jobs/close-job.integration.spec.js#closes the period, by the requester, naming the run
10 Reject oversized close commands without creating runsboundaryapinegativetest
Proves
BR-CAP-ACC-CLS-008-01
Preconditions
An eligible month is addressed by an authorized closer.
Steps
Submit an empty key, a 256-character key, a 2001-character note and fifty-one warning acknowledgements; compare the run count.
Expected
Every oversized or empty-key request returns validation failure and creates no run.
Data
An eligible month is addressed by an authorized closer.
Bound to
Source
react-console:acceptance/accounting/playwright/journeys/reconciliation-close/ACT-ACC-0617.spec.ts#step 6

The Markdown files under specs/ in rhythmsoftware/rhythm-v2-docs are the canonical source of truth. This reader is a generated, read-only projection of them.