---
id: TST-PFM-QRY-296
title: Platform run query
kind: integration
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/integration/services/execute/run-query.integration.spec.js
implements:
  - ATS-PFM-QRY-001-05
  - ATS-PFM-QRY-002-01
  - ATS-PFM-QRY-002-03
  - ATS-PFM-QRY-002-04
  - ATS-PFM-QRY-002-05
  - ATS-PFM-QRY-002-10
  - ATS-PFM-QRY-002-14
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/integration/services/execute/run-query.integration.spec.js'
assertion_bindings:
  - scenario: ATS-PFM-QRY-001-05
    source:
      - >-
        services-platform:modules/queries/tests/integration/services/execute/run-query.integration.spec.js#refuses
        a field of a dataset the caller may not query exactly as it refuses one that does not exist
    scope: contributing assertions; the scenario combines multiple files
    provenance: test
  - scenario: ATS-PFM-QRY-002-01
    source:
      - >-
        services-platform:modules/queries/tests/integration/services/execute/run-query.integration.spec.js#answers
        no row, pick or joined value belonging to another tenant, though the ids are the same
      - >-
        services-platform:modules/queries/tests/integration/services/execute/run-query.integration.spec.js#answers
        the other tenant exactly its own rows, picks and joins
      - >-
        services-platform:modules/queries/tests/integration/services/execute/run-query.integration.spec.js#confines
        a statement carrying no tenant predicate at all, so row-level security holds beneath the compiler
    scope: assertions cited by the scenario
    provenance: test
  - scenario: ATS-PFM-QRY-002-03
    source:
      - >-
        services-platform:modules/queries/tests/integration/services/execute/run-query.integration.spec.js#refuses
        a column no owner registered exactly as it refuses one that does not exist at all
      - >-
        services-platform:modules/queries/tests/integration/services/execute/run-query.integration.spec.js#refuses
        an operator the field type does not support, naming both
    scope: assertions cited by the scenario
    provenance: test
  - scenario: ATS-PFM-QRY-002-04
    source:
      - >-
        services-platform:modules/queries/tests/integration/services/execute/run-query.integration.spec.js#refuses
        a blank text value, which would match every contact rather than narrow anything
      - >-
        services-platform:modules/queries/tests/integration/services/execute/run-query.integration.spec.js#refuses
        an empty list of ids, which would exclude or admit every contact
      - >-
        services-platform:modules/queries/tests/integration/services/execute/run-query.integration.spec.js#refuses
        a fractional value where an integer field is compared
      - >-
        services-platform:modules/queries/tests/integration/services/execute/run-query.integration.spec.js#refuses
        a whole number JavaScript cannot hold exactly, rather than comparing a rounded one
      - >-
        services-platform:modules/queries/tests/integration/services/execute/run-query.integration.spec.js#refuses
        a date written in any form but YYYY-MM-DD
    scope: assertions cited by the scenario
    provenance: test
  - scenario: ATS-PFM-QRY-002-05
    source:
      - >-
        services-platform:modules/queries/tests/integration/services/execute/run-query.integration.spec.js#pages
        a text sort ascending exactly as the unpaged query ordered it, ties included
      - >-
        services-platform:modules/queries/tests/integration/services/execute/run-query.integration.spec.js#refuses
        a cursor issued for a different query, rather than paging the wrong rows
      - >-
        services-platform:modules/queries/tests/integration/services/execute/run-query.integration.spec.js#refuses
        a cursor that is not a cursor at all, rather than reading it as a page of nothing
      - >-
        services-platform:modules/queries/tests/integration/services/execute/run-query.integration.spec.js#refuses
        a cursor of this query carrying the wrong number of keys, which could not place a row in the order
    scope: assertions cited by the scenario
    provenance: test
  - scenario: ATS-PFM-QRY-002-10
    source:
      - >-
        services-platform:modules/queries/tests/integration/services/execute/run-query.integration.spec.js#reads
        a day as that day in the tenant's zone, not in UTC
      - >-
        services-platform:modules/queries/tests/integration/services/execute/run-query.integration.spec.js#counts
        a relative range back from today in the tenant's zone
    scope: contributing assertions; the scenario combines multiple files
    provenance: test
  - scenario: ATS-PFM-QRY-002-14
    source:
      - >-
        services-platform:modules/queries/tests/integration/services/execute/run-query.integration.spec.js#refuses
        a second hop through the referenced record's own reference
    scope: assertions cited by the scenario
    provenance: test
fixture_seams: []
---

# Platform run query

## Verification Boundary

The file invokes its service or persistence boundary against local integration fixtures.

## What This Suite Proves

Its assertions check run query. 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 service or persistence operation whose behavior is asserted real. Database constraints and transactions cannot be replaced by fixture answers when they are the subject of the check.
