---
id: TST-PFM-SEC-267
title: Caches unit checks
kind: unit
product_area: platform
module: security
revision: 1
status: draft
source_sha:
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
repository: services-platform
files:
  - modules/security/tests/unit/authorizer/caches.spec.ts
implements: []
environment: mock
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 1
isolation: >-
  Use the file’s run-owned input objects and test doubles; restore changed environment values and
  installed dependencies after each case.
assertion_evidence:
  - provenance: test
    source: >-
      services-platform:modules/security/tests/unit/authorizer/caches.spec.ts#returns a value until
      its time to live, then forgets it
  - provenance: test
    source: >-
      services-platform:modules/security/tests/unit/authorizer/caches.spec.ts#honours a per-entry
      time to live and caches negative answers such as null
  - provenance: test
    source: >-
      services-platform:modules/security/tests/unit/authorizer/caches.spec.ts#evicts the least
      recently used entry beyond maxEntries
  - provenance: test
    source: >-
      services-platform:modules/security/tests/unit/authorizer/caches.spec.ts#getOrLoad loads once,
      caches, and shares one load between concurrent callers
  - provenance: test
    source: >-
      services-platform:modules/security/tests/unit/authorizer/caches.spec.ts#never caches a
      failure, including a loader that throws synchronously
  - provenance: test
    source: >-
      services-platform:modules/security/tests/unit/authorizer/caches.spec.ts#refuses a non-positive
      ttl or size
  - provenance: test
    source: >-
      services-platform:modules/security/tests/unit/authorizer/caches.spec.ts#serves a fresh entry
      without reloading, then reloads after the fresh window
  - provenance: test
    source: >-
      services-platform:modules/security/tests/unit/authorizer/caches.spec.ts#serves the last known
      good copy for 15 minutes after a failure, then fails closed
  - provenance: test
    source: >-
      services-platform:modules/security/tests/unit/authorizer/caches.spec.ts#a failure with nothing
      cached rejects
  - provenance: test
    source: >-
      services-platform:modules/security/tests/unit/authorizer/caches.spec.ts#refuses a
      last-known-good window shorter than the fresh one
evidence:
  - 'services-platform:modules/security/tests/unit/authorizer/caches.spec.ts'
  - >-
    Static review at the recorded source revision; executable results remain not-run and conformance
    remains not-verified.
examiner: codex
examined_at: '2026-10-23'
final_text: OpenAI
dependency_review:
  provenance: test
  source: 'services-platform:modules/security/tests/unit/authorizer/caches.spec.ts'
  explicit_no_doubles: false
  identified_double_boundaries: []
dependency_evidence: >-
  The file exercises its imported production code with controlled inputs. Source inspection
  identifies the test entry and assertions; it does not establish a live database, provider or
  deployed workflow.
binding_note: >-
  The file has no scenario binding established by this examination. Its executable checks remain
  registered without assigning them broader acceptance coverage.
---
# Caches unit checks

## Verification Boundary

The file evaluates production helpers with controlled inputs in-process. The assertion references identify the source checks for caches.

## What This Suite Proves

The file supplies executable engineering checks for the named subject. No complete acceptance scenario is inferred from the file’s existence.

## What It Does Not Prove

This examination does not run the suite. Passing behavior, deployed conformance and the behavior of substituted dependencies require separate execution evidence.

## Real Dependencies and Test Doubles

The file exercises its imported production code with controlled inputs. Source inspection identifies the test entry and assertions; it does not establish a live database, provider or deployed workflow.

## Must Not Be Doubled

Keep the production helper, schema, matcher or declaration under examination real. Substituting the decision itself would remove the behavior the assertions exercise.
