Skip to content
Ylabator

Retention Canaries: Test Deletion Claims

A retention canary plants a unique synthetic value, deletes it and searches for it later. It turns a vendor's deletion claim into a dated, limited measurement.

Topics
Privacy Foundations
Level
Founder / builder
Read
5 min
Published
2026-11-12
Reviewed
2026-11-12
Week 8

The problem

June 3, 2026 was the last compliance date for the SEC's amended Regulation S-P. Larger entities had to comply by December 3, 2025, and smaller entities by June 3, 2026 [1]. Covered institutions, which include registered investment advisers and broker-dealers [2], now need written policies for overseeing service providers through due diligence and monitoring. Those providers must notify the institution no later than 72 hours after becoming aware of a breach of a customer information system they maintain, and affected customers must be notified within 30 days [1][2].

Any AI tool that sees customer information is a service provider in that sense: a meeting notetaker on client calls, an assistant that reads the inbox, a drafting tool someone pastes a client email into. The rule asks for monitoring, and many vendor files hold only claims: a security questionnaire, a SOC 2 report, a privacy page. Those records say what the vendor states. They do not show what the system keeps.

Deletion claims are the easiest to state and the hardest to observe. "We delete your data after 30 days" is a sentence. Whether a deleted chat still answers questions next month is a fact you can check, partially, from the outside.

A retention canary is the check. It does not prove what happens inside a provider. It produces a dated observation of what the provider's accessible surfaces still return after the documented window, which is more than most vendor files contain.

How it works

A canary is a distinctive fake value planted in one feature of a system you control or use. The method has five stages, matching the diagram for this article.

  1. Insert. Generate a unique synthetic value for each feature under test: a chat, an uploaded file, an API call, a memory. Pair the identifier with a memorable fake fact, because some memory features index meaning rather than exact strings. Never use real secrets or other people's private data.
  2. Delete. Remove it through the documented deletion interface: the delete button, the deletion API, the retention setting.
  3. Wait. Let the stated retention window pass. Take the window from the provider's own documentation. For example, OpenAI keeps abuse monitoring logs for up to 30 days [3], and Bedrock keeps content for up to 30 days under its aws_review mode [5].
  4. Search. Look for the value on every surface you are authorized to search: in-app search, chat, a fresh session that asks what the assistant knows about the fake fact, a full data export, API listings, caches, reports, your own logs and connected apps.
  5. Record. Log time-stamped hits and misses, with the configuration and model version tested.

A hit after the window closes is a finding. Escalate it and ask the vendor, in writing, to explain which system returned the value and why. A hit in your own logs is also a finding, and a common one. Bedrock invocation logs, once enabled, keep full prompts until the logging configuration is deleted [6].

The limits are part of the method. A canary observes application-visible stores only. Unseen backups and inaccessible provider systems sit outside it by design. Anthropic, for example, may keep a flagged session's inputs and outputs for up to 2 years under any arrangement [4], and no customer-side search can see that store. A clean result is consistent with deletion and with a copy you cannot reach. It also proves nothing about training.

Where a provider exposes a setting you can read back, read it. A Bedrock retention mode returned by the API is stronger evidence for its layer than any canary [5].

Deletion verification workflow

Fig. 08
  1. InsertUnique synthetic value in one feature
  2. DeleteVia the documented deletion API
  3. WaitThe stated retention window
  4. SearchSearch, chat, cache, reports
  5. RecordTime-stamped hits and misses
Not observable by this method

Unseen backups and inaccessible provider systems

A canary is a limited observation of application-visible stores. A clean result does not prove that backups or inaccessible internal systems have been erased.
Technical detail

Define test scope, insertion point, retention window, deletion API and authorized search methods. Never use real secrets or other people’s private data as canaries. Escalate unexpected matches and request a vendor explanation.

By the numbers

deadline for a service provider to notify the covered institution of a breach [1]
72 hours
deadline for notifying affected customers under amended Regulation S-P [2]
30 days
compliance date for smaller entities [1]
June 3, 2026
OpenAI abuse monitoring log retention, absent an approved arrangement [3]
up to 30 days
Anthropic retention of flagged sessions, outside any customer search [4]
up to 2 years
SurfaceHow to searchA hit after the window means
In-app search and chat historySearch the canary stringDeletion did not reach the user-facing store
Assistant memoryAsk a fresh session about the fake factMemory outlived the deleted chat
Data exportRequest a full export, grep itThe export pipeline holds a copy
API object listingsList files, stored responses, batchesStateful features were not deleted
Your own logsQuery log groups for the string or its hashYour stack undid the provider's retention terms
Vendor supportSend the string, ask in writingOnly the vendor can see this layer
Surfaces to search after the retention window, and what a hit means, based on provider documentation read in November 2026 [3][4][5][6]

The regulatory numbers set the cadence. A firm with a 30-day customer notice duty needs to know, before an incident, which vendors hold which copies. Discovering a forgotten copy during a breach investigation is late.

The provider windows set the wait. Pick the longest documented window among the features you tested, add a margin, and schedule the search. Flagged-content and legal-hold stores sit behind the surfaces regardless of the wait.

Implementation

Define the test scope in writing before planting anything: features, insertion point, retention window, deletion interface and the search methods you are authorized to use. Then generate and record canaries with a small ledger.

plant_canaries.pypython
"""Create one canary per feature and record it in an append-only ledger."""
import json
import secrets
from datetime import datetime, timedelta, timezone
from pathlib import Path

LEDGER = Path("canary_ledger.jsonl")

# Feature -> documented retention window in days, copied from the vendor's docs.
SCOPE = {
    "chat": 30,
    "file_upload": 30,
    "api_call": 30,
    "memory": 30,
}


def make_canary(feature: str) -> dict:
    token = f"Halyard-{secrets.token_hex(4)}"  # unique, easy to grep, meaningless
    planted = datetime.now(timezone.utc)
    return {
        "feature": feature,
        "token": token,
        # A fake fact, so semantic memory has something to recall.
        "fact": f"Project {token}: board approved the sale of the Lisbon property for 41.7 million.",
        "planted_at": planted.isoformat(),
        "search_after": (planted + timedelta(days=SCOPE[feature] + 7)).isoformat(),
        "deleted_at": None,  # filled in when deletion is confirmed
    }


if __name__ == "__main__":
    with LEDGER.open("a", encoding="utf-8") as fh:
        for feature in SCOPE:
            canary = make_canary(feature)
            fh.write(json.dumps(canary) + "\n")
            print(f"{feature}: plant this text -> {canary['fact']}")

The figures in the fake fact are invented and belong to no real transaction. Plant each one by hand or through the vendor's API, delete it with the vendor's own controls, and fill in deleted_at in the ledger with the time the deletion completed. Use a separate test account or workspace where the vendor allows it.

Test it

After search_after passes, search every surface you can reach. The script below covers two of them: a directory of data exports and your own CloudWatch log groups.

search_canaries.pypython
"""Search exports and log groups for canaries whose wait has passed."""
import json
from datetime import datetime, timezone
from pathlib import Path

import boto3

LEDGER = Path("canary_ledger.jsonl")
EXPORTS = Path("exports")  # unzipped vendor data exports
LOG_GROUPS = ["/app/llm-gateway", "/app/bedrock-invocations"]  # your own log group names
logs = boto3.client("logs")


def due() -> list[dict]:
    now = datetime.now(timezone.utc)
    rows = [json.loads(line) for line in LEDGER.read_text().splitlines()]
    return [r for r in rows if r["deleted_at"] and datetime.fromisoformat(r["search_after"]) <= now]


def search(canary: dict) -> list[str]:
    hits = [str(p) for p in EXPORTS.rglob("*") if p.is_file()
            and canary["token"] in p.read_text(errors="ignore")]
    start = int(datetime.fromisoformat(canary["planted_at"]).timestamp() * 1000)
    for group in LOG_GROUPS:
        resp = logs.filter_log_events(logGroupName=group, startTime=start,
                                      filterPattern=f'"{canary["token"]}"')
        hits += [f"{group}:{e['logStreamName']}" for e in resp.get("events", [])]
    return hits


if __name__ == "__main__":
    for canary in due():
        found = search(canary)
        status = "HIT" if found else "miss"
        print(datetime.now(timezone.utc).isoformat(), canary["feature"], canary["token"], status, found)

For long time ranges, filter_log_events returns results in pages, so a production version follows nextToken until it is absent. Expected result: miss for every canary on every surface. Record the output as evidence, with the date and configuration.

Complete the checklist by hand:

  • Ask a fresh assistant session what it knows about the fake project. Expected: nothing.
  • List files, stored responses and batches through the vendor API. Expected: no object containing the token.
  • Send the token to vendor support and ask whether any record contains it. File the written answer.
  • Read back every retention setting the provider exposes, and file the response with the canary results.
  • On any hit, open a ticket with severity, owner and retest date, and escalate to the vendor.

Decision

Treat deletion terms as testable requirements, and respect the limits of the evidence.

  • Run a canary test before connecting any AI tool to customer information, and again after every model or plan change. Newer models have arrived with stricter retention requirements than the ones they replaced.
  • Put canary results and readable settings in the vendor file next to the questionnaire. For regulated firms, that file is part of the monitoring record.
  • State the limits in the file: backups and flagged-content stores are not observable this way.
  • Cost: about an afternoon to plant and a short session to search, per vendor, per change.

Sources

  1. [1]Regulation S-P: Small Entity Compliance Guide (opens in a new tab)U.S. Securities and Exchange Commission, 2024
  2. [2]Fact Sheet: Enhancements to Regulation S-P (opens in a new tab)U.S. Securities and Exchange Commission, May 2024
  3. [3]Data controls in the OpenAI platform (opens in a new tab)OpenAI, November 2026
  4. [4]API and data retention (opens in a new tab)Anthropic, November 2026
  5. [5]Data retention, Amazon Bedrock User Guide (opens in a new tab)Amazon Web Services, November 2026
  6. [6]Monitor model invocation using CloudWatch Logs and Amazon S3 (opens in a new tab)Amazon Web Services, November 2026

Technical guidance, not security certification or legal advice.

All Private AI articles