---
id: TST-PFM-NOT-104
title: audience planner
kind: unit
product_area: platform
module: notifications
revision: 1
status: draft
source_sha:
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
repository: services-platform
files:
  - modules/notifications/tests/unit/audience-planner.spec.js
implements:
  - ATS-PFM-NOT-003-01
  - ATS-PFM-NOT-003-05
  - ATS-PFM-NOT-003-06
  - ATS-PFM-NOT-010-02
  - ATS-PFM-NOT-010-03
  - ATS-PFM-NOT-013-02
environment: mock
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 1
isolation: Per-process test inputs and installed doubles.
assertion_bindings:
  - scenario: ATS-PFM-NOT-003-01
    suite: TST-PFM-NOT-104
    assertions:
      - >-
        services-platform:modules/notifications/tests/unit/audience-planner.spec.js#refuses
        a kind the definition does not accept, naming the kinds it does
      - >-
        services-platform:modules/notifications/tests/unit/audience-planner.spec.js#refuses
        an empty audience
      - >-
        services-platform:modules/notifications/tests/unit/audience-planner.spec.js#refuses
        a kind this release does not know
      - >-
        services-platform:modules/notifications/tests/unit/audience-planner.spec.js#refuses
        a resource scope with no id, naming the reference
      - >-
        services-platform:modules/notifications/tests/unit/audience-planner.spec.js#reports
        every refused entry at its own index
  - scenario: ATS-PFM-NOT-003-05
    suite: TST-PFM-NOT-104
    assertions:
      - >-
        services-platform:modules/notifications/tests/unit/audience-planner.spec.js#is
        the union of what the lookups found, once each, in order of user id
      - >-
        services-platform:modules/notifications/tests/unit/audience-planner.spec.js#leaves
        out the excluded
      - >-
        services-platform:modules/notifications/tests/unit/audience-planner.spec.js#leaves
        out the actor, who is not told of their own act
      - >-
        services-platform:modules/notifications/tests/unit/audience-planner.spec.js#keeps
        the actor when the producer asks for it
  - scenario: ATS-PFM-NOT-003-06
    suite: TST-PFM-NOT-104
    assertions:
      - >-
        services-platform:modules/notifications/tests/unit/audience-planner.spec.js#accepts
        exactly 200 people
      - >-
        services-platform:modules/notifications/tests/unit/audience-planner.spec.js#refuses
        201 people as a whole, selecting nobody
      - >-
        services-platform:modules/notifications/tests/unit/audience-planner.spec.js#does
        not count the excluded and the actor towards the 200
  - scenario: ATS-PFM-NOT-010-02
    suite: TST-PFM-NOT-104
    assertions:
      - >-
        services-platform:modules/notifications/tests/unit/audience-planner.spec.js#says
        a person named directly was named directly
      - >-
        services-platform:modules/notifications/tests/unit/audience-planner.spec.js#says
        a holder holds the responsibility, by its label
      - >-
        services-platform:modules/notifications/tests/unit/audience-planner.spec.js#says
        a delegate covers the responsibility for the person they cover
      - >-
        services-platform:modules/notifications/tests/unit/audience-planner.spec.js#says
        a delegate whose delegator is unknown covers the responsibility
      - >-
        services-platform:modules/notifications/tests/unit/audience-planner.spec.js#says
        the responsibility fell back to the fallback’s holder
      - >-
        services-platform:modules/notifications/tests/unit/audience-planner.spec.js#says
        a role holder holds the role, by its name
      - >-
        services-platform:modules/notifications/tests/unit/audience-planner.spec.js#says
        a permission holder holds the permission, by its key
  - scenario: ATS-PFM-NOT-010-03
    suite: TST-PFM-NOT-104
    assertions:
      - >-
        services-platform:modules/notifications/tests/unit/audience-planner.spec.js#uses
        the producer’s own words for the rule when the entry carries a reason
      - >-
        services-platform:modules/notifications/tests/unit/audience-planner.spec.js#falls
        back to the kind’s words when the reason is blank
  - scenario: ATS-PFM-NOT-013-02
    suite: TST-PFM-NOT-104
    assertions:
      - >-
        services-platform:modules/notifications/tests/unit/audience-planner.spec.js#refuses
        a system audience outside the Rhythm system scope even when the
        definition declares it
evidence:
  - 'services-platform:modules/notifications/tests/unit/audience-planner.spec.js'
  - The file and referenced assertion titles exist at the pinned commit.
dependency_evidence:
  - >-
    Real: the pure planner. Doubled: nothing. Never doubled: the planner or the
    selection.
---

# audience planner

## Verification Boundary

This suite checks isolated calculations, validation or presentation with process-local inputs. It does not establish a deployed workflow.

## What This Suite Proves

Its cases exercise validate each audience selection; union recipients with exclusions and actor control; enforce the whole-request recipient limit; render readable audience reasons; prefer the producer's supplied explanation; reject customer attempts to select HQ audiences.

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 test file identifies its pure inputs or presentation doubles. Console component suites use recorded request handlers; pure validation suites require no external provider.

## Must Not Be Doubled

The calculation, validator or component under test must execute its real implementation. Doubles supply inputs and external responses without replacing the behavior being proved.
