Skip to content

Dispatch data retention and deletion: proposed design

Status: Visitor’s initial retention targets are agreed; implementation and operational details remain proposals. No automatic deletion, legal conclusion or production dispatch is established here. This document complements storage, idempotency and integrity enforcement.

  • Retain incident dispatch content, recipients, destinations and related snapshot data for 90 days after the dispatch is completed, to support incident follow-up and troubleshooting.
  • Retain the dispatch creation idempotency protection for 180 days after creation. If the dispatch has been deleted while protection remains, a retry must not create another dispatch and should return a generic result unavailable response, subject to current authorization.
  • These targets do not govern Visitor check-in or checkout history. Its retention remains a separate decision.

Core must support a policy supplied by the product rather than hard-code these Visitor periods. These are initial product decisions, not a determination that the periods satisfy every customer’s legal or operational requirements. No gallinger is active. Define completion, unknown provider outcomes, authorized deletion, client retry behavior, backups and the full worker lifecycle before activating automatic deletion. In particular, do not treat an outstanding or uncertain provider outcome as completed merely because time has passed.

The two clocks can overlap differently: if a dispatch takes more than 90 days to complete, its 180-day creation-key target can fall before the 90-day post-completion snapshot target. The precise rule for retaining key protection in that case remains open and must prevent unsafe automatic retries; do not silently assume one period always ends after the other. Retention after key expiry also requires an explicit retry horizon and client behavior.

Proposal, not yet decided or implemented: treat the agreed 180 days from creation as a minimum, not a requirement to delete the key on day 180. Retain the key while its dispatch exists and while any send or recovery operation may still be pending. After the dispatch is deleted, atomically retain a minimal tombstone at least until the 180-day point. If that point has already passed, the minimum tombstone period after deletion remains an open product decision; do not infer that zero days is safe. An unknown provider outcome must not be automatically treated as completion or permission to delete the key.

For example, if a dispatch completes on day 20 and is deleted on day 110, the tombstone remains at least until day 180. If it completes on day 150, the 90-day snapshot target places deletion on day 240; the key remains while the dispatch exists, and the post-deletion tombstone rule still needs a decision. If the dispatch never reaches a safely defined completion state, do not expire its key simply because the 180-day minimum elapsed. This may require operational review; it does not mean data may be retained indefinitely without a policy.

After a tombstone is deleted, a server looking up an arbitrary key cannot distinguish an old retry from a new key by absence alone. Therefore the proposed minimum retention rule does not on its own prevent duplicates after expiry. The product must retain the original key across reloads, avoid automatic resend after a defined retry horizon, and show a recoverable uncertain state instead. For a stronger server-side guarantee, design and verify a server-issued key or other trustworthy expiry mechanism; caller-supplied timestamps alone are not proof of key age. The choice, retry horizon, clock rules and user recovery workflow remain open. No automatic expiry is authorized until these are agreed.

Deletion, transition to tombstone, and concurrent replay must be coordinated atomically. While the dispatch exists, same-key/same-command returns its original authorized result and a different command conflicts; after tombstoning, all uses of that key return the same authorized unavailable result. The transition must not leave a gap that allows a second dispatch. This protects creation, not exactly-once provider delivery.

Proposal for review, not implemented or an additional agreed retention period. For Visitor, keep the minimal tombstone until the later of (a) 180 days after dispatch creation and (b) 30 days after dispatch deletion. The 30 days provide an operational recovery window after deletion even for a long incident. This is a product choice to review, not a claim that 30 days are legally required. While a dispatch or relevant in-flight recovery exists, do not remove its protection just because either date has passed.

As an example, a dispatch created on day 0 and deleted on day 110 keeps its tombstone at least until day 180. If it is deleted on day 240, the tombstone remains at least until day 270. The transition from dispatch to tombstone and the calculation must be atomic, using trusted server/database time. Concurrent replay and expiry must not create an unprotected gap.

For stronger protection after a tombstone is gone, a candidate protocol uses an opaque, server-issued signed operation token containing a random operation ID, tenant and operation scope, issuance time, expiration time and signing-key version. The token must contain no message, destination or other personal payload; a signature prevents alteration but does not encrypt its contents. Issuance and use require normal authentication and authorization. A token is not permission to create or read a dispatch. The product persists the same token for reloads and retries; a new intentional dispatch gets a new token.

Within an authorized, tenant-scoped transaction, verify authenticity and scope and look up the operation ID before deciding an expired token’s outcome:

  1. If a dispatch exists, authorize access and compare the versioned command; return the original result for the same command or conflict for a different one, even if the token’s first-use window has expired.
  2. If a tombstone exists, return the generic authorized unavailable result for any command and never create a new dispatch.
  3. If no record exists, accept creation only if the authentic token is still in its first-use window. Expired, malformed, wrong-scope or unverifiable tokens fail closed; an absent old key is never silently treated as a fresh one.

Token verification must continue to recognize relevant key versions through their required lifetime; if verification is unavailable or signing keys have been rotated or lost, fail closed, never reinterpret an unverifiable token as a fresh operation. Define key rotation, compromise handling, clock skew and the exact first-use window before implementation. Define the transaction’s serialization point and recheck rules for a request racing expiry or cleanup; uniqueness and atomic transitions are still needed. If commit is unknown, recover with the original token and command rather than minting a new token.

If the token has expired and no record remains, the system cannot prove whether the old dispatch was ever committed. Show an uncertain/unavailable outcome; do not automatically issue a new token and resend. An explicitly authorized new attempt is a separate intentional operation, with duplicate-delivery risk made clear to the operator. Server-issued token issuance does not itself reserve a dispatch or make provider delivery exactly-once.

Before adoption, decide the first-use duration, post-deletion tombstone window, replay authorization, signing key lifecycle and user recovery behavior; test cleanup/replay/creation races, delayed and lost responses, tampered or expired tokens, tenant mismatch, key rotation and rollback. This protocol complements, but does not replace, worker/provider uncertainty and retention design.

Data Proposed purpose and boundary
Dispatch content and selected source metadata Describe the intended message and selection; may contain personal or sensitive free text. Freeze the minimum needed, not an unrestricted copy of an external source.
Recipient, selection reasons and assessed destinations Explain who was selected, why, and which values were assessed. Retain the minimum needed for traceability and delivery. Contact values, stable identifiers and source links are sensitive.
Logical deliveries and contributions Record intended destinations and their contributing assessments. They are not evidence of provider acceptance or delivery.
Handoff, operational state and attempts Track work and provider outcomes. Minimize duplicated content and destinations; provider IDs and error details can themselves be sensitive. Lifecycle and worker semantics need separate design.
Creation key and fingerprint Prevent duplicate creation and resolve retries. They are operational data, not anonymous merely because they contain an opaque identifier or a digest.

A frozen dispatch must remain understandable without reading live mutable source records while it is retained. The exact display fields and source references must be justified per product. Do not copy entire AD groups, booking records, request payloads, provider responses or additional contact fields by default. The channel-assessed value must remain available until the product’s authorized delivery and recovery lifecycle allows it to be removed; exact timing is open.

Changes to a source recipient, link or destination after commit do not silently rewrite the historical snapshot. Source deletion, a request to delete dispatch data, and scheduled retention are distinct operations. Their required legal and product behavior is not decided by this document. Do not make a foreign-key CASCADE, SET NULL, or indefinite RESTRICT the accidental retention policy.

A separately authorized, audited retention/redaction operation should explicitly handle frozen facts and dependent delivery/contribution copies, operational records, logs and other stores. Restrict its capability separately from ordinary creation and worker roles. A proposal must describe whether references are removed, facts are deleted as a unit or a partial graph can be represented, and how integrity checks, audit and user-facing history behave afterwards. Avoid leaving dangling references or presenting redacted history as a complete record. Tenant isolation applies to maintenance paths too.

A retry must never silently become a new dispatch because its original result was deleted. Proposed behavior: while its idempotency protection is retained, a minimal tenant/operation/key tombstone rejects reuse with a generic result such as result_unavailable; it neither returns deleted content nor starts a new send. Returning this status still requires appropriate current authorization and must not expose another tenant’s existence. Exact authorization and response contract are open. An intentional new dispatch requires a new key.

The tombstone could omit the command fingerprint entirely if all attempts using the retired key return the same unavailable result; this avoids retaining content-derived fingerprint data solely to distinguish same and changed commands. Until transition to a tombstone, the versioned fingerprint supports the existing replay/conflict contract. The exact transaction and concurrency protocol must ensure that deletion, tombstone creation and concurrent retry cannot expose a gap permitting duplicate creation. Do not implement this with a non-atomic delete followed by a later tombstone insert. A tombstone may itself remain personal or linkable data; its protection and retention need a decision.

The Visitor target above is 180 days from creation; retention after that target and its interaction with a still-retained dispatch require a concrete rule. An infinite tombstone lifetime cannot be assumed, and expiry inevitably means the system cannot recognize an arbitrarily old key unless another durable mechanism exists. Before setting any expiry, specify the retry horizon, what clients do after it, and how to prevent unsafe automatic resends when historical key state is gone. Never claim permanent idempotency from a finite-lived key record.

Deleting or redacting delivery data must coordinate with pending handoffs, worker leases and in-flight provider requests. Blocking new work, cancellation, unknown provider outcomes, externally held copies and audit must each have an explicit policy. Deletion or cancellation cannot truthfully promise that an already submitted message was recalled. The operational protocol is not yet specified and should not be inferred from this storage proposal.

  • Define completion and periods for other data/products, access rules, deletion triggers, legal/product requirements, external-provider and backup treatment, and audit. Implement the agreed Visitor targets only after these are resolved.
  • Define the redaction/deletion capability, transaction and treatment of shared destinations and multiple contributions; validate RLS and least privilege.
  • Define client retry horizon, tombstone response/authorization, fingerprints, retention and atomic handling of concurrent retries and uncertain commits.
  • Define behavior for pending, leased and in-flight work and ensure workers cannot regain deleted data through caches, snapshots, logs or retries.
  • Test source deletion without historical rewriting, authorized deletion of all intended copies, unauthorized/cross-tenant attempts, idempotency races, rollback, interrupted deletion and truthful history/status responses.