---
id: TST-ACC-CLS-019
title: Close and reopen action authorization
kind: integration
product_area: accounting
module: close
revision: 1
status: draft
source_sha:
  services-accounting: f47cb263875bbc0c5640fba7dae6785ec32695f8
repository: services-accounting
files:
  - >-
    modules/fiscal-close/tests/integration/services/authorization/period-authorization.integration.spec.js
implements:
  - ATS-ACC-CLS-002-01
  - ATS-ACC-CLS-002-02
  - ATS-ACC-CLS-002-03
  - ATS-ACC-CLS-002-04
environment: local
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 3
isolation: >-
  The suite owns test-identifier workspaces and fixture records, removed by its
  teardown.
binding_policy: >-
  Each binding identifies the assertions this suite executes; combined scenarios
  may require other bound suites. Existence is not a recorded execution result.
evidence:
  - >-
    services-accounting:modules/fiscal-close/tests/integration/services/authorization/period-authorization.integration.spec.js
  - provenance: test
    source: >-
      services-accounting:modules/fiscal-close/tests/integration/services/authorization/period-authorization.integration.spec.js
    assertion_titles:
      - >-
        fiscal close: whether the caller may close or reopen a period
        (integration)
      - 'lets an authorized caller close the current period, not reopen it'
      - 'lets an authorized caller reopen the latest closed period, not close it'
      - >-
        refuses reopening a closed period with a later one closed, in 1.0’s
        sentence
      - 'refuses closing a period with an earlier one open, in 1.0’s sentence'
      - 'refuses both to a caller without the keys, saying so first'
      - refuses a fiscal year the tenant does not have
real_dependencies: >-
  PostgreSQL, authorization logic, sequence validators and workspace policies
  are real. Supplied callers model the presence or absence of evaluated grants.
product_intent: proposed
implementation_evidence: observed
---
# Close and reopen action authorization

## Verification Boundary

The suite checks its declared service or persistence boundary against local PostgreSQL. Bindings identify the assertions it contributes to a capability case; they do not establish every assertion in a combined case.

## What This Suite Proves

The service reads calendar sequence and caller grants to calculate available close and reopen actions. It checks earlier and later unfinished periods, missing authority and absent fiscal years.

## What It Does Not Prove

This register records assertion scope without claiming a passing run or complete coverage of every rule and scenario variant.

## Real Dependencies and Test Doubles

PostgreSQL, authorization logic, sequence validators and workspace policies are real. Supplied callers model the presence or absence of evaluated grants.

## Must Not Be Doubled

Keep production queries, writes, mappings, application-role privileges and database constraints real wherever they are the subject of an assertion. Recording financial ports establish invocation behavior; actual recognition and reversal require the suite using the real posting service.
