---
id: TST-PFM-SEC-189
title: Ensure standing access database and service checks
kind: integration
product_area: platform
module: security
revision: 2
status: draft
source_sha:
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
repository: services-platform
files:
  - >-
    modules/security/tests/integration/services/staff-access/ensure-standing-access.integration.spec.js
implements: []
environment: local
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 3
isolation: Use the prepared test database and suite-owned fixture rows; retain shared seed records.
assertion_evidence:
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/staff-access/ensure-standing-access.integration.spec.js#staff
      access capability: founding staff standing access
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/staff-access/ensure-standing-access.integration.spec.js#a
      super founder, over every existing customer, on two deploys
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/staff-access/ensure-standing-access.integration.spec.js#holds
      one active customer-level standing grant in every customer but Rhythm’s own
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/staff-access/ensure-standing-access.integration.spec.js#holds
      none in Rhythm’s own customer
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/staff-access/ensure-standing-access.integration.spec.js#writes
      the customer grant with no tenant and no expiry, requested and decided by the system, for the
      Rhythm Administrator reason
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/staff-access/ensure-standing-access.integration.spec.js#materializes
      an active customer-scoped Administrator assignment in the customer, with no tenant and no
      expiry
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/staff-access/ensure-standing-access.integration.spec.js#supersedes
      the per-tenant Administrator grant into Acme North: revoked for the stated reason, its
      assignment revoked
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/staff-access/ensure-standing-access.integration.spec.js#keeps
      the per-tenant grant of a tenant the list names with another role: Acme South’s Read Only
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/staff-access/ensure-standing-access.integration.spec.js#skips
      a named tenant that does not exist in this environment
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/staff-access/ensure-standing-access.integration.spec.js#audits
      the customer grant as a widening on the customer, and the supersession as a narrowing on the
      tenant
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/staff-access/ensure-standing-access.integration.spec.js#e-mails
      Acme’s administrator once that a Rhythm Administrator holds standing access to the
      organization, with no expiry
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/staff-access/ensure-standing-access.integration.spec.js#adds
      nothing on the second run: every grant unchanged, no grant, audit event or e-mail more
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/staff-access/ensure-standing-access.integration.spec.js#the
      security context of a super founder
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/staff-access/ensure-standing-access.integration.spec.js#offers
      every open tenant of Acme, each marked as the customer grant’s standing access with no expiry
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/staff-access/ensure-standing-access.integration.spec.js#a
      customer created after the deploy
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/staff-access/ensure-standing-access.integration.spec.js#gives
      the founder an active customer-level grant into the new customer, which has no tenant yet
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/staff-access/ensure-standing-access.integration.spec.js#writes
      nothing more when the creation path runs again
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/staff-access/ensure-standing-access.integration.spec.js#the
      assignments wall for a customer-scoped staff assignment (migration 0073)
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/staff-access/ensure-standing-access.integration.spec.js#admits
      a customer-scoped assignment into Acme that an active customer-level grant names
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/staff-access/ensure-standing-access.integration.spec.js#refuses
      a customer-scoped assignment into Acme that no grant names
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/staff-access/ensure-standing-access.integration.spec.js#refuses
      a tenant-scoped assignment that a customer-level grant names
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/staff-access/ensure-standing-access.integration.spec.js#refuses
      a customer-level grant of a kind other than standing
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/staff-access/ensure-standing-access.integration.spec.js#the
      security context of a founder holding standing access
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/staff-access/ensure-standing-access.integration.spec.js#offers
      the tenant marked as a standing grant, with no expiry
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/staff-access/ensure-standing-access.integration.spec.js#answers
      the tenant with exactly the keys the customer’s own Administrator has there, through the
      evaluator
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/staff-access/ensure-standing-access.integration.spec.js#a
      tenant provisioned after the deploy
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/staff-access/ensure-standing-access.integration.spec.js#holds
      Acme’s customer-level grant before the tenant is provisioned, which is the premise of the case
      below
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/staff-access/ensure-standing-access.integration.spec.js#writes
      no grant for a new tenant of a customer the founder already holds, whose grant reaches it
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/staff-access/ensure-standing-access.integration.spec.js#gives
      the founder the new customer’s customer-level Administrator grant with its first tenant
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/staff-access/ensure-standing-access.integration.spec.js#never
      fails the provisioning: a founding staff list it cannot read is logged and the call resolves
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/staff-access/ensure-standing-access.integration.spec.js#a
      standing grant a person revoked
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/staff-access/ensure-standing-access.integration.spec.js#is
      left revoked by the next deploy
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/staff-access/ensure-standing-access.integration.spec.js#gains
      no new grant into the tenant
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/staff-access/ensure-standing-access.integration.spec.js#a
      standing grant whose assignment was revoked while the grant stayed active
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/staff-access/ensure-standing-access.integration.spec.js#is
      materialized again: the grant still active, naming a new active assignment
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/staff-access/ensure-standing-access.integration.spec.js#audits
      the restoration beside the creation
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/staff-access/ensure-standing-access.integration.spec.js#a
      founder who is not active
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/staff-access/ensure-standing-access.integration.spec.js#is
      given no standing access
dependency_evidence: >-
  The prepared PostgreSQL database supplies the persisted fixtures and constraints exercised here.
  The suite controls the clock at the declared seams; those collaborators remain outside its live
  proof.
evidence:
  - >-
    services-platform:modules/security/tests/integration/services/staff-access/ensure-standing-access.integration.spec.js
  - >-
    Static review at the recorded source revision; executable results remain not-run and conformance
    remains not-verified.
binding_note: >-
  The file has no scenario binding established by this examination. Its executable checks remain
  registered without assigning them broader acceptance coverage.
examiner: codex
examined_at: '2026-10-23'
final_text: OpenAI
dependency_review:
  provenance: test
  source: >-
    services-platform:modules/security/tests/integration/services/staff-access/ensure-standing-access.integration.spec.js
  explicit_no_doubles: false
  identified_double_boundaries:
    - the clock
---
# Ensure standing access database and service checks

## Verification Boundary

The file exercises database or service behavior through the local integration harness. The assertion references identify the source checks for ensure standing access.

## 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 prepared PostgreSQL database supplies the persisted fixtures and constraints exercised here. The suite controls the clock at the declared seams; those collaborators remain outside its live proof.

## Must Not Be Doubled

Keep the queried database, applicable constraints and transaction boundaries real. Provider substitutes cannot establish delivery, cloud execution or cross-service recovery.
