---
id: TST-PFM-NOT-100
title: reconcile workspace
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/reconcile/reconcile-tenant.integration.spec.js
implements:
  - ATS-PFM-NOT-006-07
  - ATS-PFM-NOT-008-04
  - ATS-PFM-NOT-008-05
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-006-07
    suite: TST-PFM-NOT-100
    assertions:
      - >-
        services-platform:modules/notifications/tests/integration/services/reconcile/reconcile-tenant.integration.spec.js#expires
        the unsent delivery of a request past its expiry, the notification with
        it, and settles the request
      - >-
        services-platform:modules/notifications/tests/integration/services/reconcile/reconcile-tenant.integration.spec.js#keeps
        the notification’s status when another channel had already left
      - >-
        services-platform:modules/notifications/tests/integration/services/reconcile/reconcile-tenant.integration.spec.js#settles
        a request past its expiry whose notification was delivered, so a late
        cancel reaches nothing
      - >-
        services-platform:modules/notifications/tests/integration/services/reconcile/reconcile-tenant.integration.spec.js#leaves
        an open request that has not reached its expiry
  - scenario: ATS-PFM-NOT-008-04
    suite: TST-PFM-NOT-100
    assertions:
      - >-
        services-platform:modules/notifications/tests/integration/services/reconcile/reconcile-tenant.integration.spec.js#settles
        a delivery left sending past the ambiguity window failed ambiguous, and
        the instance with it, never resending
      - >-
        services-platform:modules/notifications/tests/integration/services/reconcile/reconcile-tenant.integration.spec.js#leaves
        a delivery that has been sending for less than the window
      - >-
        services-platform:modules/notifications/tests/integration/services/reconcile/reconcile-tenant.integration.spec.js#queues
        a delivery again whose work row was lost after the hour
      - >-
        services-platform:modules/notifications/tests/integration/services/reconcile/reconcile-tenant.integration.spec.js#records
        a queue row nobody processed before its payload’s expiry as an expired
        request and deletes the row
      - >-
        services-platform:modules/notifications/tests/integration/services/reconcile/reconcile-tenant.integration.spec.js#runs
        the same reconcile once per tenant per night through the engine’s state
        machine, run in process
  - scenario: ATS-PFM-NOT-008-05
    suite: TST-PFM-NOT-100
    assertions:
      - >-
        services-platform:modules/notifications/tests/integration/services/reconcile/reconcile-tenant.integration.spec.js#computes
        the cutoff as thirteen calendar months before now
      - >-
        services-platform:modules/notifications/tests/integration/services/reconcile/reconcile-tenant.integration.spec.js#deletes
        requests, deliveries, events, instance keys and challenges past it and
        keeps what is younger
      - >-
        services-platform:modules/notifications/tests/integration/services/reconcile/reconcile-tenant.integration.spec.js#works
        through a backlog in batches, a batch at a time
evidence:
  - >-
    services-platform:modules/notifications/tests/integration/services/reconcile/reconcile-tenant.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 reconcile,
    orchestrator and persistence services, the job engine's local
  - >-
    runner running the real workflow. Doubled: the channel adapter (a recording
    adapter) and the dispatcher nudge. Never doubled:
---

# reconcile workspace

## 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 settle expired requests after pending work ends; recover stale sending and lost delivery work; apply retention and partition boundaries.

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.
