---
id: TST-PFM-INT-629
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/integration-contracts/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/integration-contracts/src/validate.spec.ts#validates a request and
      names each problem by its path
  - provenance: test
    source: 'macroservice-libraries:packages/integration-contracts/src/validate.spec.ts#validates a response'
  - provenance: test
    source: >-
      macroservice-libraries:packages/integration-contracts/src/validate.spec.ts#requires the lookup to
      name an idempotency key or a provider reference
  - provenance: test
    source: >-
      macroservice-libraries:packages/integration-contracts/src/validate.spec.ts#validates an invoke
      request's envelope, then its request against the capability
  - provenance: test
    source: >-
      macroservice-libraries:packages/integration-contracts/src/validate.spec.ts#validates an adapter
      result, and a succeeded result's response against the capability
  - provenance: test
    source: >-
      macroservice-libraries:packages/integration-contracts/src/validate.spec.ts#takes optional warnings
      on a succeeded or accepted result: at most 10, a dotted code, a message of at most 500
  - provenance: test
    source: >-
      macroservice-libraries:packages/integration-contracts/src/validate.spec.ts#validates the manifests
      of chapter 14 and refuses one without its network allow-list
  - provenance: test
    source: >-
      macroservice-libraries:packages/integration-contracts/src/validate.spec.ts#validates any part by
      its $id
  - provenance: test
    source: >-
      macroservice-libraries:packages/integration-contracts/src/validate.spec.ts#takes an exchange rate
      only as a positive decimal string with at most 10 fractional digits
  - provenance: test
    source: >-
      macroservice-libraries:packages/integration-contracts/src/validate.spec.ts#takes the Zoom adapter's
      0.5.0 room fields: kind beside the reference, host_ref on lookup, the registrant's details
  - provenance: test
    source: >-
      macroservice-libraries:packages/integration-contracts/src/validate.spec.ts#describes Zoom's
      Server-to-Server grant and its app-level webhook in a manifest (0.5.0)
  - provenance: test
    source: >-
      macroservice-libraries:packages/integration-contracts/src/validate.spec.ts#names the provider
      resource of a sync describe, pull and push (Mailchimp's audience, 0.5.0)
  - provenance: test
    source: >-
      macroservice-libraries:packages/integration-contracts/src/validate.spec.ts#gives the probe chapter
      10's three examples: a full pass, delete not granted with a warning, write refused
  - provenance: test
    source: >-
      macroservice-libraries:packages/integration-contracts/src/validate.spec.ts#takes an optional probe
      key, and answers every check, never not_granted for authenticate, locate or write
  - provenance: test
    source: >-
      macroservice-libraries:packages/integration-contracts/src/validate.spec.ts#shows an exchange as a
      response or an error, never both or neither, and names the refused check
  - provenance: test
    source: >-
      macroservice-libraries:packages/integration-contracts/src/validate.spec.ts#leases aws_assumed_role
      and azure_client_secret credentials with their documented values
  - provenance: test
    source: >-
      macroservice-libraries:packages/integration-contracts/src/validate.spec.ts#describes the two
      methods in a manifest, with their fields and the instructions the wizard renders
  - provenance: test
    source: >-
      macroservice-libraries:packages/integration-contracts/src/validate.spec.ts#describes the UPS
      adapter: the customer's own OAuth client, the shipper number a connection setting, the shipping
      features
  - provenance: test
    source: >-
      macroservice-libraries:packages/integration-contracts/src/validate.spec.ts#takes a shipment in the
      carrier port's units and vocabulary, and refuses what the port could not mean
evidence:
  - 'macroservice-libraries:packages/integration-contracts/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.
