Skip to content

CAP-ACC-CLS-012Recover an interrupted close or reopen

Markdown

CAP-ACC-CLS-012

Recover an interrupted close or reopen

Markdown
  • DocumentDraft
  • Product intentProposed
  • ImplementationInconsistent

KindCapabilityProduct areaAccountingModuleMonth-End ClosingRevision1

Read atservices-accounting f47cb263react-console baf6dae3

The Formal Contract

The narrative above explains; the sections below are authoritative — the rules, scenarios and tests this document binds.

Outcomes
Committed work survives retry without duplicate revenue posting.The period remains protected until recovery safely releases it.
Surfaces
consoleapijob
Intent sources
services-accounting:docs/milestones/walkthroughs/ACCT-M4-handoff.md#A failed fiscal-close finalize releases the period (DEF-ACT-0819)

Controls

30 controls apply, from the corpus control catalogue.

TC-IAM-001 TC-IAM-002 TC-IAM-004 TC-IAM-005 TC-IAM-006 TC-AZ-001 TC-AZ-002 TC-AZ-003 TC-AZ-004 TC-AZ-005 TC-AZ-006 TC-TEN-001 TC-TEN-002 TC-TEN-003 TC-DAT-001 TC-LOG-001 TC-LOG-002 TC-LOG-003 TC-LOG-004 TC-LOG-005 TC-AVL-001 TC-AVL-004 TC-MON-001 TC-MON-002 TC-MON-004 TC-PI-001 TC-PI-002 TC-PI-003 TC-PI-004 TC-PI-005

Permissions

KeyChecked atScope
accounting.fiscal-periods.readapitenant
accounting.fiscal-periods.closeservicetenant
accounting.fiscal-periods.reopenservicetenant

Business Rules

10 rules, 8 to be proved before approval. A rule's product intent is derived from its origin: 0 confirmed by a product decision, the rest inheriting this capability's proposed.

IdRuleKindEnforced atProvenance
01must prove
Proposed
A failed run that retains its period leaves it closing or reopening until a permitted recovery action completes.
lifecycleservicetest
02must prove
Proposed
A failed run retaining its period can resume through a new retry job that preserves committed steps.
origin: fiscal-close design L9 (Rhythm 1.0 CLOSE-9 and REOPEN-6 fixed)
lifecycleservicetest
03must prove
Proposed
A readiness refusal or lock refusal leaves no retained period to retry and requires a fresh eligible request.
validationservicetest
04must prove
Proposed
Finalization failure releases a close with no recognized revenue, while a close with committed recognition retains the period for retry.
origin: DEF-ACT-0819 (ACCT-M4 WP-K, 2026-10-21)
lifecycleservicetest
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)
05must prove
Proposed
An eligible queued or failed cancellation returns a close to open or restores a reopen to closed with its earlier close details.
lifecycleservicetest
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)
06must prove
Proposed
Cancellation is refused after a close recognized revenue or a reopen reversed it; the former requires retry then reopen, and the latter requires retry.
validationservicetest
07must prove
Proposed
Only failed runs can be retried, and running or finished runs cannot be cancelled.
validationservicetest
08must prove
Proposed
Retry and cancellation require the action grant corresponding to the run’s close or reopen kind.
permissionservicetest
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
09
Proposed
A cancellation event identifies the person and the period effect of their action.
policyserviceobserved
10
Proposed
The console cancellation confirmation promises to reverse completed steps even when the service refuses cancellation after recognized revenue.
✗ The confirmation promises reversal despite cancellation being refused after recognition.
policyconsoleobserved

Scenarios

IdGivenWhenThenProvenance
01A close failed after September’s revenue was recognized.The controller attempts cancellation and then retries.Cancellation explains the required recovery path; retry finishes without duplicate revenue posting.test
02A close with no recognition failed in finalization.The controller reads its run.The month is released to open and requires a fresh close rather than retry.test
03A reopen failed after locking its period.The controller resumes the failed run.The remaining steps complete and release the month to open.test

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.