---
id: TST-PFM-INT-640
title: Declared contract validation
kind: unit
product_area: platform
module: integrations
revision: 1
status: draft
source_sha:
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
  macroservice-libraries: 54536a441935c6e09fdb7f96f0bec71c52ba4e03
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
repository: macroservice-libraries
files:
  - packages/workflow-actions/src/validate.spec.ts
implements: []
environment: mock
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 1
isolation: 'The test process owns its inputs, fake clocks and any replaced runtime ports.'
test_cases:
  - provenance: test
    source: >-
      macroservice-libraries:packages/workflow-actions/src/validate.spec.ts#passes a valid stage list: a
      task on entry, a message, and the task completed on exit
  - provenance: test
    source: >-
      macroservice-libraries:packages/workflow-actions/src/validate.spec.ts#refuses a spec whose shape is
      wrong, at its path
  - provenance: test
    source: 'macroservice-libraries:packages/workflow-actions/src/validate.spec.ts#refuses a key used twice'
  - provenance: test
    source: >-
      macroservice-libraries:packages/workflow-actions/src/validate.spec.ts#refuses a type the registry
      does not have
  - provenance: test
    source: >-
      macroservice-libraries:packages/workflow-actions/src/validate.spec.ts#refuses a retired type (07
      §10)
  - provenance: test
    source: >-
      macroservice-libraries:packages/workflow-actions/src/validate.spec.ts#refuses a trigger point the
      host does not register
  - provenance: test
    source: >-
      macroservice-libraries:packages/workflow-actions/src/validate.spec.ts#refuses a retired trigger
      point
  - provenance: test
    source: >-
      macroservice-libraries:packages/workflow-actions/src/validate.spec.ts#refuses a type that cannot be
      configured on this host (hosts)
  - provenance: test
    source: >-
      macroservice-libraries:packages/workflow-actions/src/validate.spec.ts#refuses a type at a trigger
      it does not allow (allowed_triggers)
  - provenance: test
    source: >-
      macroservice-libraries:packages/workflow-actions/src/validate.spec.ts#refuses params the type does
      not declare
  - provenance: test
    source: >-
      macroservice-libraries:packages/workflow-actions/src/validate.spec.ts#refuses a contract version
      that is not the type’s current one: publish pins the current version
  - provenance: test
    source: >-
      macroservice-libraries:packages/workflow-actions/src/validate.spec.ts#the first of the three rules:
      refuses a durable type that names no executor function
  - provenance: test
    source: >-
      macroservice-libraries:packages/workflow-actions/src/validate.spec.ts#the second of the three
      rules: refuses an inline type that names a network call
  - provenance: test
    source: >-
      macroservice-libraries:packages/workflow-actions/src/validate.spec.ts#the third of the three rules:
      refuses a host type of another host
  - provenance: test
    source: >-
      macroservice-libraries:packages/workflow-actions/src/validate.spec.ts#the group rule: refuses a
      host action in a group
  - provenance: test
    source: >-
      macroservice-libraries:packages/workflow-actions/src/validate.spec.ts#the group rule: refuses an
      action whose outputs another references in a group
  - provenance: test
    source: >-
      macroservice-libraries:packages/workflow-actions/src/validate.spec.ts#refuses an output reference
      to an action the list does not have
  - provenance: test
    source: >-
      macroservice-libraries:packages/workflow-actions/src/validate.spec.ts#refuses an output the
      producing type does not declare
  - provenance: test
    source: >-
      macroservice-libraries:packages/workflow-actions/src/validate.spec.ts#refuses an output used before
      it is produced: a lower order at the same trigger, or an earlier trigger
  - provenance: test
    source: >-
      macroservice-libraries:packages/workflow-actions/src/validate.spec.ts#refuses a condition the rules
      package refuses against the trigger’s description
  - provenance: test
    source: >-
      macroservice-libraries:packages/workflow-actions/src/validate.spec.ts#refuses a type whose
      permission the configuring user does not hold
  - provenance: test
    source: >-
      macroservice-libraries:packages/workflow-actions/src/validate.spec.ts#warns that a halt inside a
      group never halts anything
  - provenance: test
    source: >-
      macroservice-libraries:packages/workflow-actions/src/validate.spec.ts#accepts an outcome kind’s
      outputs schema that is not an object, without checking output names
evidence:
  - 'macroservice-libraries:packages/workflow-actions/src/validate.spec.ts'
---
# Declared contract validation

## Verification Boundary

This unit suite exercises declared contract validation within the shared package. It records engineering coverage at the pinned revision without claiming a deployed run.

## What This Suite Proves

The source assertions cover the package behavior under controlled inputs. No detailed capability or feature scenario binding is verified in this registration.

## What It Does Not Prove

The suite does not establish deployed authorization, database behavior, provider effects or a complete customer workflow.

## Real Dependencies and Test Doubles

Imported package functions execute against the source-defined fixtures. Runtime ports, clocks and external transport responses remain controlled wherever the suite replaces them.

## Must Not Be Doubled

The shared function under test and its result assertions must execute. Returning an expected answer from a substitute does not prove the package behavior.
