---
id: FAS-PFM-INT-04
title: Integration messages and subscriptions acceptance
feature: FEAT-PFM-INT-04
product_area: platform
module: integrations
revision: 2
status: proposed
product_intent: proposed
source_sha:
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
  macroservice-libraries: 54536a441935c6e09fdb7f96f0bec71c52ba4e03
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
capabilities:
  - CAP-PFM-INT-013
  - CAP-PFM-INT-014
  - CAP-PFM-INT-015
scenarios:
  - id: FAS-PFM-INT-04-01
    title: Messages retain traceable delivery identities
    kind: behaviour
    exercises:
      - CAP-PFM-INT-013
      - CAP-PFM-INT-014
      - CAP-PFM-INT-015
    relies_on:
      - ATS-PFM-INT-013-03
      - ATS-PFM-INT-014-02
      - ATS-PFM-INT-015-02
    preconditions: 'An endpoint, a matching event consumer and an accepted change subscription are available.'
    steps: >-
      Process a valid provider notification and route its event; separately raise a subscribed business
      change.
    expected: >-
      The notification, routed event and projected subscription delivery each retain their own traceable
      identity.
    negative: false
    data_needs: 'Run-owned declarations, records and role fixtures in an isolated workspace.'
    bound_to: []
    provenance: proposed
    source:
      - >-
        services-platform:modules/integrations/tests/integration/services/webhooks/webhook-worker.integration.spec.js#rejects
        a request whose signature does not verify, writing no event
      - >-
        services-platform:modules/integrations/tests/integration/services/subscriptions/subscriptions.integration.spec.js#turns
        a CRM change event into a queued delivery of the catalog projection, never the row
      - >-
        services-platform:modules/integrations/tests/integration/services/events/event-router.integration.spec.js#records
        an event every consumer handled or ignored as delivered, to each of them
  - id: FAS-PFM-INT-04-02
    title: Signature refusal prevents downstream event delivery
    kind: interaction
    exercises:
      - CAP-PFM-INT-013
      - CAP-PFM-INT-015
    relies_on:
      - ATS-PFM-INT-013-03
      - ATS-PFM-INT-015-02
    preconditions: A matching consumer is registered for a provider event.
    steps: Process valid and tampered notifications and dispatch only the emitted events.
    expected: The valid event reaches the consumer and the tampered notification creates no downstream event.
    negative: false
    data_needs: 'Run-owned declarations, records and role fixtures in an isolated workspace.'
    bound_to: []
    provenance: proposed
    source:
      - >-
        services-platform:modules/integrations/tests/integration/services/webhooks/webhook-worker.integration.spec.js#rejects
        a request whose signature does not verify, writing no event
      - >-
        services-platform:modules/integrations/tests/integration/services/events/event-router.integration.spec.js#records
        an event every consumer handled or ignored as delivered, to each of them
  - id: FAS-PFM-INT-04-03
    title: Failures retain bounded recovery records
    kind: lifecycle
    exercises:
      - CAP-PFM-INT-014
      - CAP-PFM-INT-015
    relies_on:
      - ATS-PFM-INT-014-04
      - ATS-PFM-INT-014-05
      - ATS-PFM-INT-015-02
    preconditions: A subscription and event consumer repeatedly fail.
    steps: >-
      Exhaust their delivery and routing attempts, inspect dead records and explicitly resume a
      failure-paused subscription.
    expected: Failed work remains visible after finite retries and resume restores subscription eligibility.
    negative: false
    data_needs: 'Run-owned declarations, records and role fixtures in an isolated workspace.'
    bound_to: []
    provenance: proposed
    source:
      - >-
        services-platform:modules/integrations/tests/integration/services/subscriptions/subscriptions.integration.spec.js#retries
        a classified failure with the async backoff and records the delivery dead after six attempts
      - >-
        services-platform:modules/integrations/tests/integration/services/subscriptions/subscriptions.integration.spec.js#pauses
        a subscription after fifty dead deliveries in a row and tells its administrators once
      - >-
        services-platform:modules/integrations/tests/integration/services/events/event-router.integration.spec.js#records
        an event every consumer handled or ignored as delivered, to each of them
  - id: FAS-PFM-INT-04-04
    title: Readers cannot use secrets or staff-wide recovery access
    kind: permission
    exercises:
      - CAP-PFM-INT-013
      - CAP-PFM-INT-014
      - CAP-PFM-INT-015
    relies_on:
      - ATS-PFM-INT-013-08
      - ATS-PFM-INT-014-01
      - ATS-PFM-INT-015-06
    preconditions: A workspace reader and Rhythm operator are available.
    steps: >-
      Inspect messages and subscriptions as the reader and request cross-workspace event inspection as
      each identity.
    expected: Reader answers omit secrets and staff-wide inspection remains restricted to the operator.
    negative: true
    data_needs: 'Run-owned declarations, records and role fixtures in an isolated workspace.'
    bound_to: []
    provenance: proposed
    source:
      - >-
        services-platform:modules/integrations/tests/e2e/reader-access.e2e.spec.js#reads no webhook
        signing secret in any answer
      - >-
        services-platform:modules/integrations/tests/integration/services/subscriptions/subscriptions.integration.spec.js#refuses
        a subscription to a type the installation has not accepted, naming the type, and writes nothing
      - >-
        services-platform:modules/integrations/tests/integration/services/events/event-router.integration.spec.js#lists
        the events nobody took for Rhythm HQ, across tenants
  - id: FAS-PFM-INT-04-05
    title: Duplicate work keeps one delivery identity
    kind: regression
    exercises:
      - CAP-PFM-INT-014
      - CAP-PFM-INT-015
    relies_on:
      - ATS-PFM-INT-014-02
      - ATS-PFM-INT-015-05
    preconditions: A change subscription and a routed event already have claimed work.
    steps: Fan out the same change twice and redeliver its already attempted dispatch.
    expected: Only one projected delivery exists and stale routing work performs no further attempt.
    negative: true
    data_needs: 'Run-owned declarations, records and role fixtures in an isolated workspace.'
    bound_to: []
    provenance: proposed
    source:
      - >-
        services-platform:modules/integrations/tests/integration/services/subscriptions/subscriptions.integration.spec.js#turns
        a CRM change event into a queued delivery of the catalog projection, never the row
      - >-
        services-platform:modules/integrations/tests/integration/services/events/event-router.integration.spec.js#does
        nothing for a message of an attempt already made
evidence:
  - >-
    The feature, its capabilities and the detailed scenarios listed in each reliance are examined at the
    pinned revisions.
---
# Integration messages and subscriptions: Feature Acceptance Suite

## What the Feature Must Do as a Whole

The suite follows incoming provider messages, outgoing customer changes and application event delivery. Acceptance checks the retained identities and visible recovery records across each handoff, rather than treating a successful individual dispatch as proof of the whole chain.

## Interactions Between Capabilities

Notification verification determines which downstream events may be dispatched. Consent and connection changes determine subscription eligibility, while repeated work and bounded retries are checked against the retained delivery and recovery history.

The reliance links identify detailed capability scenarios. None of these composed acceptance sequences has a verified executable binding at the pinned revisions; the corresponding coverage finding remains open.

## Regression Record

| Revision | Change | Scenarios | Reason |
|---|---|---|---|
| 1 | Initial | All | Establish the cumulative acceptance sequences and initial regression cases. |
| 2 | Testing examination continuation | All | Clarify the feature boundary and preserve proposed status for unbound composed sequences. |
