---
id: ATS-PFM-INT-004
scope: CAP-PFM-INT-004
product_area: platform
module: integrations
revision: 3
status: proposed
source_sha:
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
  macroservice-libraries: 54536a441935c6e09fdb7f96f0bec71c52ba4e03
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
scenarios:
  - id: ATS-PFM-INT-004-01
    title: Authentication method determines the initial connection state
    level: api
    proves:
      - BR-CAP-PFM-INT-004-01
    preconditions: An enabled test-provider installation has a published current release.
    steps: Create one entered-key connection and one platform-account connection.
    expected: >-
      Both use the current release; the first waits for credentials and the second begins verification
      with one job.
    negative: false
    data_needs: 'Fixtures establishing the stated accounts, declarations and history in an isolated workspace.'
    bound_to:
      - TST-PFM-INT-489
      - TST-PFM-INT-520
    provenance: test
    source: >-
      services-platform:modules/integrations/tests/e2e/integrations.e2e.spec.js#connects a platform
      account, which starts verifying with its job
    category: transition
    binding_evidence:
      - >-
        services-platform:modules/integrations/tests/e2e/integrations.e2e.spec.js#connects a platform
        account, which starts verifying with its job
      - >-
        services-platform:modules/integrations/tests/integration/services/connections/connection-jobs.integration.spec.js#is
        created verifying, with its verification job
    binding_scope: >-
      contributions: the cited tests support their own asserted outcomes. Additional setup, branches
      and combined sequences remain proposed unless the cited assertions exercise them.
  - id: ATS-PFM-INT-004-02
    title: Connection identity rejects collisions and invalid syntax
    level: api
    proves:
      - BR-CAP-PFM-INT-004-02
    preconditions: Main account already exists in the workspace.
    steps: 'Create the same derived identifier, a valid explicit identifier and an invalid explicit identifier.'
    expected: >-
      The collision names the taken value, the valid explicit choice succeeds and the invalid syntax
      identifies the field.
    negative: true
    data_needs: 'Fixtures establishing the stated accounts, declarations and history in an isolated workspace.'
    bound_to:
      - TST-PFM-INT-489
    provenance: test
    source: >-
      services-platform:modules/integrations/tests/e2e/integrations.e2e.spec.js#refuses a second
      connection of the tenant whose name derives to a taken id, 409 naming the id
    category: validation
    binding_evidence:
      - >-
        services-platform:modules/integrations/tests/e2e/integrations.e2e.spec.js#refuses a second
        connection of the tenant whose name derives to a taken id, 409 naming the id
      - >-
        services-platform:modules/integrations/tests/e2e/integrations.e2e.spec.js#refuses an id outside
        the grammar, 400 naming the field
      - >-
        services-platform:modules/integrations/tests/e2e/integrations.e2e.spec.js#accepts that name with
        an explicit id
    binding_scope: >-
      contributions: the cited tests support their own asserted outcomes. Additional setup, branches
      and combined sequences remain proposed unless the cited assertions exercise them.
  - id: ATS-PFM-INT-004-03
    title: Account verification prevents duplicate connections
    level: api
    proves:
      - BR-CAP-PFM-INT-004-03
    preconditions: A verified connection already uses provider account A.
    steps: 'Verify another connection for A, disconnect the original and verify the new one again.'
    expected: >-
      The duplicate fails with the conflicting connection identified; disconnection makes the account
      available for reuse.
    negative: true
    data_needs: 'Fixtures establishing the stated accounts, declarations and history in an isolated workspace.'
    bound_to:
      - TST-PFM-INT-500
      - TST-PFM-INT-520
    provenance: test
    source: >-
      services-platform:modules/integrations/tests/integration/db/integration-connections.table.integration.spec.js#refuses
      the same provider account connected twice under the installation
    category: invariant
    binding_evidence:
      - >-
        services-platform:modules/integrations/tests/integration/db/integration-connections.table.integration.spec.js#refuses
        the same provider account connected twice under the installation
      - >-
        services-platform:modules/integrations/tests/integration/services/connections/connection-jobs.integration.spec.js#moves
        it to failed_verification at once, naming the cause, when the account is already connected under
        the installation
      - >-
        services-platform:modules/integrations/tests/integration/db/integration-connections.table.integration.spec.js#accepts
        the account again beside a disconnected connection of it
    binding_scope: >-
      contributions: the cited tests support their own asserted outcomes. Additional setup, branches
      and combined sequences remain proposed unless the cited assertions exercise them.
  - id: ATS-PFM-INT-004-04
    title: Transitions preserve the complete connection contract
    level: api
    proves:
      - BR-CAP-PFM-INT-004-04
    preconditions: Prepare every connection state.
    steps: Exercise every named transition from each state and inspect its effects.
    expected: >-
      Only permitted transitions move, disconnected remains final and accepted transitions write both
      trails and notify the binding hook.
    negative: false
    data_needs: 'Fixtures establishing the stated accounts, declarations and history in an isolated workspace.'
    bound_to:
      - TST-PFM-INT-574
      - TST-PFM-INT-523
    provenance: test
    source: >-
      services-platform:modules/integrations/tests/unit/services/connection-state-machine.spec.ts#is
      chapter 09 §4.3’s, edge for edge, and the three discards of INTG-M1 (D7)
    category: transition
    binding_evidence:
      - >-
        services-platform:modules/integrations/tests/unit/services/connection-state-machine.spec.ts#is
        chapter 09 §4.3’s, edge for edge, and the three discards of INTG-M1 (D7)
      - >-
        services-platform:modules/integrations/tests/unit/services/connection-state-machine.spec.ts#never
        leaves disconnected
      - >-
        services-platform:modules/integrations/tests/integration/services/connections/transition.integration.spec.js#writes
        a security audit row of the connection, before and after
      - >-
        services-platform:modules/integrations/tests/integration/services/connections/transition.integration.spec.js#tells
        the binding hook the states before and after
    binding_scope: >-
      contributions: the cited tests support their own asserted outcomes. Additional setup, branches
      and combined sequences remain proposed unless the cited assertions exercise them.
  - id: ATS-PFM-INT-004-05
    title: Credential correction recovers failed verification
    level: browser
    proves:
      - BR-CAP-PFM-INT-004-05
      - AS-JNY-PFM-INT-001-02
    preconditions: The test integration is installed and accepts a known good key.
    steps: 'Connect with a refused key, then replace it with the good key.'
    expected: >-
      The refusal displays its reason and failed state; correction reaches Active with the green
      indicator and verified features.
    negative: false
    data_needs: 'Fixtures establishing the stated accounts, declarations and history in an isolated workspace.'
    bound_to: []
    provenance: proposed
    source: FND-PFM-INT-034
    category: failure
    binding_evidence: []
  - id: ATS-PFM-INT-004-06
    title: Connection pause and resume remain accountable
    level: browser
    proves:
      - BR-CAP-PFM-INT-004-06
    preconditions: A connection is active.
    steps: 'Suspend with a reason, repeat suspension, resume and inspect history.'
    expected: >-
      The connection pauses then returns active, history identifies who and why, and repeated suspension
      is refused.
    negative: false
    data_needs: 'Fixtures establishing the stated accounts, declarations and history in an isolated workspace.'
    bound_to:
      - TST-PFM-INT-550
      - TST-PFM-INT-404
    provenance: test
    source: >-
      services-platform:modules/integrations/tests/integration/services/installations/history-and-security-trail.integration.spec.js#refuses
      a suspension of a connection that is not active, recording it in neither trail
    category: transition
    binding_evidence:
      - >-
        services-platform:modules/integrations/tests/integration/services/installations/history-and-security-trail.integration.spec.js#refuses
        a suspension of a connection that is not active, recording it in neither trail
      - >-
        services-platform:modules/integrations/tests/integration/services/installations/history-and-security-trail.integration.spec.js#writes
        who suspended it and why to the history
      - >-
        react-console:acceptance/integrations/playwright/journeys/library/INT-ACC-0063.spec.ts#INT-ACC-0063
    binding_scope: >-
      contributions: the cited tests support their own asserted outcomes. Additional setup, branches
      and combined sequences remain proposed unless the cited assertions exercise them.
  - id: ATS-PFM-INT-004-07
    title: Dependent work prevents removal
    level: browser
    proves:
      - BR-CAP-PFM-INT-004-07
      - AS-JNY-PFM-INT-002-01
    preconditions: A degraded connection is selected by a business-unit binding.
    steps: 'Attempt disconnect, remove the binding, disconnect again and submit the obsolete override property.'
    expected: >-
      The first refusal identifies the dependency, removal then succeeds and the obsolete override is
      rejected as invalid.
    negative: true
    data_needs: 'Fixtures establishing the stated accounts, declarations and history in an isolated workspace.'
    bound_to:
      - TST-PFM-INT-487
      - TST-PFM-INT-513
      - TST-PFM-INT-368
    provenance: test
    source: >-
      services-platform:modules/integrations/tests/e2e/disconnect-and-uninstall.e2e.spec.js#answers a
      disconnection of a bound connection 409, code connection_has_bindings, naming each binding
    category: interaction
    binding_evidence:
      - >-
        services-platform:modules/integrations/tests/e2e/disconnect-and-uninstall.e2e.spec.js#answers a
        disconnection of a bound connection 409, code connection_has_bindings, naming each binding
      - >-
        services-platform:modules/integrations/tests/e2e/disconnect-and-uninstall.e2e.spec.js#disconnects
        a degraded connection once its binding is gone, answering discarded false
      - >-
        services-platform:modules/integrations/tests/e2e/disconnect-and-uninstall.e2e.spec.js#refuses the
        removed invalidate_bindings field (400) and leaves the connection and its binding as they were
      - >-
        services-platform:modules/integrations/tests/integration/services/bindings/invalidation.integration.spec.js#is
        refused while an invalid binding still points at the connection, leaving the binding as it was
      - >-
        react-console:acceptance/integrations/playwright/journeys/library/INT-ACC-0027.spec.ts#INT-ACC-0027
    binding_scope: >-
      contributions: the cited tests support their own asserted outcomes. Additional setup, branches
      and combined sequences remain proposed unless the cited assertions exercise them.
  - id: ATS-PFM-INT-004-08
    title: Abandoned authentication has a removal path
    level: browser
    proves:
      - BR-CAP-PFM-INT-004-08
    preconditions: An initial account connection never verified its credential.
    steps: Discard it and then uninstall its provider.
    expected: Discard ends the connection as disconnected in both trails and the installation can be removed.
    negative: false
    data_needs: 'Fixtures establishing the stated accounts, declarations and history in an isolated workspace.'
    bound_to:
      - TST-PFM-INT-522
      - TST-PFM-INT-354
    provenance: test
    source: >-
      services-platform:modules/integrations/tests/integration/services/connections/disconnect-discard-uninstall.integration.spec.js#ends
      a pending_auth connection disconnected, by the caller, with a reason saying it was discarded before
      it was ever connected
    category: edge
    binding_evidence:
      - >-
        services-platform:modules/integrations/tests/integration/services/connections/disconnect-discard-uninstall.integration.spec.js#ends
        a pending_auth connection disconnected, by the caller, with a reason saying it was discarded
        before it was ever connected
      - >-
        services-platform:modules/integrations/tests/integration/services/connections/disconnect-discard-uninstall.integration.spec.js#writes
        connection.discarded to the integration history, with the state it was discarded from
      - >-
        services-platform:modules/integrations/tests/integration/services/connections/disconnect-discard-uninstall.integration.spec.js#no
        longer blocks uninstalling its integration
      - >-
        services-platform:modules/integrations/tests/integration/services/connections/disconnect-discard-uninstall.integration.spec.js#refuses
        a connection that was connected before, whatever it is now, leaving it as it was
      - >-
        react-console:acceptance/integrations/playwright/journeys/library/INT-ACC-0013.spec.ts#INT-ACC-0013
    binding_scope: >-
      contributions: the cited tests support their own asserted outcomes. Additional setup, branches
      and combined sequences remain proposed unless the cited assertions exercise them.
  - id: ATS-PFM-INT-004-09
    title: Disconnect cleans up connection resources
    level: api
    proves:
      - BR-CAP-PFM-INT-004-09
    preconditions: 'An active connection owns endpoints, credentials and a notice.'
    steps: Disconnect it and inspect those records.
    expected: >-
      Endpoints are disabled, credentials revoked for deletion after one week, notices cleared and actor
      and reason retained.
    negative: false
    data_needs: 'Fixtures establishing the stated accounts, declarations and history in an isolated workspace.'
    bound_to:
      - TST-PFM-INT-523
      - TST-PFM-INT-538
    provenance: test
    source: >-
      services-platform:modules/integrations/tests/integration/services/connections/transition.integration.spec.js#disables
      the connection’s webhook endpoints
    category: transition
    binding_evidence:
      - >-
        services-platform:modules/integrations/tests/integration/services/connections/transition.integration.spec.js#disables
        the connection’s webhook endpoints
      - >-
        services-platform:modules/integrations/tests/integration/services/connections/transition.integration.spec.js#asks
        the credential hook to destroy the credential
      - >-
        services-platform:modules/integrations/tests/integration/services/connections/transition.integration.spec.js#records
        who disconnected it and why
      - >-
        services-platform:modules/integrations/tests/integration/services/executions/connection-notices.integration.spec.js#when
        the connection is disconnected
    binding_scope: >-
      contributions: the cited tests support their own asserted outcomes. Additional setup, branches
      and combined sequences remain proposed unless the cited assertions exercise them.
  - id: ATS-PFM-INT-004-10
    title: Upgrade verifies access and account continuity
    level: browser
    proves:
      - BR-CAP-PFM-INT-004-10
    preconditions: An earlier pinned release is active and a newer release requests additional access.
    steps: 'Request the newer release, accept the new access and request it again.'
    expected: >-
      The first request identifies unaccepted new access; after acceptance, verification succeeds before
      the release pin changes.
    negative: true
    data_needs: 'Fixtures establishing the stated accounts, declarations and history in an isolated workspace.'
    bound_to:
      - TST-PFM-INT-520
      - TST-PFM-INT-521
      - TST-PFM-INT-452
    provenance: test
    source: >-
      services-platform:modules/integrations/tests/integration/services/connections/connection-jobs.integration.spec.js#refuses
      a version that asks for access the installation has not accepted, naming it, and starts no job
    category: interaction
    binding_evidence:
      - >-
        services-platform:modules/integrations/tests/integration/services/connections/connection-jobs.integration.spec.js#refuses
        a version that asks for access the installation has not accepted, naming it, and starts no job
      - >-
        services-platform:modules/integrations/tests/integration/services/connections/connection-jobs.integration.spec.js#moves
        the pin to a version that asks for more access once the administrator has accepted it
      - >-
        services-platform:modules/integrations/tests/integration/services/connections/connection-version-update.integration.spec.js#INT-ACC-0115
        (e): a version whose account differs keeps the pin and the connected account, outcome pin_kept,
        and says why
      - >-
        services-platform:modules/integrations/tests/integration/services/connections/connection-version-update.integration.spec.js#INT-ACC-0115
        (c, d): a suspended connection is refused 409 naming suspended, starts no job and keeps the pin
      - >-
        react-console:acceptance/integrations/playwright/journeys/security/INT-ACC-0535.spec.ts#INT-ACC-0535
    binding_scope: >-
      contributions: the cited tests support their own asserted outcomes. Additional setup, branches
      and combined sequences remain proposed unless the cited assertions exercise them.
  - id: ATS-PFM-INT-004-11
    level: api
    negative: true
    data_needs: Run-owned records and principals in an isolated workspace.
    bound_to: []
    provenance: proposed
    title: Exercise the complete connection lifecycle
    category: transition
    proves:
      - BR-CAP-PFM-INT-004-04
    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.
    source: >-
      rhythm-v2-docs:specs/platform/integrations/design/state-models/STATE-PFM-INT-003-connection-lifecycle.md#transitions
    state_model: STATE-PFM-INT-003
    transition_cases:
      - from: pending_auth
        to: verifying
        trigger: Authentication becomes available
        guard: 'Entered credentials, sign-in tokens or platform-account setup supply authentication'
        side_effects:
          - Request verification and commit audit and binding reassessment.
        provenance: proposed
        source: >-
          services-platform:modules/integrations/services/connections/transition.ts:CONNECTION_TRANSITIONS
      - from: verifying
        to: active
        trigger: Complete first verification successfully
        guard: The provider confirms an account that can be recorded without duplication
        side_effects:
          - 'Save identity, features and environment and provision declared endpoints.'
        provenance: proposed
        source: >-
          services-platform:modules/integrations/tests/integration/services/connections/connection-jobs.integration.spec.js#becomes
          active with the account and every declared feature verified
      - from: verifying
        to: failed_verification
        trigger: Complete verification unsuccessfully
        guard: Provider refusal or duplicate account identity prevents activation
        side_effects:
          - Save the check’s refusal reason.
        provenance: proposed
        source: >-
          services-platform:modules/integrations/tests/integration/db/integration-connections.table.integration.spec.js#refuses
          the same provider account connected twice under the installation
      - from: failed_verification
        to: verifying
        trigger: Request verification after failure
        guard: A person requests another check or supplies replacement authentication
        side_effects:
          - Submit verification work.
        provenance: proposed
        source: >-
          services-platform:modules/integrations/services/connections/transition.ts:CONNECTION_TRANSITIONS
      - from: active
        to: degraded
        trigger: Record an unhealthy result
        guard: An eligible health or scheduled verification check fails
        side_effects:
          - Keep bindings eligible while exposing a warning.
        provenance: proposed
        source: >-
          services-platform:modules/integrations/tests/integration/services/connections/connection-jobs.integration.spec.js#degrades
          an active connection whose provider is unhealthy
      - from: degraded
        to: active
        trigger: Record a healthy result
        guard: An eligible health or scheduled verification check succeeds
        side_effects:
          - Clear the degraded status.
        provenance: proposed
        source: >-
          services-platform:modules/integrations/tests/integration/services/connections/connection-jobs.integration.spec.js#degrades
          an active connection whose provider is unhealthy
      - from: active
        to: reauth_required
        trigger: Record credential refusal
        guard: Refresh or verification determines that authentication was rejected
        side_effects:
          - Invalidate dependent bindings and request mail after commit.
        provenance: proposed
        source: >-
          services-platform:modules/integrations/tests/integration/services/credentials/refresh.integration.spec.js#makes
          one token request when two refreshes of a connection run at once
      - from: degraded
        to: reauth_required
        trigger: Record credential refusal on a degraded account
        guard: The provider rejects the account’s authentication
        side_effects:
          - Invalidate dependent bindings and request mail after commit.
        provenance: proposed
        source: >-
          services-platform:modules/integrations/services/connections/transition.ts:CONNECTION_TRANSITIONS
      - from: reauth_required
        to: verifying
        trigger: Receive fresh authorization
        guard: A replacement credential or completed sign-in is supplied
        side_effects:
          - Submit verification work before allowing calls.
        provenance: proposed
        source: >-
          services-platform:modules/integrations/services/connections/transition.ts:CONNECTION_TRANSITIONS
      - from: active
        to: suspended
        trigger: Pause a usable account
        guard: An administrator or installation pause requests suspension
        side_effects:
          - 'Invalidate bindings and save suspension actor, reason and cause.'
        provenance: proposed
        source: >-
          services-platform:modules/integrations/tests/integration/services/installations/history-and-security-trail.integration.spec.js#refuses
          a suspension of a connection that is not active, recording it in neither trail
      - from: degraded
        to: suspended
        trigger: Pause a degraded account
        guard: The same suspension rules apply to degraded accounts
        side_effects:
          - Invalidate its current bindings.
        provenance: proposed
        source: >-
          services-platform:modules/integrations/services/connections/transition.ts:CONNECTION_TRANSITIONS
      - from: suspended
        to: active
        trigger: Restore a paused account
        guard: The account remains suspended
        side_effects:
          - Restore eligible bindings
          - Later checks can still degrade it.
        provenance: proposed
        source: >-
          services-platform:modules/integrations/tests/integration/services/installations/history-and-security-trail.integration.spec.js#refuses
          a suspension of a connection that is not active, recording it in neither trail
      - from: active
        to: disconnected
        trigger: Close a healthy account
        guard: No current binding references the account
        side_effects:
          - 'Disable endpoints, revoke credentials, clear notices and record attribution.'
        provenance: proposed
        source: >-
          services-platform:modules/integrations/tests/integration/services/connections/transition.integration.spec.js#disables
          the connection’s webhook endpoints
      - from: degraded
        to: disconnected
        trigger: Close a degraded account
        guard: No current binding references the account
        side_effects:
          - Apply the ordinary disconnection cleanup.
        provenance: proposed
        source: 'services-platform:modules/integrations/services/connections/transition.ts:disconnectConnection'
      - from: suspended
        to: disconnected
        trigger: Close a paused account
        guard: No current binding references the account
        side_effects:
          - Apply the ordinary disconnection cleanup.
        provenance: proposed
        source: >-
          services-platform:modules/integrations/services/connections/transition.ts:CONNECTION_TRANSITIONS
      - from: reauth_required
        to: disconnected
        trigger: Close an account requiring authorization
        guard: No current binding references the account
        side_effects:
          - Apply the ordinary disconnection cleanup.
        provenance: proposed
        source: >-
          services-platform:modules/integrations/services/connections/transition.ts:CONNECTION_TRANSITIONS
      - from: failed_verification
        to: disconnected
        trigger: Close after failed re-verification
        guard: Prior successful verification exists and no current binding references the account
        side_effects:
          - Apply the ordinary disconnection cleanup.
        provenance: proposed
        source: >-
          services-platform:modules/integrations/services/connections/transition.ts:CONNECTION_TRANSITIONS
      - from: pending_auth
        to: disconnected
        trigger: Abandon initial authentication
        guard: The account has no successful verification in history
        side_effects:
          - Record a discard reason and disable endpoints and credentials.
        provenance: proposed
        source: >-
          services-platform:modules/integrations/tests/integration/services/connections/disconnect-discard-uninstall.integration.spec.js#ends
          a pending_auth connection disconnected, by the caller, with a reason saying it was discarded
          before it was ever connected
      - from: verifying
        to: disconnected
        trigger: Abandon first verification
        guard: The account has never passed verification
        side_effects:
          - Apply unfinished-link discard cleanup.
        provenance: proposed
        source: >-
          services-platform:modules/integrations/tests/integration/services/connections/disconnect-discard-uninstall.integration.spec.js#ends
          a pending_auth connection disconnected, by the caller, with a reason saying it was discarded
          before it was ever connected
      - from: failed_verification
        to: disconnected
        trigger: Abandon unsuccessful initial verification
        guard: No prior successful verification exists
        side_effects:
          - Apply unfinished-link discard cleanup.
        provenance: proposed
        source: >-
          services-platform:modules/integrations/tests/integration/services/connections/disconnect-discard-uninstall.integration.spec.js#ends
          a pending_auth connection disconnected, by the caller, with a reason saying it was discarded
          before it was ever connected
    proof_boundary: >-
      The parameterized cases prove the listed lifecycle outcomes. Separate assertions are needed for
      independent object invariants, numeric limits and simultaneous requests.
  - id: ATS-PFM-INT-004-12
    level: api
    negative: false
    data_needs: Run-owned records and principals in an isolated workspace.
    bound_to: []
    provenance: proposed
    title: Provider checks change operational standing
    category: interaction
    proves:
      - BR-CAP-PFM-INT-004-05
      - BR-CAP-PFM-INT-006-03
    exercises:
      - CAP-PFM-INT-004
      - CAP-PFM-INT-006
    preconditions: A verified active account can return failing and passing health results.
    steps: Run a failed check followed by a recovered check and inspect the account and health view.
    expected: The visible status follows degradation and recovery with retained check outcomes.
    source:
      - >-
        services-platform:modules/integrations/tests/integration/services/connections/connection-jobs.integration.spec.js#becomes
        active with the account and every declared feature verified
      - >-
        services-platform:modules/integrations/tests/integration/services/connections/connection-jobs.integration.spec.js#degrades
        an active connection whose provider is unhealthy
    workflows:
      - WF-PFM-INT-006
  - id: ATS-PFM-INT-004-13
    level: api
    negative: false
    data_needs: Run-owned records and principals in an isolated workspace.
    bound_to: []
    provenance: proposed
    title: Moving selections makes account retirement possible
    category: interaction
    proves:
      - BR-CAP-PFM-INT-004-07
      - BR-CAP-PFM-INT-007-08
    exercises:
      - CAP-PFM-INT-004
      - CAP-PFM-INT-007
    preconditions: An old account has two bindings and a replacement lacks one required feature.
    steps: >-
      Move selections, inspect per-binding results, remove the remaining dependency and disconnect the
      old account.
    expected: >-
      The eligible binding moves, the failed move retains its source, and closure succeeds only after
      every dependency is removed.
    source:
      - >-
        services-platform:modules/integrations/tests/e2e/disconnect-and-uninstall.e2e.spec.js#answers a
        disconnection of a bound connection 409, code connection_has_bindings, naming each binding
      - >-
        services-platform:modules/integrations/tests/integration/services/bindings/binding-move.integration.spec.js#replaces
        every active binding of the source with one choosing the target, at the same scope, policy and
        note
    workflows:
      - WF-PFM-INT-007
  - id: ATS-PFM-INT-004-14
    level: api
    negative: false
    data_needs: Run-owned records and principals in an isolated workspace.
    bound_to: []
    provenance: proposed
    title: Corrected credentials recover account setup
    category: interaction
    proves:
      - BR-CAP-PFM-INT-004-05
      - BR-CAP-PFM-INT-005-05
    exercises:
      - CAP-PFM-INT-004
      - CAP-PFM-INT-005
    preconditions: An entered-key account fails its first verification.
    steps: 'Replace the key, run verification and read safe credential facts and connection detail.'
    expected: >-
      Successful verification reaches active with provider features; safe facts identify the replacement
      without its value.
    source:
      - >-
        services-platform:modules/integrations/tests/integration/services/connections/connection-jobs.integration.spec.js#becomes
        active with the account and every declared feature verified
      - >-
        services-platform:modules/integrations/services/credentials/credential-store.ts:verification_retried
    workflows:
      - WF-PFM-INT-003
  - id: ATS-PFM-INT-004-15
    level: api
    negative: false
    data_needs: Run-owned records and principals in an isolated workspace.
    bound_to: []
    provenance: proposed
    title: Verification provisions notification endpoints
    category: interaction
    proves:
      - BR-CAP-PFM-INT-004-05
      - BR-CAP-PFM-INT-013-06
    exercises:
      - CAP-PFM-INT-004
      - CAP-PFM-INT-013
    preconditions: A release declares a manually registered notification endpoint.
    steps: 'Complete account verification, read setup once and inspect the ordinary endpoint read.'
    expected: >-
      The account activates, setup exposes its provisioned address and secret once, and later inspection
      omits the secret.
    source:
      - >-
        services-platform:modules/integrations/tests/integration/services/connections/connection-jobs.integration.spec.js#becomes
        active with the account and every declared feature verified
      - >-
        services-platform:modules/integrations/tests/e2e-adapters/events-dummy.adapters.spec.js#never
        answers the secret again
    workflows:
      - WF-PFM-INT-003
evidence:
  - >-
    Each binding identifies an existing source test at the pinned revision; unbound scenarios remain
    proposed proof obligations.
coverage:
  rule: 'gap: FND-PFM-INT-058'
  transition: covered
  validation: covered
  permission: 'gap: FND-PFM-INT-058'
  edge: covered
  failure: covered
  boundary: 'gap: FND-PFM-INT-058'
  concurrency: 'gap: FND-PFM-INT-058'
  invariant: covered
  interaction: covered
coverage_notes:
  covered: A designed scenario exists; executable coverage and a passing run require separate evidence.
  gaps: >-
    The finding records categories without a designed scenario and remaining permission and rule audit
    obligations.
---
# Maintain a verified provider account connection: Capability Test Specification

## Coverage

| Rule | Proved By |
|---|---|
| `BR-CAP-PFM-INT-004-01` | `ATS-PFM-INT-004-01` |
| `BR-CAP-PFM-INT-004-02` | `ATS-PFM-INT-004-02` |
| `BR-CAP-PFM-INT-004-03` | `ATS-PFM-INT-004-03` |
| `BR-CAP-PFM-INT-004-04` | `ATS-PFM-INT-004-04`, `ATS-PFM-INT-004-11` |
| `BR-CAP-PFM-INT-004-05` | `ATS-PFM-INT-004-05`, `ATS-PFM-INT-004-12`, `ATS-PFM-INT-004-14`, `ATS-PFM-INT-004-15` |
| `BR-CAP-PFM-INT-004-06` | `ATS-PFM-INT-004-06` |
| `BR-CAP-PFM-INT-004-07` | `ATS-PFM-INT-004-07`, `ATS-PFM-INT-004-13` |
| `BR-CAP-PFM-INT-004-08` | `ATS-PFM-INT-004-08` |
| `BR-CAP-PFM-INT-004-09` | `ATS-PFM-INT-004-09` |
| `BR-CAP-PFM-INT-004-10` | `ATS-PFM-INT-004-10` |
| `BR-CAP-PFM-INT-004-11` | `FND-PFM-INT-058` |
| `BR-CAP-PFM-INT-004-12` | `FND-PFM-INT-058` |

## Interactions With Related Capabilities

Connection changes affect credential use, binding eligibility, account attention and administrator notices. The interaction cases inspect these effects together so that recovery does not leave the account usable in one surface and unavailable in another.

The structured scenarios name the capabilities and rules involved. A bound test contributes only the outcomes it asserts; proposed transition matrices and composed interactions still require executable proof.
