Skip to content

ATS-ACC-CLS-012Recover an interrupted close or reopen: Capability Test Specification

Markdown

ATS-ACC-CLS-012

Recover an interrupted close or reopen: Capability Test Specification

Markdown
  • DocumentProposed

KindAcceptance test setProduct areaAccountingModuleMonth-End ClosingRevision2

Read atservices-accounting f47cb263react-console baf6dae3

Coverage

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

Test Scenarios

9 scenarios proving CAP-ACC-CLS-012; 5 bound to an existing test.

01 Resume a retained period after execution failurefailureapitest
Proves
BR-CAP-ACC-CLS-012-01 BR-CAP-ACC-CLS-012-02
Preconditions
A reopen fails after locking and a close has a failed recognition attempt.
Steps
Inspect each period and retry eligible work.
Expected
Protection remains during failure and resumed work completes without duplicate recognition.
Data
Close and reopen fault fixtures.
Bound to
Source
services-accounting:modules/fiscal-close/tests/integration/services/jobs/reopen-job.integration.spec.js#a reopen failing after its lock
02 Require a fresh close after period releasefailureapinegativetest
Proves
BR-CAP-ACC-CLS-012-03 BR-CAP-ACC-CLS-012-04
Preconditions
Readiness refuses one run and empty finalization fails another.
Steps
Attempt retry and then submit a fresh close after fixing the cause.
Expected
Retries are refused for released periods and the new close can complete.
Data
Readiness and empty-finalization failure fixtures.
Bound to
services-accounting:modules/fiscal-close/tests/integration/services/jobs/close-job.integration.spec.js#fails the run on finalize, not retryable, saying the period was given back (DEF-ACT-0819)
Source
services-accounting:modules/fiscal-close/tests/integration/services/jobs/close-job.integration.spec.js#a failure in finalize, then a new close
03 Cancel only before committed recognitiontransitionapinegativetest
Proves
BR-CAP-ACC-CLS-012-05 BR-CAP-ACC-CLS-012-06 BR-CAP-ACC-CLS-012-07
Preconditions
One failed close recognized revenue and another did not.
Steps
Attempt cancellation and repeat an already-completed cancellation.
Expected
The eligible cancellation leaves the month open; recognized revenue prevents cancellation and repeated cancellation is refused.
Data
Two failed-close variants.
Bound to
services-accounting:modules/fiscal-close/tests/integration/services/jobs/close-job.integration.spec.js#leaves the period open with no run holding it (finalize had already given it back)
services-accounting:modules/fiscal-close/tests/integration/services/jobs/close-job.integration.spec.js#reverses nothing: the port was asked to recognise once, by the close’s event key
Source
services-accounting:modules/fiscal-close/tests/integration/services/jobs/close-job.integration.spec.js#a cancel before finalize
04 Restore close details after cancelling a reopentransitionapiproposed
Proves
BR-CAP-ACC-CLS-012-05
Preconditions
The reopen failed after locking but before reversal.
Steps
Cancel its run.
Expected
The original closed state, closer and close time return while the run becomes cancelled.
Data
A pre-reversal reopen failure.
Source
services-accounting:modules/fiscal-close/services/jobs/close-run-actions.ts:cancelCloseRun
05 Authorize recovery by run kindpermissionapinegativetest
Proves
BR-CAP-ACC-CLS-012-08 INV-DOM-ACC-CLS-003-11
Preconditions
The caller lacks the close grant on a failed close.
Steps
Request retry and cancellation.
Expected
Both are denied and the run remains unchanged.
Data
A failed close and callers without its action grant.
Bound to
services-accounting:modules/fiscal-close/tests/e2e/fiscal-close-runs.e2e.spec.js#refuses a reader’s retry with 403: the handler requires the run’s kind’s key
Source
services-accounting:modules/fiscal-close/tests/e2e/fiscal-close-runs.e2e.spec.js#refuses a reader’s retry with 403: the handler requires the run’s kind’s key
06 Describe cancellation honestly before confirmationpermissionbrowsernegativeproposed
Proves
BR-CAP-ACC-CLS-012-10
Preconditions
Failed closes differ in committed recognition work.
Steps
Open their cancellation confirmations.
Expected
The product should explain refusal after recognition and the eligible return to open before asking for confirmation.
Data
Failed runs with and without recognition.
Source
react-console:acceptance/accounting/journeys/reconciliation-close/ACT-ACC-0618.json
07 Inspect recovery history without repeating financial workinteractionapiproposed
Proves
BR-CAP-ACC-CLS-012-01 BR-CAP-ACC-CLS-012-02 BR-CAP-ACC-CLS-012-06
Preconditions
A close has recognized revenue and fails during finalization.
Steps
Inspect the failed step, refuse cancellation, retry, then read the combined attempt history and recognition output.
Expected
The same run resumes through a linked job with its committed revenue retained; the view reports the available attempts and completion.
Data
A close has recognized revenue and fails during finalization.
Source
rhythm-v2-docs:specs/accounting/close/design/workflows/WF-ACC-CLS-003-retry-an-interrupted-close-or-reopen.md#What It Does,services-accounting:modules/fiscal-close/tests/integration/services/jobs/reopen-job.integration.spec.js#leaves the period reopening,services-accounting:modules/fiscal-close/tests/integration/services/jobs/reopen-job.integration.spec.js#finishes the reopen on retry,services-accounting:modules/fiscal-close/tests/integration/services/jobs/close-job.integration.spec.js#refuses the cancel as run-not-cancellable, naming the way out
08 Cancel a queued request before its job startstransitionapinegativeproposed
Proves
BR-CAP-ACC-CLS-012-05 BR-CAP-ACC-CLS-012-07
Preconditions
A close is saved as queued while its month remains open and its job has not started.
Steps
Cancel it and then invoke its lock task.
Expected
Cancellation leaves the month open, records a final cancelled run and prevents the late job from taking the month.
Data
A close is saved as queued while its month remains open and its job has not started.
Source
services-accounting:modules/fiscal-close/services/jobs/close-run-actions.ts:cancelCloseRun
09 Keep completed and cancelled run outcomes finalinvariantunittest
Proves
BR-CAP-ACC-CLS-012-07 INV-DOM-ACC-CLS-003-03
Preconditions
Run fixtures cover successful and cancelled outcomes.
Steps
Ask the transition rule to move each final outcome into every other status.
Expected
Every attempted outgoing move receives a finished-run refusal.
Data
Run fixtures cover successful and cancelled outcomes.
Bound to
services-accounting:modules/fiscal-close/tests/unit/rules/transitions.spec.js#is refused every move out of a succeeded or cancelled run as finished
Source
services-accounting:modules/fiscal-close/tests/unit/rules/transitions.spec.js#is refused every move out of a succeeded or cancelled run as finished

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.