---
id: TST-PFM-SEC-180
title: Resolve grant slice 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/resolve-grant-slice.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/resolve-grant-slice.integration.spec.js#security
      persistence: resolveGrantSlice
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/resolve-grant-slice.integration.spec.js#what
      the slice says about the user
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/resolve-grant-slice.integration.spec.js#answers
      the membership itself, even when the user has no assignments at all
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/resolve-grant-slice.integration.spec.js#names
      the tenant of a portal member, because the wall is part of what the evaluator judges
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/resolve-grant-slice.integration.spec.js#refuses
      a user that does not exist, rather than answering an empty slice
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/resolve-grant-slice.integration.spec.js#where
      a rule comes from
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/resolve-grant-slice.integration.spec.js#gathers
      the assignment's own rules, the role's, and those of the policies the role references, each
      naming its source
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/resolve-grant-slice.integration.spec.js#leaves
      out the rules of an archived role and an archived policy, which grant nothing
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/resolve-grant-slice.integration.spec.js#carries
      the conditions of the assignment and of a rule, which the evaluator — not the query — judges
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/resolve-grant-slice.integration.spec.js#carries
      the validity window as ISO instants, so the evaluator can judge "not yet" and "no longer"
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/resolve-grant-slice.integration.spec.js#which
      assignments the slice contains
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/resolve-grant-slice.integration.spec.js#returns
      a pending assignment with its status, and leaves a revoked one out entirely
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/resolve-grant-slice.integration.spec.js#never
      contains another user's assignments, not even the same human's other membership
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/resolve-grant-slice.integration.spec.js#does
      not widen a tenant-scoped grant into the customer's other tenants: the scope comes back as it
      was stored
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/resolve-grant-slice.integration.spec.js#filtering
      by the requested keys
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/resolve-grant-slice.integration.spec.js#keeps
      a rule naming a requested key exactly, and drops one naming only keys nobody asked for
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/resolve-grant-slice.integration.spec.js#keeps
      a pattern that matches a requested key and drops one that only looks like it might
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/resolve-grant-slice.integration.spec.js#filters
      a deny by the same rule as an allow, because the evaluator must see both or neither
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/resolve-grant-slice.integration.spec.js#answers
      the assignment with no rules at all when nothing was asked for, and takes a duplicated key
      once
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/resolve-grant-slice.integration.spec.js#keeps
      a role's allow written hq.*, so the staff rule reaches hq.roles.manage
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/resolve-grant-slice.integration.spec.js#drops
      the same short allow when the key asked for belongs to another application
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/resolve-grant-slice.integration.spec.js#keeps
      a deny written platform.*, so a short deny a customer administrator wrote applies to a
      platform key
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/resolve-grant-slice.integration.spec.js#drops
      a deny written events.*, because this release defines no key of that application
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/resolve-grant-slice.integration.spec.js#the
      grant of being an authenticated user of the wall
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/resolve-grant-slice.integration.spec.js#answers
      it for a console user whose only role is a custom one, at their own customer
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/resolve-grant-slice.integration.spec.js#scopes
      it to a portal member's own tenant, so it never reaches another tenant of the customer
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/resolve-grant-slice.integration.spec.js#answers
      nothing for a user who is not active, so a suspended person reaches their own document no more
      than anybody else
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/resolve-grant-slice.integration.spec.js#answers
      it only when a route asked about its key, so the unfiltered read never shows it as a grant
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/resolve-grant-slice.integration.spec.js#the
      console baseline grant
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/resolve-grant-slice.integration.spec.js#answers
      platform.attention.use, at their own customer, for a console user whose only role grants
      another app
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/resolve-grant-slice.integration.spec.js#adds
      no other key: asked about another permission, the slice does not carry the baseline
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/resolve-grant-slice.integration.spec.js#answers
      nothing for a portal member
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/resolve-grant-slice.integration.spec.js#answers
      nothing for a console user who is not active
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/resolve-grant-slice.integration.spec.js#the
      seeded fixtures, which are what the authorizer will actually meet
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/resolve-grant-slice.integration.spec.js#gives
      Rhythm's administrator the staff-only key, at platform scope, through the role's inline rule
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/resolve-grant-slice.integration.spec.js#gives
      acme's administrator the two built-in policies behind the Administrator role, and nothing of
      acme's other users
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/resolve-grant-slice.integration.spec.js#leaves
      the pending treasurer's grant pending and the revoked member's out
dependency_evidence: >-
  The prepared PostgreSQL database supplies the persisted fixtures and constraints exercised here.
  The suite’s own dependency setup determines which external collaborators are controlled;
  registration alone does not certify them as live.
evidence:
  - >-
    services-platform:modules/security/tests/integration/services/resolve-grant-slice.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/resolve-grant-slice.integration.spec.js
  explicit_no_doubles: false
  identified_double_boundaries: []
---
# Resolve grant slice 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 resolve grant slice.

## 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’s own dependency setup determines which external collaborators are controlled; registration alone does not certify them as live.

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