Skip to content

CAP-PFM-INT-009Run provider operations safely through the gateway

Markdown

CAP-PFM-INT-009

Run provider operations safely through the gateway

Markdown
  • DocumentDraft
  • Product intentProposed
  • ImplementationObserved

KindCapabilityProduct areaPlatformModuleIntegration access, customer extensions and shared workflow configurationRevision1

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

The Formal Contract

The narrative above explains; the sections below are authoritative — the rules, scenarios and tests this document binds.

Outcomes
Call history includes the execution, its attempts and selected binding.Repeated identical requests reuse the existing result.Admission controls protect providers and stop payments that cannot run within their budget.
Surfaces
apijob
Intent sources
services-platform:docs/milestones/INTG-M2-calls-through-the-gateway.md#M2-D4services-platform:docs/milestones/INTG-M2-calls-through-the-gateway.md#M2-D7services-platform:docs/milestones/INTG-M2-calls-through-the-gateway.plan.md#A1services-platform:docs/milestones/INTG-M2-calls-through-the-gateway.plan.md#A2services-platform:docs/milestones/INTG-M2-calls-through-the-gateway.plan.md#A3services-platform:docs/milestones/INTG-M2-calls-through-the-gateway.plan.md#INTG-M2-S05services-platform:docs/milestones/INTG-M2-calls-through-the-gateway.plan.md#INTG-M2-S06services-platform:docs/milestones/INTG-M2-calls-through-the-gateway.plan.md#INTG-M2-S07services-platform:docs/milestones/INTG-M2-calls-through-the-gateway.plan.md#INTG-M2-S08services-platform:docs/milestones/INTG-M2-calls-through-the-gateway.plan.md#INTG-M2-S12services-platform:docs/milestones/INTG-M2-calls-through-the-gateway.plan.md#INTG-M2-S13services-platform:docs/milestones/INTG-M2-calls-through-the-gateway.plan.md#INTG-M2-S14services-platform:docs/milestones/INTG-M2-calls-through-the-gateway.plan.md#INTG-M2-S19services-platform:docs/milestones/INTG-M2-calls-through-the-gateway.plan.md#INTG-M2-S20

Controls

40 controls apply, from the corpus control catalogue.

TC-AVL-001 TC-AVL-004 TC-AZ-001 TC-AZ-002 TC-AZ-003 TC-AZ-004 TC-CRY-001 TC-CRY-002 TC-CRY-003 TC-CRY-004 TC-DAT-001 TC-DAT-002 TC-DAT-003 TC-IAM-001 TC-IAM-002 TC-IAM-004 TC-IAM-005 TC-IAM-006 TC-LOG-001 TC-LOG-002 TC-LOG-003 TC-LOG-004 TC-LOG-005 TC-MON-001 TC-PI-001 TC-PI-002 TC-PI-004 TC-PI-005 TC-PRV-001 TC-PRV-002 TC-SEC-001 TC-SEC-002 TC-SEC-003 TC-SEC-004 TC-TEN-001 TC-TEN-002 TC-TEN-003 TC-VEN-001 TC-VEN-002 TC-VEN-003

Permissions

KeyChecked atScope
platform.integrations.invokeapitenant
platform.integrations.invokeservicetenant

Business Rules

13 rules, 12 to be proved before approval. A rule's product intent is derived from its origin: 6 confirmed by a product decision, the rest inheriting this capability's proposed.

IdRuleKindEnforced atProvenance
01must prove
Proposed
Before recording an execution, the gateway rejects requests over one megabyte, contract violations, unsupported modes, missing required idempotency keys, keys with surrounding whitespace and excessive timeout requests.
validationservicetest
services-platform:modules/integrations/tests/unit/services/gateway-refusals.spec.ts#refuses a request the contract refuses, invalid_request with the failing path
02must prove
Proposed
Application principals invoke only for their own application except Platform, while a console caller needs invoke authority and the capability’s permission.
permissionapi, servicetest
services-platform:modules/integrations/tests/unit/services/gateway-refusals.spec.ts#refuses a service principal naming another application, access_denied
03must prove
Proposed
Idempotency keys distinguish calls within a workspace and capability: identical pending calls return in progress, settled calls replay their first response and changed requests conflict; cancellation or admission refusal releases the key.
invariantservice, databasetest
services-platform:modules/integrations/tests/unit/services/execution-idempotency.spec.ts#replays the stored answer of a succeeded execution, exactly
04must prove
Proposed
An execution records attempts, request fingerprint, serving binding and connection and scalar summaries within four kilobytes that exclude secrets and personal or payment-instrument details; the provider uses the execution identifier for idempotency.
invariantservicetest
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
05must prove
Confirmed
Immediate retries reuse the execution at one, four and sixteen seconds within the caller budget for unavailability, rate limits or pre-send timeouts, and retry adapter errors once; declines, refusals and unknown post-send outcomes are not repeated.
policyservicetest
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
06must prove
Proposed
A sensitive call that cannot retry within its budget settles failed, frees the key and queues nothing, while a non-sensitive call can continue asynchronously.
policyservicetest
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
07must prove
Proposed
Each attempt passes circuit, rate and credential admission; refusal returns the appropriate retry or re-authorization information, never switches connections and releases the unused key.
policyservicetest
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
08must prove
Confirmed
Five consecutive provider-unavailable or timeout outcomes open the connection circuit for sixty seconds; one probe follows, failed probes double the wait up to fifteen minutes and success closes it.
calculationservicedocumented
09must prove
Confirmed
Asynchronous invocation returns acceptance before provider contact and uses six queued attempts with delays of one, five and thirty minutes, two hours and six hours.
policyservicetest
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
10must prove
Confirmed
An execution permits at most ten attempts including operator retries; a requested retry at ten is refused and an eleventh queued attempt settles failed with key release.
invariantservicetest
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
11must prove
Confirmed
Opted-in non-sensitive payloads are redacted, truncated at one megabyte and retained for thirty days, while sensitive payloads are never recorded and storage failure does not fail the call.
policyservicetest
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
Confirmed
Provider rate declarations govern admission, operator overrides can lower them and retry-after drains the bucket for the requested wait; immediate calls receive a retry time and queued calls wait.
calculationservicetest
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
13must prove
Proposed
Stored gateway request keys contain at most one hundred and twenty-eight characters.
validationdatabaseobserved

Scenarios

IdGivenWhenThenProvenance
01A test payment for one hundred and twenty dollars encounters two provider-unavailable results.Accounting authorizes through the gateway.The third attempt succeeds about five seconds after the first under the same execution.test
services-platform:modules/integrations/tests/e2e-adapters/gateway-dummy.adapters.spec.js#honours the provider’s retry_after of one second, then succeeds (04)
02The selected processor’s circuit is open.A payment is requested for its merchant account.Admission reports provider unavailability without contacting another processor.test

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.