---
id: TST-PFM-NOT-034
title: marketing lane
kind: integration
product_area: platform
module: notifications
revision: 1
status: draft
source_sha:
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
repository: services-platform
files:
  - >-
    modules/communications/tests/integration/services/dispatch/marketing-lane.integration.spec.js
implements:
  - ATS-PFM-NOT-018-08
  - ATS-PFM-NOT-018-09
  - ATS-PFM-NOT-018-10
  - ATS-PFM-NOT-018-11
  - ATS-PFM-NOT-018-12
environment: local
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 5
isolation: >-
  Suite-owned records in the prepared integration workspaces; seeded workspace
  identities remain shared fixtures.
assertion_bindings:
  - scenario: ATS-PFM-NOT-018-08
    suite: TST-PFM-NOT-034
    assertions:
      - >-
        services-platform:modules/communications/tests/integration/services/dispatch/marketing-lane.integration.spec.js#publishes
        a marketing request to the marketing queue
      - >-
        services-platform:modules/communications/tests/integration/services/dispatch/marketing-lane.integration.spec.js#publishes
        each request to one queue only
      - >-
        services-platform:modules/communications/tests/integration/services/dispatch/marketing-lane.integration.spec.js#leaves
        the marketing row for the next run, never publishing it to the other
        lane
  - scenario: ATS-PFM-NOT-018-09
    suite: TST-PFM-NOT-034
    assertions:
      - >-
        services-platform:modules/communications/tests/integration/services/dispatch/marketing-lane.integration.spec.js#lets
        transactional mail borrow the marketing lane’s unused tokens once its
        own are gone
  - scenario: ATS-PFM-NOT-018-10
    suite: TST-PFM-NOT-034
    assertions:
      - >-
        services-platform:modules/communications/tests/integration/services/dispatch/marketing-lane.integration.spec.js#sends
        the messages its tokens cover
      - >-
        services-platform:modules/communications/tests/integration/services/dispatch/marketing-lane.integration.spec.js#requeues
        the item rather than giving it back to the queue to spend a receive
      - >-
        services-platform:modules/communications/tests/integration/services/dispatch/marketing-lane.integration.spec.js#sends
        what was held and finishes
      - >-
        services-platform:modules/communications/tests/integration/services/dispatch/marketing-lane.integration.spec.js#sleeps
        for the refill instead of giving the item back
      - >-
        services-platform:modules/communications/tests/integration/services/dispatch/marketing-lane.integration.spec.js#acknowledges
        the original instead of reporting it a failure, even on its last receive
  - scenario: ATS-PFM-NOT-018-11
    suite: TST-PFM-NOT-034
    assertions:
      - >-
        services-platform:modules/communications/tests/integration/services/dispatch/marketing-lane.integration.spec.js#disables
        the marketing consumer’s queue mapping when it pauses and enables it
        when it resumes
      - >-
        services-platform:modules/communications/tests/integration/services/dispatch/marketing-lane.integration.spec.js#goes
        on sending transactional mail while marketing is paused
  - scenario: ATS-PFM-NOT-018-12
    suite: TST-PFM-NOT-034
    assertions:
      - >-
        services-platform:modules/communications/tests/integration/services/dispatch/marketing-lane.integration.spec.js#refuses
        a marketing request without a subscription type, with the library’s
        message
      - >-
        services-platform:modules/communications/tests/integration/services/dispatch/marketing-lane.integration.spec.js#refuses
        a marketing request without unsubscribe targets, with the library’s
        message
      - >-
        services-platform:modules/communications/tests/integration/services/dispatch/marketing-lane.integration.spec.js#refuses
        a transactional request that carries a subscription type, with the
        library’s message
      - >-
        services-platform:modules/communications/tests/integration/services/dispatch/marketing-lane.integration.spec.js#adds
        List-Unsubscribe-Post for the https target
      - >-
        services-platform:modules/communications/tests/integration/services/dispatch/marketing-lane.integration.spec.js#goes
        out with no unsubscribe header, its headers exactly as they were
evidence:
  - >-
    services-platform:modules/communications/tests/integration/services/dispatch/marketing-lane.integration.spec.js
  - The file and referenced assertion titles exist at the pinned commit.
dependency_evidence:
  - >-
    Real: PostgreSQL (row-level security on), submission, the dispatcher,
    acceptance, the send function, the consumer, the lane
  - >-
    budget table and the quota guard. Doubled: SES at the transport (recorded),
    the object store (in memory), both queues
  - 'sleep. Never doubled: the database, the services or the buckets'' arithmetic.'
---

# marketing lane

## Verification Boundary

This suite exercises the local services and prepared PostgreSQL database. API lifecycle cases use signed test contexts through the real route handler; they do not invoke the deployed gateway.

## What This Suite Proves

Its cases exercise separate transactional and Marketing work; reserve lane capacity with one-way borrowing; delay rate-limited work without spending retries; pause only Marketing near account quota; validate and attach unsubscribe metadata.

The registered scenario bindings identify the assertions this executable file contributes. They retain individual test references so that a composite scenario does not become a claim of complete execution by one file.

## What It Does Not Prove

Local outcomes do not prove deployed queues, external provider acceptance, production credentials or complete browser behavior. No fresh execution or conformance result is claimed.

## Real Dependencies and Test Doubles

The communication fixtures use real PostgreSQL and module logic. Shared support records queue and transport calls and stores objects in memory; sender provisioning substitutes a provider identity store. Signed API contexts replace the authorizer key in API suites.

## Must Not Be Doubled

Database constraints, workspace policy, state guards and the service operation under test must remain real. Recording a provider or queue call must not replace the submission, claim or outcome logic being checked.
