---
id: TST-PFM-OPS-003
title: Job cancellation
kind: unit
product_area: platform
module: operations
revision: 1
status: draft
source_sha:
  macroservice-libraries: 54536a441935c6e09fdb7f96f0bec71c52ba4e03
repository: macroservice-libraries
files:
  - packages/jobs/src/engine/job-cancellation.spec.ts
implements:
  - ATS-PFM-OPS-004-03
  - ATS-PFM-OPS-004-04
  - ATS-PFM-OPS-004-05
environment: local
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 1
estimate_basis: Scheduling estimate only; no duration is measured during this documentation pass.
isolation: 'Process-local inputs, registries and test adapters.'
evidence:
  - >-
    macroservice-libraries:packages/jobs/src/engine/job-cancellation.spec.ts at
    54536a441935c6e09fdb7f96f0bec71c52ba4e03: existing suite body, setup, assertions and cleanup.
binding_note: Bindings apply only to the listed specification scenarios.
assertion_sources:
  - >-
    macroservice-libraries:packages/jobs/src/engine/job-cancellation.spec.ts#refuses a job whose type is
    not cancellable
  - >-
    macroservice-libraries:packages/jobs/src/engine/job-cancellation.spec.ts#refuses a job already
    settled
  - >-
    macroservice-libraries:packages/jobs/src/engine/job-cancellation.spec.ts#refuses a job that does not
    exist
  - >-
    macroservice-libraries:packages/jobs/src/engine/job-cancellation.spec.ts#refuses a request with no
    reason
  - >-
    macroservice-libraries:packages/jobs/src/engine/job-cancellation.spec.ts#records the request on the
    root and in its history, then stops the execution with the cause
  - >-
    macroservice-libraries:packages/jobs/src/engine/job-cancellation.spec.ts#names the requester the
    caller gives, and finds the kind when given it
  - >-
    macroservice-libraries:packages/jobs/src/engine/job-cancellation.spec.ts#writes nothing new when
    asked again, and stops the execution again
  - >-
    macroservice-libraries:packages/jobs/src/engine/job-cancellation.spec.ts#keeps the request when the
    stop fails, and says so
---

# Job cancellation

## Verification Boundary

This suite exercises background work through its declared function or structural boundary. Its implementation is present at the pinned source revision, and this register records no execution result.

## What This Suite Proves

The checks exercise job cancellation within the file’s declared setup and assertion boundary. The structured assertion anchors distinguish these checks from the surrounding feature flows. The scenario bindings name the attributed outcomes.

## What It Does Not Prove

Local execution does not establish deployed infrastructure, live commercial-provider configuration or authorization-cache completion. Registration and an implemented suite do not establish a passing result.

## Real Dependencies and Test Doubles

The production logic under assertion is real. Storage uses the suite’s in-memory records rather than a durable database. Transactions execute through an inline test adapter. Execution clients or probes use the suite’s controlled response port.

## Must Not Be Doubled

The production function, registry or builder under assertion remains real.
