Skip to content

ATS-PFM-INT-009Run provider operations safely through the gateway: Capability Test Specification

Markdown

ATS-PFM-INT-009

Run provider operations safely through the gateway: Capability Test Specification

Markdown
  • DocumentProposed

KindAcceptance test setProduct areaPlatformModuleIntegration access, customer extensions and shared workflow configurationRevision3

Read atservices-platform ad3f6a65macroservice-libraries 54536a44react-console baf6dae3

Coverage

  • Rule gap: FND-PFM-INT-068
  • Transition covered
  • Validation covered
  • Permission covered
  • Edge covered
  • Failure covered
  • Boundary covered
  • Concurrency covered
  • Invariant covered
  • Interaction covered

Test Scenarios

19 scenarios proving CAP-PFM-INT-009; 10 bound to an existing test.

01 Invalid calls leave no execution recordvalidationunitnegativetest
Proves
BR-CAP-PFM-INT-009-01
Preconditions
A payment capability has a defined request contract.
Steps
Send excessive size, invalid shape, unsupported mode, missing key, padded key and excessive timeout.
Expected
Each request reports invalid input with its cause and creates no execution.
Data
Fixtures establishing the stated accounts, declarations and history in an isolated workspace.
Bound to
Source
services-platform:modules/integrations/tests/unit/services/gateway-refusals.spec.ts#refuses a request the contract refuses, invalid_request with the failing path
02 Invocation authority matches the business applicationpermissionapinegativetest
Proves
BR-CAP-PFM-INT-009-02
Preconditions
Prepare Accounting and Events principals plus a console person.
Steps
Invoke for Events as Accounting and invoke as the person without the capability permission.
Expected
Both refuse before recording an operation.
Data
Fixtures establishing the stated accounts, declarations and history in an isolated workspace.
Bound to
Source
services-platform:modules/integrations/tests/unit/services/gateway-refusals.spec.ts#refuses a service principal naming another application, access_denied
03 Idempotent requests reuse the original operationinvariantapinegativetest
Proves
BR-CAP-PFM-INT-009-03
Preconditions
One request has succeeded under a known key and another execution with its own key is awaiting reconciliation.
Steps
Replay a succeeded request unchanged, reuse its key with another amount and repeat a separate request while its execution is being reconciled.
Expected
Replay returns the stored result without another provider call, changed input is refused and the unresolved repeat identifies its pending execution.
Data
Fixtures establishing the stated accounts, declarations and history in an isolated workspace.
Bound to
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
04 Execution history is useful without secret valuesinvariantapitest
Proves
BR-CAP-PFM-INT-009-04
Preconditions
A payment connection is bound.
Steps
Authorize and inspect execution and attempt records.
Expected
The record retains its attempt, request fingerprint, safe summaries and binding; the adapter uses the execution identity and no credential is persisted.
Data
Fixtures establishing the stated accounts, declarations and history in an isolated workspace.
Bound to
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
05 Failure classification determines safe repetitionfailureapitest
Proves
BR-CAP-PFM-INT-009-05
Preconditions
The test adapter can return scripted outcomes.
Steps
Exercise pre-send timeout, retry-after, adapter error, decline and post-send timeout.
Expected
Pre-send failure retries, retry-after waits, adapter error retries once, decline returns immediately and post-send uncertainty is investigated rather than repeated.
Data
Fixtures establishing the stated accounts, declarations and history in an isolated workspace.
Bound to
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
06 Budget exhaustion stops delayed payment effectsboundaryapitest
Proves
BR-CAP-PFM-INT-009-06
Preconditions
Rate limiting outlasts the caller’s payment budget.
Steps
Authorize, wait and repeat using the same key.
Expected
The first fails with retry-later guidance, no background provider effect follows and key reuse can start a new execution.
Data
Fixtures establishing the stated accounts, declarations and history in an isolated workspace.
Bound to
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
07 Admission refusal retains the selected providerfailureapinegativetest
Proves
BR-CAP-PFM-INT-009-07
Preconditions
Prepare an open circuit, an operator-limited connection and one with unavailable credentials.
Steps
Authorize against each.
Expected
The first reports provider unavailability without another processor, the second rate limiting and the third re-authorization; all release unused keys.
Data
Fixtures establishing the stated accounts, declarations and history in an isolated workspace.
Bound to
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
08 Circuit lifecycle is an unbound proof obligationtransitionapiproposed
Proves
BR-CAP-PFM-INT-009-08
Preconditions
The selected provider repeatedly fails.
Steps
Fail five calls, call while open, wait for the probe, fail it and pass a subsequent probe.
Expected
The circuit opens, refuses before contact, permits one probe, doubles a failed-probe wait and closes after success.
Data
Fixtures establishing the stated accounts, declarations and history in an isolated workspace.
Source
services-platform:docs/integrations/README.md#Circuits (13 §10)
09 Queued invocation resumes once per dispatchconcurrencyapitest
Proves
BR-CAP-PFM-INT-009-09
Preconditions
An asynchronous test contract is available.
Steps
Invoke, dispatch the work and redeliver the same message after state advancement.
Expected
Acceptance precedes contact, the worker resumes through admission and the stale redelivery contacts no adapter.
Data
Fixtures establishing the stated accounts, declarations and history in an isolated workspace.
Bound to
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
10 Attempt limits include operator workboundaryapinegativetest
Proves
BR-CAP-PFM-INT-009-10
Preconditions
Two executions have nine and ten attempts.
Steps
Request retries and deliver work that would exceed ten.
Expected
The ninth-attempt execution can retry, the tenth cannot and excess queued work settles failed with key release.
Data
Fixtures establishing the stated accounts, declarations and history in an isolated workspace.
Bound to
Source
services-platform:modules/integrations/tests/integration/services/executions/execution-settlement.integration.spec.js#settles an execution whose next attempt is the eleventh failed, with the last class and retry_exhausted.attempt_limit
11 Payload diagnostics respect sensitivityedgeapitest
Proves
BR-CAP-PFM-INT-009-11
Preconditions
Both a meeting and payment integration opt into capture.
Steps
Invoke each and simulate capture-storage failure.
Expected
The meeting retains redacted payload references, the payment retains none and capture failure leaves the call outcome unchanged.
Data
Fixtures establishing the stated accounts, declarations and history in an isolated workspace.
Bound to
Source
services-platform:modules/integrations/tests/integration/services/executions/payload-recording.integration.spec.js#writes nothing for a sensitive capability, though the manifest records payloads
12 Reject an oversized gateway request keyboundaryapinegativeproposed
Proves
BR-CAP-PFM-INT-009-13
Preconditions
An execution request key has valid workspace, capability and digest fields.
Steps
Persist a key of one hundred and twenty-eight characters, then attempt one with one hundred and twenty-nine.
Expected
The limit-sized key is accepted and the longer key is refused without saving a request-key row.
Data
Valid direct-writer fixtures in an isolated workspace.
Source
services-platform:modules/integrations/db/integration-execution-keys.table.ts:integration_execution_keys_key_check
13 Exercise the complete execution lifecycletransitionapinegativeproposed
Proves
BR-CAP-PFM-INT-009-05 BR-CAP-PFM-INT-009-06 BR-CAP-PFM-INT-009-09 BR-CAP-PFM-INT-009-10 BR-CAP-PFM-INT-010-01 BR-CAP-PFM-INT-010-02 BR-CAP-PFM-INT-010-04 BR-CAP-PFM-INT-010-05 BR-CAP-PFM-INT-011-05 BR-CAP-PFM-INT-011-06
Preconditions
Prepare one independent record in each starting state, including absent-record cases where the model defines creation.
Steps
Run each listed transition once with its guard satisfied, then repeat it with the guard denied. Inspect the resulting record and listed side effects after commit.
Expected
Each positive case reaches its listed destination and records its defined side effects. Each denied case preserves the starting record and creates no transition side effects.
Data
Run-owned records and principals in an isolated workspace.
Source
rhythm-v2-docs:specs/platform/integrations/design/state-models/STATE-PFM-INT-007-execution-lifecycle.md#transitions
14 Exercise the complete provider circuittransitionapinegativeproposed
Proves
BR-CAP-PFM-INT-009-08 BR-CAP-PFM-INT-011-08
Preconditions
Prepare one independent record in each starting state, including absent-record cases where the model defines creation.
Steps
Run each listed transition once with its guard satisfied, then repeat it with the guard denied. Inspect the resulting record and listed side effects after commit.
Expected
Each positive case reaches its listed destination and records its defined side effects. Each denied case preserves the starting record and creates no transition side effects.
Data
Run-owned records and principals in an isolated workspace.
Source
rhythm-v2-docs:specs/platform/integrations/design/state-models/STATE-PFM-INT-008-provider-circuit.md#transitions
15 A post-send timeout enters lookup without another sendinteractionapiproposed
Proves
BR-CAP-PFM-INT-009-05 BR-CAP-PFM-INT-010-01
Preconditions
A sensitive operation times out after possible provider receipt.
Steps
Invoke it, run the due lookup and inspect attempts and provider operations.
Expected
Investigation uses the same execution and account; no second authorization is sent.
Data
Run-owned records and principals in an isolated workspace.
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,services-platform:modules/integrations/tests/integration/services/executions/reconciler.integration.spec.js#looks the execution up on the same connection with the contracts’ lookup shape, never repeating the authorize
16 Operator retry obeys the execution attempt ceilinginteractionapiproposed
Proves
BR-CAP-PFM-INT-009-10 BR-CAP-PFM-INT-011-03
Preconditions
Retryable failures exist with nine and ten attempts and the original request is available.
Steps
Request an operator retry for each and dispatch accepted work.
Expected
Only the nine-attempt execution permits another attempt; the other remains unchanged.
Data
Run-owned records and principals in an isolated workspace.
Source
services-platform:modules/integrations/tests/integration/services/executions/execution-settlement.integration.spec.js#settles an execution whose next attempt is the eleventh failed, with the last class and retry_exhausted.attempt_limit,services-platform:modules/integrations/tests/integration/services/executions/execution-operations.integration.spec.js#refuses a request handed back that is not the one recorded
17 Circuit refusal retains the selected processorinteractionapiproposed
Proves
BR-CAP-PFM-INT-008-07 BR-CAP-PFM-INT-009-07
Preconditions
A sensitive binding selects an account with an open circuit and another usable account exists.
Steps
Resolve and invoke the capability, then inspect the trace and adapter calls.
Expected
Resolution identifies the selected account and circuit condition; admission refuses without contacting either processor.
Data
Run-owned records and principals in an isolated workspace.
Source
services-platform:modules/integrations/tests/unit/services/binding-resolution.spec.ts#resolves a payment whose processor’s circuit is open rather than refusing it binding_ineligible,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
18 Library calls retain ordinary execution evidenceinteractionapiproposed
Proves
BR-CAP-PFM-INT-009-04 BR-CAP-PFM-INT-012-04
Preconditions
An active test account is usable from connection detail.
Steps
Invoke the same example twice through the Library and inspect Activity and account history.
Expected
Separate executions identify the person and selected account without requiring a binding.
Data
Run-owned records and principals in an isolated workspace.
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,services-platform:modules/integrations/tests/e2e/connection-try.e2e.spec.js#records an execution of that connection by the calling application library_try on behalf of the person, with no binding
19 Concurrent first claims create one provider operationconcurrencyapinegativeproposed
Proves
BR-CAP-PFM-INT-009-03 INV-DOM-PFM-INT-003-03
Preconditions
Two authorized callers prepare identical requests with the same unused key and one selected test account.
Steps
Release both initial invocations at the same barrier, then inspect keys, executions, attempts and adapter contact.
Expected
The key names one execution and the losing claimant identifies that execution or its retained result; only one initial provider operation occurs.
Data
A delayed scripted adapter and a run-owned unused request key in an isolated workspace.
Source
rhythm-v2-docs:specs/platform/integrations/planning/capabilities/CAP-PFM-INT-009-call-a-capability-through-the-gateway-without-doing-it-twice.md#rules

The Markdown files under specs/ in rhythmsoftware/rhythm-v2-docs are the canonical source of truth. This reader is a generated, read-only projection of them.