---
id: TST-PFM-QRY-227
title: Platform generate query
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/generate-query.e2e.spec.js
implements:
  - ATS-PFM-QRY-003-01
  - ATS-PFM-QRY-003-02
  - ATS-PFM-QRY-003-03
  - ATS-PFM-QRY-003-04
  - ATS-PFM-QRY-003-05
  - ATS-PFM-QRY-003-06
  - ATS-PFM-QRY-003-07
  - ATS-PFM-QRY-003-08
  - ATS-PFM-QRY-003-09
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/generate-query.e2e.spec.js'
assertion_bindings:
  - scenario: ATS-PFM-QRY-003-01
    source:
      - >-
        services-platform:modules/queries/tests/e2e/generate-query.e2e.spec.js#refuses a caller without
        platform.queries.generate as 403, however much else they hold
      - >-
        services-platform:modules/queries/tests/e2e/generate-query.e2e.spec.js#refuses a caller without
        platform.queries.generate as 403
    scope: assertions cited by the scenario
    provenance: test
  - scenario: ATS-PFM-QRY-003-02
    source:
      - >-
        services-platform:modules/queries/tests/e2e/generate-query.e2e.spec.js#refuses a caller who may not
        query the dataset as 403
      - >-
        services-platform:modules/queries/tests/e2e/generate-query.e2e.spec.js#answers a dataset nobody
        registered as 404
    scope: assertions cited by the scenario
    provenance: test
  - scenario: ATS-PFM-QRY-003-03
    source:
      - >-
        services-platform:modules/queries/tests/e2e/generate-query.e2e.spec.js#refuses an empty request as
        400, naming the field
      - >-
        services-platform:modules/queries/tests/e2e/generate-query.e2e.spec.js#refuses a request longer than a
        person may type as 400
      - >-
        services-platform:modules/queries/tests/e2e/generate-query.e2e.spec.js#carries the same code for a
        request that is not text at all
    scope: assertions cited by the scenario
    provenance: test
  - scenario: ATS-PFM-QRY-003-04
    source:
      - >-
        services-platform:modules/queries/tests/e2e/generate-query.e2e.spec.js#answers 200 with the generation
        still working
      - >-
        services-platform:modules/queries/tests/e2e/generate-query.e2e.spec.js#refuses the person who did not
        start it as 404, however much they hold
      - >-
        services-platform:modules/queries/tests/e2e/generate-query.e2e.spec.js#does not answer, in another
        tenant, a generation started in this one
    scope: assertions cited by the scenario
    provenance: test
  - scenario: ATS-PFM-QRY-003-05
    source:
      - >-
        services-platform:modules/queries/tests/e2e/generate-query.e2e.spec.js#answers the query the worker
        stored, which is the query the execute route would accept
      - >-
        services-platform:modules/queries/tests/e2e/generate-query.e2e.spec.js#runs the query it answered: the
        console can send it straight to the execute route
    scope: assertions cited by the scenario
    provenance: test
  - scenario: ATS-PFM-QRY-003-06
    source:
      - >-
        services-platform:modules/queries/tests/e2e/generate-query.e2e.spec.js#refuses the request itself,
        rather than accepting it and failing two minutes later
      - >-
        services-platform:modules/queries/tests/e2e/generate-query.e2e.spec.js#says what was needed and what
        was left, and nothing of a model or a price
    scope: assertions cited by the scenario
    provenance: test
  - scenario: ATS-PFM-QRY-003-07
    source:
      - >-
        services-platform:modules/queries/tests/e2e/generate-query.e2e.spec.js#recorded one metered invocation
        for the request, against this operation and its prompt version
      - >-
        services-platform:modules/queries/tests/e2e/generate-query.e2e.spec.js#charged the association for it
        and holds nothing of its allowance
      - >-
        services-platform:modules/queries/tests/e2e/generate-query.e2e.spec.js#answers nothing of the cost or
        the model to the person who asked: that is the operator’s record
    scope: assertions cited by the scenario
    provenance: test
  - scenario: ATS-PFM-QRY-003-08
    source:
      - >-
        services-platform:modules/queries/tests/e2e/generate-query.e2e.spec.js#is a generation of its own, not
        the one it refines
      - >-
        services-platform:modules/queries/tests/e2e/generate-query.e2e.spec.js#refuses a refinement of a
        generation that is still working as 400
    scope: assertions cited by the scenario
    provenance: test
  - scenario: ATS-PFM-QRY-003-09
    source:
      - >-
        services-platform:modules/queries/tests/e2e/generate-query.e2e.spec.js#leaves a refused invocation
        that names the reason, the generation having been refused rather than failed
    scope: assertions cited by the scenario
    provenance: test
fixture_seams:
  - 'services-platform:modules/queries/tests/e2e/generate-query.e2e.spec.js:115'
  - 'services-platform:modules/queries/tests/e2e/generate-query.e2e.spec.js:62'
---

# Platform generate query

## 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 generate 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 dispatcher, route requirements and the handler behavior named by the assertions real. Review any new substitutions before treating the same acceptance bindings as unchanged.
