---
id: TST-ACC-CLS-013
title: Close transport mapping and user-name fallback
kind: unit
product_area: accounting
module: close
revision: 1
status: draft
source_sha:
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
repository: react-console
files:
  - lib/accounting/close/http-service.test.ts
implements:
  - ATS-ACC-CLS-013-07
environment: mock
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 1
isolation: >-
  Each test owns its browser context, demonstration store or supplied transport
  fixtures.
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:
  - 'react-console:lib/accounting/close/http-service.test.ts'
  - provenance: test
    source: 'react-console:lib/accounting/close/http-service.test.ts'
    assertion_titles:
      - 'createHttpFiscalCloseService: reads'
      - >-
        lists business units from Accounting's configuration, by priority then
        name, as refs
      - reads the calendar newest first and finds the current period in it
      - refuses the current period with notFound when every period is closed
      - >-
        reads readiness with the wire's scope and brings its values into the
        contract's
      - 'reads authorization, the run, the runs and the record at their paths'
      - encodes the tenant and ids into the path
      - >-
        refuses every call before the tenant is known, without calling
        Accounting
      - 'createHttpFiscalCloseService: user names'
      - >-
        names every user reference of an answer with one lookup, keeping the id
        when nobody can be named
      - >-
        asks for an id once for the service's life, including an id nobody could
        name
      - >-
        names the people of a list of runs and of the calendar in one lookup
        each
      - 'keeps the ids when the directory cannot be read, and answers anyway'
      - does not ask when every reference is already named
      - 'createHttpFiscalCloseService: writes'
      - >-
        closes with the request's idempotency key, note and acknowledged
        warnings as the service names the checks
      - reopens with its reason; retries and cancels at the run's path
      - >-
        notifies its listeners after every successful write, and never after a
        read or a refusal
      - 'createHttpFiscalCloseService: refusals'
      - passes a server failure on as it is
real_dependencies: >-
  The console components or adapters run with demonstration data or supplied
  transport responses. No deployed Accounting, person directory or database is
  exercised.
product_intent: proposed
implementation_evidence: observed
---
# Close transport mapping and user-name fallback

## Verification Boundary

The suite checks console behavior with supplied inputs, demonstration data or transport responses. Its assertions establish that local boundary rather than a deployed Accounting workflow.

## What This Suite Proves

The adapter tests supplied calendar, readiness, action, run and record responses; command serialization; error mapping; and person lookup caching and fallback. They do not call the real Accounting or person services.

## 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

The console components or adapters run with demonstration data or supplied transport responses. No deployed Accounting, person directory or database is exercised.

## Must Not Be Doubled

Keep the component, adapter or pure function under assertion real within this suite. Qualifying financial outcomes requires a separate suite with real Accounting responses, writes and enforced permissions.
