---
id: TST-PFM-DJE-165
title: Data runs
kind: api-lifecycle
product_area: platform
module: data-job-engine
revision: 1
status: draft
source_sha:
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
  macroservice-libraries: 54536a441935c6e09fdb7f96f0bec71c52ba4e03
  services-crm: a8d1364f1dd44b723bb5f9acba12f983e9ec8d69
  services-membership: 5994c270e8a37a30f848e99ba5b5ee6b87c08893
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
repository: services-platform
files:
  - modules/data-jobs/tests/e2e/data-runs.e2e.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: 5
isolation: >-
  Suite-owned fixture records, job identifiers and workspace contexts; teardown removes the fixture
  data.
evidence:
  - 'services-platform:modules/data-jobs/tests/e2e/data-runs.e2e.spec.js'
assertion_inventory:
  - the Data Runs API (end to end)
  - a staff member who may manage data runs
  - 'answers the registered run, which has written nothing of the tenant’s yet'
  - orders the three datasets by the dependsOn edges the manifest declared
  - 'has submitted nothing to the owning macroservice, because registering is not loading'
  - 'answers a summary whose counts are all zero, the package having been read and not run'
  - 'refuses to call the tenant ready, naming the run that has not finished'
  - lists the tenant’s runs
  - lists the run’s steps in execution order
  - answers a run id the tenant has none under as absent
  - starting a run
  - answers the run as running
  - 'submits only the dataset that waits for nothing, the other two depending on it'
  - 'submits it to the macroservice that owns the object type, over that service’s own route'
  - 'submits it for this tenant, in the run’s mode and for the run’s purpose'
  - 'forwards the staff caller’s own bearer token, there being no service identity for a run'
  - 'submits the next dataset once the one it depends on has finished, which reading the run does'
  - 'records what the owning service counted, rather than counting anything itself'
  - leaves the dataset that depends on the one still running unsubmitted
  - pausing and resuming a run
  - answers the paused run
  - 'submits nothing more while it is paused, which reading it shows'
  - resumes it to running
  - refuses to resume a run that is running rather than paused
  - cancelling a run
  - answers the cancelled run
  - cancels the job it had submitted in the service that is running it
  - 'skips the datasets it never submitted, so the summary says they were not attempted'
  - 'refuses to start it again, a cancelled run being final'
  - a staff member holding another HQ key but not this one
  - 'refuses the registration, which is the key’s own operation'
  - 'refuses reading the tenant’s runs, because what an import did is not a reader’s business'
  - refuses driving the run on every one of the four operations that move it
  - 'left the run exactly as the manager registered it, so none of the refusals half-happened'
  - wrote no run of its own for the refused caller
  - an administrator of the tenant’s own customer
  - 'refuses all eight routes, a customer-scope grant being no authority on a system route'
  - left the run as the manager registered it after every one of those refusals
  - an anonymous caller
  - 'refuses all eight routes as unauthenticated, before any of them reads a thing'
  - left the run as the manager registered it
  - routing
  - answers 404 for a data-runs path no route declares
  - answers 405 for a method the data-runs collection does not take
registration_note: Registration describes existing source; the suite is not executed by this documentation job.
---

# Data runs

## Verification Boundary

The suite checks requests through the local production dispatcher and signed caller evaluation. The structured assertion inventory records the checks present at the pinned revision.

## What This Suite Proves

The existing checks exercise data runs. The specification bindings identify the narrower outcomes supported by those assertions.

## What It Does Not Prove

Local execution does not establish deployed queue, storage or service behavior. Independent test cases do not establish a complete cross-feature process.

## Real Dependencies and Test Doubles

Run registration and progression use real Postgres. Child-job calls and uploaded input are supplied through test ports, so remote service deployment is outside this boundary.

## Must Not Be Doubled

The database effects, security context and production operation under examination remain real. Their outcomes cannot be replaced with canned success responses.
