---
id: SCR-ACC-CLS-005
title: Close Run
route: '/console/{tenantId}/accounting/close/runs/{runId}'
surface: console
product_area: accounting
module: close
revision: 1
status: draft
design_intent: proposed
implementation_evidence: observed
inference: []
source_sha:
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
  services-accounting: f47cb263875bbc0c5640fba7dae6785ec32695f8
purpose: >-
  Inspect a recorded request’s execution, completed evidence and available
  service recovery paths.
supports:
  - JNY-ACC-CLS-001
  - JNY-ACC-CLS-003
  - JNY-ACC-CLS-004
  - JNY-ACC-CLS-005
  - CAP-ACC-CLS-012
  - CAP-ACC-CLS-013
  - CAP-ACC-CLS-014
  - CAP-ACC-CLS-011
permission: accounting.fiscal-periods.read (the close layout's guard)
entry_from:
  - Accepted submission from a close or reopen dialog
  - '/console/{tenantId}/accounting/close/history'
  - >-
    /console/{tenantId}/accounting/close (submitted request or retained close
    record)
  - A job-list link to the recorded request
exits_to:
  - '/console/{tenantId}/accounting/close (Back to Period Close)'
  - >-
    /console/{tenantId}/accounting/close/periods/{fiscalYearId}/{periodNumber}
    (Go to the next month; View Close Record)
  - >-
    /console/{tenantId}/accounting/close/years/{fiscalYearId} (View Close Record
    of a year close)
  - The batch a step produced
displays:
  - field: 'Request kind, month and unit heading with submission information.'
    source: getFiscalCloseRun (DOM-ACC-CLS-003)
  - field: 'Task sequence with attempts, timestamps, errors and produced-record links.'
    source: getFiscalCloseRun (DOM-ACC-CLS-003 steps and outputs)
  - field: Expandable job event history ordered by time.
    source: getFiscalCloseRun (DOM-ACC-CLS-003 job history)
  - field: 'Outcome panels for failed, successful or cancelled requests.'
    source: >-
      getFiscalCloseRun (DOM-ACC-CLS-003 status and step errors; no structured
      failure eligibility)
  - field: Retained record when a close has succeeded.
    source: getFiscalCloseRecord (DOM-ACC-CLS-004)
actions:
  - label: Retry from This Step
    operation_id: retryFiscalCloseRun
    permission: >-
      accounting.fiscal-periods.close or accounting.fiscal-periods.reopen, by
      the run's kind
    confirm: false
  - label: Cancel Close or Cancel Reopen
    operation_id: cancelFiscalCloseRun
    permission: >-
      accounting.fiscal-periods.close or accounting.fiscal-periods.reopen, by
      the run's kind
    confirm: true
  - label: Reopen <month>
    operation_id: reopenFiscalPeriod
    permission: accounting.fiscal-periods.reopen
    confirm: true
  - label: View Close Record
    operation_id: getFiscalCloseRecord
    permission: accounting.fiscal-periods.read
    confirm: false
states:
  - loading
  - >-
    error (request retrieval fails; Try Again and return navigation remain
    available)
  - empty (successful execution has no newly created record links)
  - >-
    read-only (the read grant opens the page; failed-run recovery buttons lack
    action-grant checks and remain subject to service refusal)
  - inactive (queued and running requests refresh at two-second intervals)
validation:
  - BR-CAP-ACC-CLS-012-03
  - BR-CAP-ACC-CLS-012-06
  - BR-CAP-ACC-CLS-012-07
  - BR-CAP-ACC-CLS-012-08
  - BR-CAP-ACC-CLS-012-10
  - BR-CAP-ACC-CLS-013-03
  - BR-CAP-ACC-CLS-011-10
patterns:
  - Full layout (PageLayout and PageHeader)
  - Permission guard (RequirePermission on the close layout)
  - Step list with status icons and expandable detail
  - 'Failure, success and cancelled panels'
  - Alert dialog for cancellation; reopen dialog
  - Polling refresh while the run is active
component: >-
  react-console:components/accounting/close/close-run-view.tsx (CloseRunView,
  FailurePanel, CancelCloseDialog, SuccessPanel, CancelledPanel),
  close-record.tsx
evidence:
  - >-
    react-console at baf6dae3:
    app/(console)/console/[tenantId]/accounting/close/runs/[runId]/page.tsx;
    components/accounting/close/close-run-view.tsx, close-record.tsx;
    lib/accounting/close/hooks.ts.
  - >-
    services-accounting at f47cb263:
    modules/fiscal-close/services/runs/close-run-view.ts.
  - >-
    react-console:components/console/page-layout.tsx:PageLayout;
    lib/layout/page-width.ts:DEFAULT_PAGE_WIDTH (dependencies imported by the
    hosted pages); components/accounting/close/close-dialog.tsx:CloseDialog;
    reopen-dialog.tsx:ReopenDialog
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]
---

# Close Run

## What the Screen Is For

The run page lets staff inspect execution and the evidence of a successful close. Failed requests expose recovery controls, although their actual eligibility is decided by the service.

## What It Shows and Lets People Do

The header describes the request’s current outcome. Ordered steps show attempts, timing, errors and produced-record links, and an expandable event log shows available history. Successful closes load the retained record and can link the current following month or offer an authorized reopen. Reopen success and cancellation have their own panels. The run response includes binding readiness, but the page does not render a separate checklist from it.

## States and Errors

The hook polls every two seconds only while the run is queued or running. Polling stops at close finalization even if calendar maintenance continues. A failed panel renders Retry and Cancel without action-permission or structured recovery-eligibility gating; the service can refuse either. The panel’s retained-state statement and cancellation’s reversal promise are inaccurate for some outcomes. A missing run shows Try Again and navigation back.

## Patterns It Must Respect

The page uses PageLayout and PageHeader, the inherited read-permission guard, task status icons, outcome panels, Collapsible event history, an AlertDialog for cancellation and the shared reopen dialog. Existing component patterns are the implementation evidence.
