---
id: TST-PFM-QRY-235
title: Platform system queries
kind: api-lifecycle
product_area: platform
module: queries
revision: 1
status: draft
source_sha:
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
  rhythm-v2-docs: 99376625d3e7ac26936413cfc31a88fba6562464
repository: services-platform
files:
  - modules/queries/tests/e2e/system-queries.e2e.spec.js
implements:
  - ATS-PFM-QRY-004-01
  - ATS-PFM-QRY-004-02
  - ATS-PFM-QRY-004-03
  - ATS-PFM-QRY-004-04
  - ATS-PFM-QRY-004-05
  - ATS-PFM-QRY-004-06
environment: local
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 5
isolation: 'The suite’s database fixtures, controlled execution contexts and file-owned external dependency seams.'
evidence:
  - 'services-platform:modules/queries/tests/e2e/system-queries.e2e.spec.js'
assertion_bindings:
  - scenario: ATS-PFM-QRY-004-01
    source:
      - >-
        services-platform:modules/queries/tests/e2e/system-queries.e2e.spec.js#answers every dataset as
        unauthorized for a caller holding the surface key alone
      - >-
        services-platform:modules/queries/tests/e2e/system-queries.e2e.spec.js#refuses a caller holding the
        surface key but not this dataset’s key, with 403
      - >-
        services-platform:modules/queries/tests/e2e/system-queries.e2e.spec.js#answers Rhythm HQ’s five
        datasets and nothing else, each one authorized for this caller
    scope: assertions cited by the scenario
    provenance: test
  - scenario: ATS-PFM-QRY-004-02
    source:
      - >-
        services-platform:modules/queries/tests/e2e/system-queries.e2e.spec.js#lists not one tenant dataset,
        Users and CRM’s belonging to a tenant and not to the system
      - >-
        services-platform:modules/queries/tests/e2e/system-queries.e2e.spec.js#refuses a tenant dataset as one
        that does not exist, with 404 and never 403
    scope: assertions cited by the scenario
    provenance: test
  - scenario: ATS-PFM-QRY-004-03
    source:
      - >-
        services-platform:modules/queries/tests/e2e/system-queries.e2e.spec.js#answers every customer of every
        kind, read with no tenant anywhere
      - >-
        services-platform:modules/queries/tests/e2e/system-queries.e2e.spec.js#answers the tenants of every
        customer at once, which no tenant route could ever do
    scope: assertions cited by the scenario
    provenance: test
  - scenario: ATS-PFM-QRY-004-04
    source:
      - >-
        services-platform:modules/queries/tests/e2e/system-queries.e2e.spec.js#refuses a model that joins a
        tenant’s dataset to the system’s, the two having no tenant in common
    scope: assertions cited by the scenario
    provenance: test
  - scenario: ATS-PFM-QRY-004-05
    source:
      - >-
        services-platform:modules/queries/tests/e2e/system-queries.e2e.spec.js#offers no custom field and no
        tenant’s label override, a system dataset having no tenant to define either
      - >-
        services-platform:modules/queries/tests/e2e/system-queries.e2e.spec.js#offers the `all` scope alone, a
        system dataset having no tenant in which anyone viewed a record
      - >-
        services-platform:modules/queries/tests/e2e/system-queries.e2e.spec.js#refuses the recently_viewed
        scope: it answers what a person viewed in a tenant, and this dataset has none
    scope: assertions cited by the scenario
    provenance: test
  - scenario: ATS-PFM-QRY-004-06
    source:
      - >-
        services-platform:modules/queries/tests/e2e/system-queries.e2e.spec.js#refuses a tenant’s recipe as
        one that does not exist, with 404
    scope: contributing assertions; the scenario combines multiple files
    provenance: test
fixture_seams:
  - 'services-platform:modules/queries/tests/e2e/system-queries.e2e.spec.js:83'
  - 'services-platform:modules/queries/tests/e2e/system-queries.e2e.spec.js:60'
---

# Platform system queries

## Verification Boundary

The file dispatches requests through the real route table and signed execution contexts against its local fixtures.

## What This Suite Proves

Its assertions check system queries. The assertion bindings identify the corresponding acceptance examples and retain their original test-title citations.

## What It Does Not Prove

Local execution does not establish deployed queue scheduling, every external provider response or a passing result at the pinned revision.

## Real Dependencies and Test Doubles

The integration fixture and any imported dependency seams define the environment. Database-oriented checks use PostgreSQL; file-owned transport, clock, provider or worker seams isolate the explicitly controlled boundary.

## Must Not Be Doubled

Keep the dispatcher, route requirements and the handler behavior named by the assertions real. Review any new substitutions before treating the same acceptance bindings as unchanged.
