---
id: TST-PFM-QRY-229
title: Platform query recipes
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/query-recipes.e2e.spec.js
implements:
  - ATS-PFM-QRY-008-01
  - ATS-PFM-QRY-008-02
  - ATS-PFM-QRY-008-03
  - ATS-PFM-QRY-008-04
  - ATS-PFM-QRY-008-05
  - ATS-PFM-QRY-008-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/query-recipes.e2e.spec.js'
assertion_bindings:
  - scenario: ATS-PFM-QRY-008-01
    source:
      - >-
        services-platform:modules/queries/tests/e2e/query-recipes.e2e.spec.js#answers the recipes under the
        name of what it holds, by category then name
      - >-
        services-platform:modules/queries/tests/e2e/query-recipes.e2e.spec.js#marks a recipe of a dataset this
        caller may query as authorized, and one it may not as not
      - >-
        services-platform:modules/queries/tests/e2e/query-recipes.e2e.spec.js#leaves a retired recipe out of
        the list
      - >-
        services-platform:modules/queries/tests/e2e/query-recipes.e2e.spec.js#answers the same recipes to a
        caller with no dataset at all, every one of them unauthorized
    scope: assertions cited by the scenario
    provenance: test
  - scenario: ATS-PFM-QRY-008-02
    source:
      - >-
        services-platform:modules/queries/tests/e2e/query-recipes.e2e.spec.js#refuses a draft of a dataset
        this caller may not query as 403
      - >-
        services-platform:modules/queries/tests/e2e/query-recipes.e2e.spec.js#refuses the draft as 403 to a
        caller holding everything but crm.contact-types.read
      - >-
        services-platform:modules/queries/tests/e2e/query-recipes.e2e.spec.js#refuses the run as 403 to that
        caller
    scope: assertions cited by the scenario
    provenance: test
  - scenario: ATS-PFM-QRY-008-03
    source:
      - >-
        services-platform:modules/queries/tests/e2e/query-recipes.e2e.spec.js#tells a caller that a recipe
        nobody registered does not exist, as 404
      - >-
        services-platform:modules/queries/tests/e2e/query-recipes.e2e.spec.js#refuses a missing required
        parameter as 400, naming it and the label its form shows
    scope: assertions cited by the scenario
    provenance: test
  - scenario: ATS-PFM-QRY-008-04
    source:
      - >-
        services-platform:modules/queries/tests/e2e/query-recipes.e2e.spec.js#records which recipe and which
        version the draft came from
      - >-
        services-platform:modules/queries/tests/e2e/query-recipes.e2e.spec.js#stores the definition the person
        sent, not the recipe’s template
      - >-
        services-platform:modules/queries/tests/e2e/query-recipes.e2e.spec.js#leaves the saved query untouched
        when the recipe is registered again at version 2
    scope: assertions cited by the scenario
    provenance: test
  - scenario: ATS-PFM-QRY-008-05
    source:
      - >-
        services-platform:modules/queries/tests/e2e/query-recipes.e2e.spec.js#refuses a save naming a recipe
        nobody ever registered as 400
      - >-
        services-platform:modules/queries/tests/e2e/query-recipes.e2e.spec.js#accepts a save naming a recipe
        that has since been retired, because provenance is not a link
    scope: assertions cited by the scenario
    provenance: test
  - scenario: ATS-PFM-QRY-008-06
    source:
      - >-
        services-platform:modules/queries/tests/e2e/query-recipes.e2e.spec.js#ANDs the refinement’s criteria
        with the recipe’s: exactly the active contacts who are Smiths
      - >-
        services-platform:modules/queries/tests/e2e/query-recipes.e2e.spec.js#keeps the recipe’s own criteria
        under a refinement, so a run never widens it
      - >-
        services-platform:modules/queries/tests/e2e/query-recipes.e2e.spec.js#refuses a refinement naming what
        a run may not change as 400
    scope: assertions cited by the scenario
    provenance: test
fixture_seams:
  - 'services-platform:modules/queries/tests/e2e/query-recipes.e2e.spec.js:79'
  - 'services-platform:modules/queries/tests/e2e/query-recipes.e2e.spec.js:47'
---

# Platform query recipes

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