Skip to content

ATS-PFM-NOT-007Route and send notification deliveries: Capability Test Specification

Markdown

ATS-PFM-NOT-007

Route and send notification deliveries: Capability Test Specification

Markdown
  • DocumentProposed

KindAcceptance test setProduct areaPlatformModuleStaff Notifications and Association CommunicationsRevision2

Read atservices-platform ad3f6a65react-console baf6dae3

Coverage

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

Test Scenarios

10 scenarios proving CAP-PFM-NOT-007; 9 bound to an existing test.

01 Deliver personal notices in the consoleruleapitest
Proves
BR-CAP-PFM-NOT-007-01
Preconditions
Prepare a definition supporting the console and e-mail.
Steps
Submit a notice addressed to Jane.
Expected
Console delivery records success; supported e-mail is skipped pending its release.
Data
Use only records created and owned by this suite.
Bound to
services-platform:modules/notifications/tests/integration/services/orchestration/orchestrate-request.integration.spec.js#writes the console delivery delivered at once and records every other supported channel as not available until its milestone
services-platform:modules/notifications/tests/unit/channel-resolution.spec.js#chooses the console for everyone, by the definition
Source
services-platform:modules/notifications/tests/integration/services/orchestration/orchestrate-request.integration.spec.js#writes the console delivery delivered at once and records every other supported channel as not available until its milestone
02 Explain unavailable and unsupported routesedgeunittest
Proves
BR-CAP-PFM-NOT-007-02
Preconditions
Prepare a definition supporting every channel; another supporting the console alone.
Steps
Evaluate the recipient's available delivery routes.
Expected
Future channels identify their milestone, while channels outside the definition report unsupported selection.
Data
Use only records created and owned by this suite.
Bound to
services-platform:modules/notifications/tests/unit/channel-resolution.spec.js#records a supported channel with no adapter yet as not available until its milestone
services-platform:modules/notifications/tests/unit/channel-resolution.spec.js#names the milestone of each channel that is not available
services-platform:modules/notifications/tests/unit/channel-resolution.spec.js#records a channel the definition does not support as unsupported, without a milestone
Source
services-platform:modules/notifications/tests/unit/channel-resolution.spec.js#records a supported channel with no adapter yet as not available until its milestone
03 Queue only eligible delivery-work channelsruleapitest
Proves
BR-CAP-PFM-NOT-007-04
Preconditions
Prepare queued deliveries for Slack, Teams and text.
Steps
Dispatch channel work and separately attempt to insert e-mail into the delivery-work mechanism.
Expected
Slack and Teams use chat work, text uses text work, and e-mail is rejected by this queue mechanism.
Data
Use only records created and owned by this suite.
Bound to
services-platform:modules/notifications/tests/unit/channel-resolution.spec.js#delivers chat and SMS as queued work, and the console and e-mail not
services-platform:modules/notifications/tests/integration/services/dispatch/dispatch-notifications.integration.spec.js#publishes Slack and Teams deliveries to the chat queue and SMS to its own, deleting the rows
services-platform:modules/notifications/tests/integration/services/persistence/delivery-works.integration.spec.js#refuses a channel that is queued as no work: e-mail and the console are delivered otherwise
Source
services-platform:modules/notifications/tests/unit/channel-resolution.spec.js#delivers chat and SMS as queued work, and the console and e-mail not
04 Skip final work on redeliveryinvariantapitest
Proves
BR-CAP-PFM-NOT-007-05
Preconditions
Prepare a queued delivery and two consumers.
Steps
Run competing consumers, then replay the queue item after delivery reaches a final state.
Expected
The first item sends once; redelivery performs no additional send.
Data
Use only records created and owned by this suite.
Bound to
services-platform:modules/notifications/tests/integration/services/dispatch/deliver-delivery.integration.spec.js#does nothing for an item whose delivery is already final, however often it is redelivered
Source
services-platform:modules/notifications/tests/integration/services/persistence/deliveries.integration.spec.js#lets only one of two consumers racing for the send win it
05 Apply transient backoff and permanent failurefailureapinegativetest
Proves
BR-CAP-PFM-NOT-007-06
Preconditions
Prepare a delivery whose adapter fails.
Steps
Exercise temporary failure, exhaustion on the final receive, permanent provider refusal and a thrown adapter error.
Expected
Transient and thrown errors retry with backoff, exhaustion dead-letters the item, and permanent refusal fails with its code immediately.
Data
Use only records created and owned by this suite.
Bound to
services-platform:modules/notifications/tests/integration/services/dispatch/deliver-delivery.integration.spec.js#puts a delivery back in the queue after a retryable failure and gives the item back after the backoff
services-platform:modules/notifications/tests/integration/services/dispatch/deliver-delivery.integration.spec.js#waits longer after each receive, and sends the retry once the provider recovers
services-platform:modules/notifications/tests/integration/services/dispatch/deliver-delivery.integration.spec.js#fails the delivery attempts_exhausted on the last receive and gives the item back at once to reach the dead-letter queue
services-platform:modules/notifications/tests/integration/services/dispatch/deliver-delivery.integration.spec.js#fails a permanent refusal at once with the adapter’s code and acknowledges the item
services-platform:modules/notifications/tests/integration/services/dispatch/deliver-delivery.integration.spec.js#treats an adapter that throws as a retryable failure rather than losing the delivery
services-platform:modules/notifications/tests/unit/queue-items.spec.js#waits 30 seconds after the first receive, doubling to a 30-minute cap
Source
services-platform:modules/notifications/tests/integration/services/dispatch/deliver-delivery.integration.spec.js#puts a delivery back in the queue after a retryable failure and gives the item back after the backoff
06 Calculate notice progress from deliveriestransitionunittest
Proves
BR-CAP-PFM-NOT-007-07
Preconditions
Create notice fixtures covering every supported combination of delivery states.
Steps
Calculate aggregate progress for each fixture and repeat calculation for a superseded notice.
Expected
Each combination produces its declared aggregate status, while superseded items remain superseded.
Data
Use only records created and owned by this suite.
Bound to
services-platform:modules/notifications/tests/unit/instance-status.spec.js#is partially delivered when one delivered and another failed, none still active
services-platform:modules/notifications/tests/unit/instance-status.spec.js#is delivered when the chosen deliveries delivered, the skipped one taking no part
services-platform:modules/notifications/tests/unit/instance-status.spec.js#is failed when every chosen delivery failed or bounced
services-platform:modules/notifications/tests/unit/instance-status.spec.js#is no channel when every delivery was cancelled or expired
Source
services-platform:modules/notifications/tests/unit/instance-status.spec.js#is routed while every outside delivery is queued
07 Reject invalid delivery lifecycle writesvalidationapinegativetest
Proves
BR-CAP-PFM-NOT-007-08 INV-DOM-PFM-NOT-003-07
Preconditions
Prepare delivery fixtures spanning the declared lifecycle states.
Steps
Try prohibited transitions, a skip without its reason and a nine-kilobyte rendered payload.
Expected
All invalid transitions or record shapes fail without mutation.
Data
Use only records created and owned by this suite.
Bound to
Source
services-platform:modules/notifications/tests/integration/services/persistence/deliveries.integration.spec.js#refuses a transition the lifecycle does not allow, changing nothing
08 Select only reachable adapter destinationsedgeunittest
Proves
BR-CAP-PFM-NOT-007-03
Preconditions
Prepare a supported channel with a recording adapter.
Steps
Resolve once with a reachable recipient and a second time with an unreachable one.
Expected
Reachable channels are selected; unreachable channels retain the adapter's reason.
Data
A supported channel with a recording adapter.
Bound to
services-platform:modules/notifications/tests/unit/channel-resolution.spec.js#chooses a supported channel that has an adapter and a reachable person
services-platform:modules/notifications/tests/unit/channel-resolution.spec.js#skips a channel whose adapter says the person cannot be reached, with the adapter’s reason
services-platform:modules/notifications/tests/unit/channel-resolution.spec.js#words a skipped channel with the adapter’s own sentence when it has one
Source
services-platform:modules/notifications/tests/unit/channel-resolution.spec.js#chooses a supported channel that has an adapter and a reachable person
09 Deduplicate and bound provider event historyboundaryapitest
Proves
BR-CAP-PFM-NOT-007-09
Preconditions
Prepare a stored delivery and distinct provider event references.
Steps
Record a provider event twice and next more than fifty distinct events.
Expected
Replay adds no duplicate event, and only the latest fifty events remain.
Data
A stored delivery and distinct provider event references.
Bound to
services-platform:modules/notifications/tests/integration/services/persistence/deliveries.integration.spec.js#keeps the newest fifty events of a delivery and drops the oldest, never refusing the report
services-platform:modules/notifications/tests/integration/services/persistence/deliveries.integration.spec.js#writes a replayed event once: the same provider and provider event id answers nothing
Source
services-platform:modules/notifications/tests/integration/services/persistence/deliveries.integration.spec.js#keeps the newest fifty events of a delivery and drops the oldest, never refusing the report
10 Channel failure and operator retry preserve routing explanationsinteractionapiproposed
Proves
BR-CAP-PFM-NOT-007-05
Preconditions
Prepare personal and operational occurrences plus stored personal channel preferences; use an adapter that exhausts its retry budget.
Steps
Process both occurrences, exhaust operational delivery, retry it from HQ, and read notice progress and channel explanations.
Expected
Stored preferences do not activate personal Slack. The exhausted operational delivery returns to queued work through the operator action, and its subsequent outcome agrees with its notice progress.
Data
A suite-owned workspace, named staff accounts and unique occurrence keys; external adapters record attempts without shared writes.
Source
rhythm-v2-docs:specs/platform/notifications/planning/capabilities/CAP-PFM-NOT-007-deliver-each-notice-on-the-channels-it-may-use.md#frontmatter,rhythm-v2-docs:specs/platform/notifications/planning/capabilities/CAP-PFM-NOT-012-support-a-customers-notifications-from-rhythm-hq.md#frontmatter,rhythm-v2-docs:specs/platform/notifications/planning/capabilities/CAP-PFM-NOT-013-alert-rhythms-own-staff-in-slack.md#frontmatter,rhythm-v2-docs:specs/platform/notifications/planning/capabilities/CAP-PFM-NOT-015-let-the-organization-and-its-people-choose-how-they-hear.md#frontmatter,rhythm-v2-docs:specs/platform/notifications/planning/capabilities/CAP-PFM-NOT-008-keep-notifications-whole-when-part-of-the-pipeline-fails.md#frontmatter

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.