---
id: CAP-PFM-NOT-006
title: Remove notices that have become stale
feature: FEAT-PFM-NOT-02
product_area: platform
module: notifications
revision: 1
status: draft
product_intent: proposed
implementation_evidence: observed
supersedes:
  - NT-ACC-0004
  - NT-ACC-0005
  - NT-ACC-0208
  - PLAT-M23-S05
source_sha:
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
intent_sources:
  - 'services-platform:docs/milestones/plans/PLAT-M23-plan.humanized.md#2. Scope'
  - >-
    services-platform:docs/milestones/plans/PLAT-M23-plan.humanized.md#4.
    Assumptions
  - >-
    services-platform:docs/milestones/plans/PLAT-M23-plan.humanized.md#PLAT-M23-S05
purpose: >-
  Producers and Platform stop pending delivery when an event is withdrawn,
  replaced or too old to remain useful.
outcomes:
  - Withdrawal stops applicable pending work and hides stale inbox items.
  - Cancellation records the reason for ending the request.
concepts:
  - CON-PFM-NOT-003
actors:
  - ACT-PFM-030
  - ACT-PFM-031
surfaces:
  - job
  - api
preconditions: []
postconditions: []
permissions: []
rules:
  - id: BR-CAP-PFM-NOT-006-01
    statement: >-
      A cancellation processed before its publication prevents notification and
      records cancellation, whether matched by publication key or replacement
      key and regardless of queue order; it does not cancel a publication
      submitted subsequently.
    kind: lifecycle
    enforced_at:
      - service
    must_prove: true
    provenance: test
    source: >-
      services-platform:modules/notifications/tests/integration/services/orchestration/cancel-and-supersede.integration.spec.js#leaves
      nobody told and records the request cancelled when the cancel names the
      publish’s key
    origin: none
  - id: BR-CAP-PFM-NOT-006-02
    statement: >-
      Cancellation after console delivery keeps the item readable but marks it
      no longer applicable and removes it from unread totals; Reprocessing is
      harmless; settled requests are unchanged.
    kind: lifecycle
    enforced_at:
      - service
    must_prove: true
    provenance: test
    source: >-
      services-platform:modules/notifications/tests/integration/services/orchestration/cancel-and-supersede.integration.spec.js#marks
      the instance superseded, leaves it readable and takes it out of the unread
      count
    origin: none
  - id: BR-CAP-PFM-NOT-006-03
    statement: >-
      Withdrawal cancels pending deliveries and removes their queued work;
      Messages already sent remain sent, although the console notice becomes
      superseded.
    kind: lifecycle
    enforced_at:
      - service
    must_prove: true
    provenance: test
    source: >-
      services-platform:modules/notifications/tests/integration/services/orchestration/cancel-and-supersede.integration.spec.js#cancels
      the queued delivery and its work row, and does not recall one that already
      left
    origin: none
  - id: BR-CAP-PFM-NOT-006-04
    statement: >-
      With occurrence replacement enabled, a valid later publication using the
      same replacement key supersedes the earlier open request and produces a
      new notice; Disabled replacement and rejected later requests leave the
      earlier request intact.
    kind: lifecycle
    enforced_at:
      - service
    must_prove: true
    provenance: test
    source: >-
      services-platform:modules/notifications/tests/integration/services/orchestration/cancel-and-supersede.integration.spec.js#supersedes
      the earlier request of a definition whose scope is the occurrence, and
      tells the person the new one
    origin: none
  - id: BR-CAP-PFM-NOT-006-05
    statement: >-
      Processing rejects expired requests without notification; Expiry uses the
      explicit deadline or the definition's age limit from publication,
      defaulting to seven days.
    kind: lifecycle
    enforced_at:
      - service
    must_prove: true
    provenance: test
    source: >-
      services-platform:modules/notifications/tests/integration/services/orchestration/orchestrate-request.integration.spec.js#expires
      a request older than its definition’s expires_after from the instant the
      producer wrote it
    origin: none
  - id: BR-CAP-PFM-NOT-006-06
    statement: >-
      Future-dated work returns to the queue until its not-before instant;
      processing cannot deliver it early.
    kind: policy
    enforced_at:
      - service
    must_prove: true
    provenance: test
    source: >-
      services-platform:modules/notifications/tests/integration/services/orchestration/orchestrate-request.integration.spec.js#gives
      back a request that is not due yet, writing nothing, never processing it
      early
    origin: none
  - id: BR-CAP-PFM-NOT-006-07
    statement: >-
      An accepted request remains open until expiry and outstanding delivery
      work end; Nightly reconciliation expires unsent deliveries, supersedes a
      notice when nothing else was sent, and settles the request; subsequent
      cancellation has no remaining effect.
    kind: lifecycle
    enforced_at:
      - service
    must_prove: true
    provenance: test
    source: >-
      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
    origin: none
  - id: BR-CAP-PFM-NOT-006-08
    statement: >-
      Before sending queued work, superseded notices cause cancellation and
      expired requests cause expiry.
    kind: lifecycle
    enforced_at:
      - service
    must_prove: true
    provenance: test
    source: >-
      services-platform:modules/notifications/tests/integration/services/dispatch/deliver-delivery.integration.spec.js#cancels,
      not sends, a delivery whose notification was superseded after it was
      queued
    origin: none
scenarios:
  - id: SC-CAP-PFM-NOT-006-01
    given: >-
      Jane's new assignment ends two minutes later, before its announcement is
      processed.
    when: Platform processes the announcement and withdrawal.
    then: >-
      No assignment item appears and its request becomes cancelled; an ending
      announcement remains a separate outcome.
    provenance: test
    source: >-
      react-console:acceptance/notifications/playwright/journeys/inbox/NT-ACC-0005.spec.ts#NT-ACC-0005
  - id: SC-CAP-PFM-NOT-006-02
    given: Jane read an assignment announcement the previous day.
    when: The producer ends that assignment.
    then: >-
      The retained item becomes inapplicable and cannot contribute to unread
      totals.
    provenance: inferred
    source: >-
      react-console:acceptance/notifications/playwright/journeys/inbox/NT-ACC-0004.spec.ts#NT-ACC-0004
    note: >-
      The test establishes delivered-item withdrawal; previously read state is
      retained because withdrawal changes applicability rather than personal
      read state.
edge_cases: []
constraints: []
depends_on:
  - CAP-PFM-NOT-002
related:
  - CAP-PFM-NOT-005
  - CAP-PFM-NOT-008
  - CAP-PFM-NOT-014
journeys:
  - JNY-PFM-NOT-002
open_questions: []
evidence:
  - >-
    Pinned evidence inventory 1:
    services-platform:docs/milestones/plans/PLAT-M23-plan.humanized.md;
    services-platform:modules/notifications/tests/integration/services/orchestration/orchestrate-request.integration.spec.js;
    services-platform:modules/notifications/tests/integration/services/dispatch/deliver-delivery.integration.spec.js;
    react-console:acceptance/notifications/playwright/journeys/inbox/NT-ACC-0004.spec.ts
  - >-
    Pinned evidence inventory 2:
    services-platform:modules/notifications/tests/integration/services/orchestration/cancel-and-supersede.integration.spec.js;
    services-platform:modules/notifications/tests/integration/services/reconcile/reconcile-tenant.integration.spec.js;
    react-console:acceptance/notifications/playwright/journeys/inbox/NT-ACC-0005.spec.ts
controls: [TC-AVL-004, TC-AVL-005, TC-AZ-001, TC-AZ-002, TC-AZ-003, TC-AZ-004, TC-DAT-001, TC-DAT-002, TC-DAT-003, TC-IAM-001, TC-IAM-002, TC-IAM-004, TC-IAM-005, TC-IAM-006, TC-LOG-002, TC-LOG-003, TC-LOG-005, TC-MON-001, TC-PI-001, TC-PI-002, TC-PI-003, TC-PI-004, TC-PI-005, TC-PRV-001, TC-PRV-002, TC-TEN-001, TC-TEN-002, TC-TEN-003, TC-VEN-001, TC-VEN-002, TC-VEN-003]
---

# Remove notices that have become stale

## Purpose

Producers and Platform stop pending delivery when an event is withdrawn, replaced or too old to remain useful.

## How It Works

A producer cancels work that no longer represents a useful event. Processing matches cancellation to the request or replacement identity. An earlier cancellation prevents the corresponding pending publication from reaching recipients. A later cancellation marks delivered console content no longer applicable rather than erasing its history. Pending channel work is stopped, while completed external sends remain recorded. Replacement applies only when the definition permits it and the new request is valid. Future work waits until due, and stale work expires. Reconciliation settles requests after expiry and completion of outstanding work.

The rule rows define this outcome; the acceptance set identifies existing proof and proposed checks. Implementation evidence alone does not approve the observed details.

## Relationships

Committed publication supplies the requests processed by this outcome.
