---
id: CAP-ACC-CLS-012
title: Recover an interrupted close or reopen
feature: FEAT-ACC-CLS-03
product_area: accounting
module: close
revision: 1
status: draft
product_intent: proposed
implementation_evidence: inconsistent
supersedes:
  - 'CAP-ACC-REC-017 (react-console acceptance inventory, retry and cancel)'
  - RUL-ACC-REC-085
  - RUL-ACC-REC-086
source_sha:
  services-accounting: f47cb263875bbc0c5640fba7dae6785ec32695f8
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
intent_sources:
  - >-
    services-accounting:docs/milestones/walkthroughs/ACCT-M4-handoff.md#A failed
    fiscal-close finalize releases the period (DEF-ACT-0819)
purpose: >-
  The closer determines whether stopped execution can resume, be cancelled or
  needs a fresh request.
outcomes:
  - Committed work survives retry without duplicate revenue posting.
  - The period remains protected until recovery safely releases it.
concepts:
  - CON-ACC-CLS-003
actors:
  - ACT-ACC-015
  - ACT-ACC-016
surfaces:
  - console
  - api
  - job
preconditions: []
postconditions: []
permissions:
  - key: accounting.fiscal-periods.read
    where_checked: api
    scope: tenant
  - key: accounting.fiscal-periods.close
    where_checked: service
    scope: tenant
  - key: accounting.fiscal-periods.reopen
    where_checked: service
    scope: tenant
rules:
  - id: BR-CAP-ACC-CLS-012-01
    proved_by: [ATS-ACC-CLS-012-01, ATS-ACC-CLS-012-07, TST-ACC-CLS-021, TST-ACC-CLS-022, TST-ACC-CLS-023]
    statement: >-
      A failed run that retains its period leaves it closing or reopening until
      a permitted recovery action completes.
    kind: lifecycle
    enforced_at:
      - service
    must_prove: true
    provenance: test
    source: >-
      services-accounting:modules/fiscal-close/tests/integration/services/jobs/reopen-job.integration.spec.js#leaves
      the period reopening
    origin: none
  - id: BR-CAP-ACC-CLS-012-02
    proved_by: [ATS-ACC-CLS-012-01, ATS-ACC-CLS-012-07, TST-ACC-CLS-021, TST-ACC-CLS-022, TST-ACC-CLS-023]
    statement: >-
      A failed run retaining its period can resume through a new retry job that
      preserves committed steps.
    kind: lifecycle
    enforced_at:
      - service
    must_prove: true
    provenance: test
    source: >-
      services-accounting:modules/fiscal-close/tests/integration/services/jobs/reopen-job.integration.spec.js#finishes
      the reopen on retry
    origin: fiscal-close design L9 (Rhythm 1.0 CLOSE-9 and REOPEN-6 fixed)
  - id: BR-CAP-ACC-CLS-012-03
    proved_by: [ATS-ACC-CLS-012-02, TST-ACC-CLS-021]
    statement: >-
      A readiness refusal or lock refusal leaves no retained period to retry and
      requires a fresh eligible request.
    kind: validation
    enforced_at:
      - service
    must_prove: true
    provenance: test
    source: >-
      services-accounting:modules/fiscal-close/tests/integration/services/jobs/close-job.integration.spec.js#refuses
      a retry: the period is no longer held
    origin: none
  - id: BR-CAP-ACC-CLS-012-04
    proved_by: [ATS-ACC-CLS-012-02, ATS-ACC-CLS-015-05, TST-ACC-CLS-021]
    statement: >-
      Finalization failure releases a close with no recognized revenue, while a
      close with committed recognition retains the period for retry.
    kind: lifecycle
    enforced_at:
      - service
    must_prove: true
    provenance: test
    source: >-
      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)
    origin: 'DEF-ACT-0819 (ACCT-M4 WP-K, 2026-10-21)'
  - id: BR-CAP-ACC-CLS-012-05
    proved_by: [ATS-ACC-CLS-012-03, ATS-ACC-CLS-012-04, ATS-ACC-CLS-012-08, TST-ACC-CLS-017, TST-ACC-CLS-021]
    statement: >-
      An eligible queued or failed cancellation returns a close to open or
      restores a reopen to closed with its earlier close details.
    kind: lifecycle
    enforced_at:
      - service
    must_prove: true
    provenance: test
    source: >-
      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)
    origin: none
  - id: BR-CAP-ACC-CLS-012-06
    proved_by: [ATS-ACC-CLS-012-03, ATS-ACC-CLS-012-07, TST-ACC-CLS-017, TST-ACC-CLS-021]
    statement: >-
      Cancellation is refused after a close recognized revenue or a reopen
      reversed it; the former requires retry then reopen, and the latter
      requires retry.
    kind: validation
    enforced_at:
      - service
    must_prove: true
    provenance: test
    source: >-
      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
    origin: none
  - id: BR-CAP-ACC-CLS-012-07
    proved_by: [ATS-ACC-CLS-012-03, ATS-ACC-CLS-012-08, ATS-ACC-CLS-012-09, TST-ACC-CLS-017, TST-ACC-CLS-021, TST-ACC-CLS-047]
    statement: >-
      Only failed runs can be retried, and running or finished runs cannot be
      cancelled.
    kind: validation
    enforced_at:
      - service
    must_prove: true
    provenance: test
    source: >-
      services-accounting:modules/fiscal-close/tests/e2e/fiscal-close-runs.e2e.spec.js#refuses
      retrying a run that did not fail with 409
    origin: none
  - id: BR-CAP-ACC-CLS-012-08
    proved_by: [ATS-ACC-CLS-012-05, TST-ACC-CLS-017, TST-ACC-CLS-021]
    statement: >-
      Retry and cancellation require the action grant corresponding to the run’s
      close or reopen kind.
    kind: permission
    enforced_at:
      - service
    must_prove: true
    provenance: test
    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
    origin: none
  - id: BR-CAP-ACC-CLS-012-09
    proved_by: []
    statement: >-
      A cancellation event identifies the person and the period effect of their
      action.
    kind: policy
    enforced_at:
      - service
    must_prove: false
    provenance: observed
    source: >-
      services-accounting:modules/fiscal-close/services/jobs/close-run-actions.ts:cancelCloseRun
    origin: none
  - id: BR-CAP-ACC-CLS-012-10
    proved_by: [ATS-ACC-CLS-012-06]
    statement: >-
      The console cancellation confirmation promises to reverse completed steps
      even when the service refuses cancellation after recognized revenue.
    kind: policy
    enforced_at:
      - console
    must_prove: false
    provenance: observed
    source: >-
      react-console:components/accounting/close/close-run-view.tsx:CancelCloseDialog
    origin: none
    examples:
      negative: >-
        The confirmation promises reversal despite cancellation being refused
        after recognition.
scenarios:
  - id: SC-CAP-ACC-CLS-012-01
    given: A close failed after September’s revenue was recognized.
    when: The controller attempts cancellation and then retries.
    then: >-
      Cancellation explains the required recovery path; retry finishes without
      duplicate revenue posting.
    provenance: test
    source: >-
      services-accounting:modules/fiscal-close/tests/integration/services/jobs/close-job.integration.spec.js#a
      cancel after revenue was recognised
  - id: SC-CAP-ACC-CLS-012-02
    given: A close with no recognition failed in finalization.
    when: The controller reads its run.
    then: >-
      The month is released to open and requires a fresh close rather than
      retry.
    provenance: test
    source: >-
      services-accounting:modules/fiscal-close/tests/integration/services/jobs/close-job.integration.spec.js#lets
      a new close succeed and close the period
  - id: SC-CAP-ACC-CLS-012-03
    given: A reopen failed after locking its period.
    when: The controller resumes the failed run.
    then: The remaining steps complete and release the month to open.
    provenance: test
    source: >-
      services-accounting:modules/fiscal-close/tests/integration/services/jobs/reopen-job.integration.spec.js#finishes
      the reopen on retry
edge_cases: []
constraints: []
depends_on:
  - CAP-ACC-CLS-008
  - CAP-ACC-CLS-011
related:
  - CAP-ACC-CLS-009
  - CAP-ACC-CLS-013
journeys:
  - JNY-ACC-CLS-005
open_questions:
  - OQ-ACC-CLS-003
evidence:
  - >-
    services-accounting examination inputs:
    modules/fiscal-close/aws/api/fiscal-close.routes.ts (retryFiscalCloseRun,
    cancelFiscalCloseRun), services/jobs/close-run-actions.ts (retryCloseRun,
    cancelCloseRun, runForAction), fiscal-close-jobs.ts (periodHeldBy,
    applyRunFailure), services/rules/transitions.ts; tests
    integration/services/jobs/close-job.integration.spec.js,
    reopen-job.integration.spec.js, e2e/fiscal-close-runs.e2e.spec.js,
    unit/rules/transitions.spec.js; docs/fiscal-close/PHASE-2-PLAN.md §4.
  - >-
    react-console examination inputs:
    components/accounting/close/close-run-view.tsx (Retry from This Step,
    CancelCloseDialog);
    acceptance/accounting/playwright/journeys/reconciliation-close/ACT-ACC-0617.spec.ts,
    ACT-ACC-0618.spec.ts.
controls: [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]
exercised_by: [FAS-ACC-CLS-03-03, FAS-ACC-CLS-03-04]
suites: [TST-ACC-CLS-017, TST-ACC-CLS-021, TST-ACC-CLS-022, TST-ACC-CLS-023, TST-ACC-CLS-047]
---

# Recover an interrupted close or reopen

## Purpose

The closer determines whether stopped execution can resume, be cancelled or needs a fresh request.

## How It Works

The controller reviews the failed step and its explanation on the run page. A run retaining the period can usually resume through Retry from This Step. The retry creates another job for the same run and keeps completed work. Cancellation is available only before effects make it unsafe. A close with recognized revenue must finish and then reopen to reverse that work. A reopen with reversed revenue must finish reopening. A close that failed during finalization without recognition releases its month automatically. That released run cannot resume, though cancellation can still record its abandonment. Readiness refusals also call for a fresh close after the cause is resolved. The product should correct cancellation wording so the promised effect matches the service.

## Relationships

- Close and reopen produce the runs recovered here.
- Revenue recognition and reversal determine cancellation eligibility.
- The run view provides the failure and recovery controls.
