---
id: TST-PFM-SEC-214
title: Permission matcher unit checks
kind: unit
product_area: platform
module: security
revision: 2
status: draft
source_sha:
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
repository: services-platform
files:
  - modules/security/tests/unit/services/persistence/permission-matcher.spec.ts
implements:
  - ATS-PFM-SEC-013-11
environment: mock
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 1
isolation: The suite owns its input fixtures and installed doubles.
assertion_evidence:
  - provenance: test
    source: >-
      services-platform:modules/security/tests/unit/services/persistence/permission-matcher.spec.ts#the
      one permission pattern matcher
  - provenance: test
    source: >-
      services-platform:modules/security/tests/unit/services/persistence/permission-matcher.spec.ts#the
      corpus the agreement is read over (premise)
  - provenance: test
    source: >-
      services-platform:modules/security/tests/unit/services/persistence/permission-matcher.spec.ts#reads
      every key Platform’s release publishes, of both its applications
  - provenance: test
    source: >-
      services-platform:modules/security/tests/unit/services/persistence/permission-matcher.spec.ts#generates
      patterns from those keys’ segments, including the short and the invalid ones
  - provenance: test
    source: >-
      services-platform:modules/security/tests/unit/services/persistence/permission-matcher.spec.ts#the
      answers agree
  - provenance: test
    source: >-
      services-platform:modules/security/tests/unit/services/persistence/permission-matcher.spec.ts#gives
      the same answer from all four functions for every pattern and key of the corpus
  - provenance: test
    source: >-
      services-platform:modules/security/tests/unit/services/persistence/permission-matcher.spec.ts#matches
      hq.roles.manage from the pattern hq.*, the rule the grant slice used to drop
  - provenance: test
    source: >-
      services-platform:modules/security/tests/unit/services/persistence/permission-matcher.spec.ts#matches
      a three-segment platform key from the deny pattern platform.*, so a customer’s short deny
      takes effect
  - provenance: test
    source: >-
      services-platform:modules/security/tests/unit/services/persistence/permission-matcher.spec.ts#matches
      nothing from a string that is a key’s prefix without a star, which is not a pattern
  - provenance: test
    source: >-
      services-platform:modules/security/tests/unit/services/persistence/permission-matcher.spec.ts#matches
      a key of another application only from a pattern whose app segment is that app or a star
dependency_evidence: >-
  The production function, schema or declaration runs over literal inputs. The source declares no
  substituted collaborator; this is an in-process decision or mapping check.
evidence:
  - 'services-platform:modules/security/tests/unit/services/persistence/permission-matcher.spec.ts'
  - >-
    Static review at the recorded source revision; executable results remain not-run and conformance
    remains not-verified.
binding_note: >-
  Each binding names the scenario to which this file contributes assertions. A binding is not a
  recorded pass and does not extend the file’s dependency boundary.
examiner: codex
examined_at: '2026-10-23'
final_text: OpenAI
dependency_review:
  provenance: test
  source: 'services-platform:modules/security/tests/unit/services/persistence/permission-matcher.spec.ts'
  explicit_no_doubles: true
  identified_double_boundaries: []
---
# Permission matcher unit checks

## Verification Boundary

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

## What This Suite Proves

The source assertions support the observations named in the bound scenarios. A scenario spanning multiple files must retain the other files’ contributions.

## 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 production function, schema or declaration runs over literal inputs. The source declares no substituted collaborator; this is an in-process decision or mapping check.

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