---
id: TST-PFM-DJE-185
title: Data run ports
kind: unit
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/unit/data-run-ports.spec.ts
implements: []
environment: local
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 1
isolation: In-memory fixtures and restored dependency doubles.
evidence:
  - 'services-platform:modules/data-jobs/tests/unit/data-run-ports.spec.ts'
assertion_inventory:
  - the port a Data Run step goes through
  - does a step whose object type belongs to Platform in process
  - 'asks another macroservice for a step of its own over HTTP, which is the same port it always was'
  - reads a Platform job in process and another service’s job over HTTP
  - cancels a Platform job in process and another service’s job over HTTP
  - >-
    asks whether the caller may drive a step of the port the step belongs to, as every other call is
    routed
  - 'answers the job the port it chose created, rather than one of its own'
  - >-
    decides by the service prefix alone, so a third macroservice with a data operation is reached
    without a change here
  - a Platform step that needs no address
  - refuses another macroservice’s step naming the address this environment does not set (premise)
  - >-
    never asks for Platform’s own address: the step is refused or served on its own merits, never
    for a missing host
  - what a step Platform owns asks of the caller
  - accepts a caller holding the bulk key and both per-record keys (the positive control)
  - 'accepts a caller holding the bulk key and only the create key, which is the route’s anyOf'
  - 'accepts a caller holding the bulk key and only the update key, the other half of that anyOf'
  - refuses a caller who may change definitions but holds no bulk key
  - refuses a caller holding the bulk key and neither per-record key
  - >-
    refuses a caller the dispatcher evaluated nothing for, because an unevaluated key is not a held
    one
  - the tenant a Platform step’s keys are asked in
  - 'asks the custom-field data-job routes’ own requirement, in the step’s tenant, on a console route'
  - asks a custom object records step the records routes’ requirement instead
  - asks an associations step the associations routes’ requirement
  - vouches the caller’s customer for a tenant a live staff access grant presents
  - vouches no customer for another customer’s tenant the caller holds no grant in
  - vouches no customer once the staff grant’s window has closed
  - 'vouches no customer for a portal user, who is never evaluated on a console route'
  - >-
    allows the step to a staff member whose grant presents the tenant (the positive control of the
    evaluation)
  - >-
    refuses a staff member whose only authority is a platform-scope allow of everything, which
    counts on a system route alone
  - what a Platform job’s status says about its step
  - 'leaves the step running while the job is still working, whatever stage it is at'
  - finishes the step succeeded when every item applied
  - >-
    finishes the step succeeded when the job completed with rejections, because the counts are where
    they are read
  - 'counts a conflict as a rejection, so every outcome lands in exactly one of the four counts'
  - >-
    settles the step blocked when the finished job could not attempt every item, which is what makes
    the run try it once more
  - counts an item nothing attempted as one nothing could attempt
  - 'fails the step for a job that failed, in the job’s own operator-safe words'
  - 'fails the step for a job that was cancelled or expired, because neither is going to finish'
  - 'carries no failure text for a job that did not fail, rather than an empty one'
registration_note: Registration describes existing source; the suite is not executed by this documentation job.
---

# Data run ports

## Verification Boundary

The suite checks an isolated production calculation, declaration or adapter. The structured assertion inventory records the checks present at the pinned revision.

## What This Suite Proves

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

## What It Does Not Prove

An isolated check does not establish a deployed workflow, database enforcement or complete feature acceptance.

## Real Dependencies and Test Doubles

The production function or declaration is exercised with in-memory inputs and dependency doubles. This boundary does not require a live database.

## Must Not Be Doubled

The production function under examination and its returned decisions remain real; replacing their answers defeats the check.
