---
id: TST-PFM-INT-543
title: invoke capability
kind: integration
product_area: platform
module: integrations
revision: 1
status: draft
source_sha:
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
  macroservice-libraries: 54536a441935c6e09fdb7f96f0bec71c52ba4e03
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
repository: services-platform
files:
  - modules/integrations/tests/integration/services/executions/invoke-capability.integration.spec.js
implements:
  - ATS-PFM-INT-009-02
  - ATS-PFM-INT-009-03
  - ATS-PFM-INT-009-04
  - ATS-PFM-INT-009-05
  - ATS-PFM-INT-009-06
  - ATS-PFM-INT-009-07
  - ATS-PFM-INT-009-09
  - ATS-PFM-INT-011-04
environment: local
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 5
isolation: >-
  Use the suite-owned database fixtures and its declared cleanup; prepare the test database before
  integration or lifecycle execution.
evidence:
  - >-
    services-platform:modules/integrations/tests/integration/services/executions/invoke-capability.integration.spec.js
test_cases:
  - source: >-
      services-platform:modules/integrations/tests/integration/services/executions/invoke-capability.integration.spec.js#answers
      succeeded with the response, the execution and the connection, valid against the contracts
    provenance: test
  - source: >-
      services-platform:modules/integrations/tests/integration/services/executions/invoke-capability.integration.spec.js#records
      the execution succeeded, with its digest, summaries, reference and one attempt
    provenance: test
  - source: >-
      services-platform:modules/integrations/tests/integration/services/executions/invoke-capability.integration.spec.js#stores
      the full answer the caller received
    provenance: test
  - source: >-
      services-platform:modules/integrations/tests/integration/services/executions/invoke-capability.integration.spec.js#hands
      the adapter the execution id, the lease and the callback, and stores no credential
    provenance: test
  - source: >-
      services-platform:modules/integrations/tests/integration/services/executions/invoke-capability.integration.spec.js#answers
      a decline as failed, refused, and never retries it
    provenance: test
  - source: >-
      services-platform:modules/integrations/tests/integration/services/executions/invoke-capability.integration.spec.js#retries
      a timeout before send after the sync schedule’s first delay, with the same execution id, and
      succeeds
    provenance: test
  - source: >-
      services-platform:modules/integrations/tests/integration/services/executions/invoke-capability.integration.spec.js#honours
      a provider’s retry_after before the next attempt, and records the bucket’s refill
    provenance: test
  - source: >-
      services-platform:modules/integrations/tests/integration/services/executions/invoke-capability.integration.spec.js#retries
      an adapter_error once, then fails it
    provenance: test
  - source: >-
      services-platform:modules/integrations/tests/integration/services/executions/invoke-capability.integration.spec.js#answers
      retry_later when the caller’s budget cannot hold another attempt of a capability that is not
      sensitive, and queues the next one
    provenance: test
  - source: >-
      services-platform:modules/integrations/tests/integration/services/executions/invoke-capability.integration.spec.js#answers
      the contracts’ retry_later with retry_after from the last attempt’s class
    provenance: test
  - source: >-
      services-platform:modules/integrations/tests/integration/services/executions/invoke-capability.integration.spec.js#settles
      the execution failed with the last attempt’s class and retry_later.budget_exhausted
    provenance: test
  - source: >-
      services-platform:modules/integrations/tests/integration/services/executions/invoke-capability.integration.spec.js#queues
      no continuation and nudges no dispatcher, so nothing runs in the background
    provenance: test
  - source: >-
      services-platform:modules/integrations/tests/integration/services/executions/invoke-capability.integration.spec.js#releases
      the caller’s key and stores the retry_later answer the caller received
    provenance: test
  - source: >-
      services-platform:modules/integrations/tests/integration/services/executions/invoke-capability.integration.spec.js#records
      a new execution when the caller sends the same key again
    provenance: test
  - source: >-
      services-platform:modules/integrations/tests/integration/services/executions/invoke-capability.integration.spec.js#stops
      at a later attempt’s refused admission too, failed with the refusal’s class, nothing queued
    provenance: test
  - source: >-
      services-platform:modules/integrations/tests/integration/services/executions/invoke-capability.integration.spec.js#leaves
      a timeout after send unknown, for the reconciler in 30 seconds, and never retries it
    provenance: test
  - source: >-
      services-platform:modules/integrations/tests/integration/services/executions/invoke-capability.integration.spec.js#leaves
      an adapter’s own unknown answer unknown, with the provider reference it gave
    provenance: test
  - source: >-
      services-platform:modules/integrations/tests/integration/services/executions/invoke-capability.integration.spec.js#replays
      a settled execution’s stored answer for the same key and request, without calling the adapter again
    provenance: test
  - source: >-
      services-platform:modules/integrations/tests/integration/services/executions/invoke-capability.integration.spec.js#refuses
      the same key with another request, idempotency_key_reused
    provenance: test
  - source: >-
      services-platform:modules/integrations/tests/integration/services/executions/invoke-capability.integration.spec.js#answers
      in_progress, with the execution id, while the key’s execution is being reconciled
    provenance: test
  - source: >-
      services-platform:modules/integrations/tests/integration/services/executions/invoke-capability.integration.spec.js#writes
      the caller’s key to the key table, naming its execution
    provenance: test
  - source: >-
      services-platform:modules/integrations/tests/integration/services/executions/invoke-capability.integration.spec.js#refuses
      with 503 provider_unavailable while the circuit is open, and releases the key
    provenance: test
  - source: >-
      services-platform:modules/integrations/tests/integration/services/executions/invoke-capability.integration.spec.js#refuses
      with 429 rate_limited and retry_after over an operator’s limit, and releases the key
    provenance: test
  - source: >-
      services-platform:modules/integrations/tests/integration/services/executions/invoke-capability.integration.spec.js#refuses
      with 409 connection_reauth_required when the credential cannot be leased
    provenance: test
  - source: >-
      services-platform:modules/integrations/tests/integration/services/executions/invoke-capability.integration.spec.js#refuses
      an invocation nothing is bound for, 409 no_binding with its trace
    provenance: test
  - source: >-
      services-platform:modules/integrations/tests/integration/services/executions/invoke-capability.integration.spec.js#refuses
      a principal invoking for another application, 403, before recording anything
    provenance: test
  - source: >-
      services-platform:modules/integrations/tests/integration/services/executions/invoke-capability.integration.spec.js#answers
      202 accepted and queues the first attempt with the execution, calling no adapter
    provenance: test
  - source: >-
      services-platform:modules/integrations/tests/integration/services/executions/invoke-capability.integration.spec.js#publishes
      the dispatch to the queue and deletes it, and the consumer resumes the execution at admission
    provenance: test
  - source: >-
      services-platform:modules/integrations/tests/integration/services/executions/invoke-capability.integration.spec.js#settles
      succeeded when the adapter completes it through the callback, storing its answer
    provenance: test
  - source: >-
      services-platform:modules/integrations/tests/integration/services/executions/invoke-capability.integration.spec.js#cancels
      an accepted execution before its first attempt, releasing its key and its queued dispatch
    provenance: test
  - source: >-
      services-platform:modules/integrations/tests/integration/services/executions/invoke-capability.integration.spec.js#lets
      the released key start a new execution after the cancellation
    provenance: test
  - source: >-
      services-platform:modules/integrations/tests/integration/services/executions/invoke-capability.integration.spec.js#asks
      a running async execution to stop, and says the cancellation is the adapter’s to honour
    provenance: test
  - source: >-
      services-platform:modules/integrations/tests/integration/services/executions/invoke-capability.integration.spec.js#refuses
      to cancel a settled sync execution, not_cancellable
    provenance: test
dependency_evidence:
  provenance: test
  source: >-
    services-platform:modules/integrations/tests/integration/services/executions/invoke-capability.integration.spec.js
  reviewed:
    - Suite introduction
    - Fixture setup
    - Client substitutions
    - Assertions and cleanup
---
# invoke capability

## Verification Boundary

This database and service suite exercises invoke capability. Its registration records the executable definition; no run result is asserted.

## What This Suite Proves

The bindings identify the detailed outcomes asserted by this suite. Test-level evidence retains the individual checks, including cases where several suites contribute to one scenario.

## What It Does Not Prove

In-process execution does not establish deployed infrastructure or a real provider response. Several bindings can supply different parts of a detailed scenario; no single-file completeness is implied.

## Real Dependencies and Test Doubles

The suite definition identifies its database fixtures and replaced clients, hooks, clocks or executors. Integration runs use the prepared database; lifecycle runs exercise the in-process route or adapter path.

## Must Not Be Doubled

The database constraints, transactions and service behavior claimed by an integration binding must execute. Replaced external seams cannot establish live provider or infrastructure behavior.
