---
id: TST-PFM-NOT-080
title: resolve audience
kind: integration
product_area: platform
module: notifications
revision: 1
status: draft
source_sha:
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
repository: services-platform
files:
  - >-
    modules/notifications/tests/integration/services/orchestration/resolve-audience.integration.spec.js
implements:
  - ATS-PFM-NOT-003-02
  - ATS-PFM-NOT-003-03
  - ATS-PFM-NOT-003-04
  - ATS-PFM-NOT-003-08
  - ATS-PFM-NOT-010-02
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-003-02
    suite: TST-PFM-NOT-080
    assertions:
      - >-
        services-platform:modules/notifications/tests/integration/services/orchestration/resolve-audience.integration.spec.js#changes
        the people when the responsibility is reassigned between the publish and
        the dispatch
  - scenario: ATS-PFM-NOT-003-03
    suite: TST-PFM-NOT-080
    assertions:
      - >-
        services-platform:modules/notifications/tests/integration/services/orchestration/resolve-audience.integration.spec.js#is
        the holders of that unit and not the holder of another unit
      - >-
        services-platform:modules/notifications/tests/integration/services/orchestration/resolve-audience.integration.spec.js#is
        the delegates of that unit’s holders too, worded as covering the
        responsibility
      - >-
        services-platform:modules/notifications/tests/integration/services/orchestration/resolve-audience.integration.spec.js#falls
        back to the fallback’s holders when nobody holds it at that unit, and
        not to the holder of another unit
  - scenario: ATS-PFM-NOT-003-04
    suite: TST-PFM-NOT-080
    assertions:
      - >-
        services-platform:modules/notifications/tests/integration/services/orchestration/resolve-audience.integration.spec.js#is
        the active holders of the built-in role at the tenant
      - >-
        services-platform:modules/notifications/tests/integration/services/orchestration/resolve-audience.integration.spec.js#is
        the people whose active roles grant it, compared as the authorizer does
      - >-
        services-platform:modules/notifications/tests/integration/services/orchestration/resolve-audience.integration.spec.js#is
        nobody for a role that does not exist
      - >-
        services-platform:modules/notifications/tests/integration/services/orchestration/resolve-audience.integration.spec.js#is
        nobody for a permission no role of the organization grants
  - scenario: ATS-PFM-NOT-003-08
    suite: TST-PFM-NOT-080
    assertions:
      - >-
        services-platform:modules/notifications/tests/integration/services/orchestration/resolve-audience.integration.spec.js#is
        nobody when nobody holds it and nothing covers it, settling
        no_recipients
  - scenario: ATS-PFM-NOT-010-02
    suite: TST-PFM-NOT-080
    assertions:
      - >-
        services-platform:modules/notifications/tests/integration/services/orchestration/resolve-audience.integration.spec.js#words
        a delegate’s reason as covering the responsibility for the person who
        delegated, and the holder’s as holding it
evidence:
  - >-
    services-platform:modules/notifications/tests/integration/services/orchestration/resolve-audience.integration.spec.js
  - The file and referenced assertion titles exist at the pinned commit.
dependency_evidence:
  - >-
    Real: PostgreSQL with row-level security on, the real orchestrator,
    `platform.responsibility_holders`,
  - >-
    `platform.role_holders`, the permission rule the authorizer applies, and the
    real persistence services. Doubled: the dispatcher
  - 'nudge. Never doubled: the database or any resolution function.'
---

# resolve audience

## 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 resolve responsibility holders at processing time; resolve scoped holders, delegates and fallback; resolve active role and permission audiences; retain empty-audience outcomes; render readable audience reasons.

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 notification fixtures use real PostgreSQL and module logic. Queue publication, visibility changes, nudges and installed channel adapters are recorded at their seams when the suite needs them. 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.
