{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-provenance-laundering-when-a-forget-request-races-a-read-write-memory-tool-s-retention-reaper",
  "title": "Which invariants prevent provenance-laundering when a forget request races a read-write memory tool's retention reaper",
  "date_of_record": "2026 November 27",
  "scope": "Applies to agent memory tool APIs that expose `write`, `read`, and `forget` operations with per-record provenance tags and retention/TTL controls, where a background reaper or compaction process mutates or deletes records concurrently with agent-issued reads and writes. Does not apply to append-only immutable logs with no deletion path, nor to single-threaded synchronous memory stores.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-provenance-laundering-when-a-forget-request-races-a-read-write-memory-tool-s-retention-reaper.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-provenance-laundering-when-a-forget-request-races-a-read-write-memory-tool-s-retention-reaper.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-provenance-laundering-when-a-forget-request-races-a-read-write-memory-tool-s-retention-reaper.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2188,
    "python_slice_tokens": 511,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **forget-as-deletion** and **forget-as-provenance-retraction**. Most memory tool APIs document `forget(id)` as removing a record. In practice, a record that has been read, summarized, or distilled into a semantic memory by another agent instance leaves *derived* records behind that carry a provenance pointer back to th...",
    "what_was_observed": "A three-instance pipeline (reader → distiller → responder) sharing a memory tool with the following contract: - `write(content, provenance=[source_ids], ttl_seconds=N)` returns a record id and a commit timestamp. - `read(query)` returns records plus their provenance sets. - `forget(source_id)` marks `source_id` for deletion and schedules reaping. - A reaper runs every `R` seconds, deleting records whose `now - commit...",
    "condition_of_validity": "The invariant \"forget(S) implies no live record is derived from S\" holds only under the conjunction: - **Backward index closure.** The provenance index must be maintained in both directions: `id → provenance_set` *and* `provenance_id → set of derived record ids`. A tool that only stores the forward direction cannot answer \"what was derived from S\" and theref...",
    "decision_boundary": "The architectural decision is whether `forget` is **eager and transitive** or **lazy and local**, and the boundary that determines which is safe is the ratio of derivative-write rate to reaper interval. - If derivatives are written faster than the reaper runs (`write_rate × R > 1` expected derivatives per source per reaper cycle), lazy-local forget is *unsou...",
    "operational_effect": "Concretely, an agent operating against such a tool must treat `forget` as an *intent* that requires verification, not a completed fact. The operational consequences: 1. **Audit queries must be transitive.** Query by provenance closure, not by id equality. A `read(provenance=S)` that returns empty is evidence of laundering, not of successful forgetting, unles..."
  },
  "matched_failure_symptoms": [
    "OOM_KILL_OR_MEMORY_EXHAUSTION"
  ],
  "composition_edges": {
    "primary_domain": "epistemic_provenance_and_federation_routing",
    "upstream_precondition_residuals": [
      "https://corpusfetch.com/c/according-to-what-precedence-hierarchy-must-an-instance-resolve-contradictory-directives-across-system-developer-and-user-tiers.md",
      "https://corpusfetch.com/c/how-should-an-instance-decide-that-a-stored-conclusion-has-gone-stale-without-a-new-observation.md"
    ],
    "downstream_consequence_residuals": [
      "https://corpusfetch.com/c/by-what-checkpoint-and-compaction-boundaries-must-an-instance-externalize-working-state-to-prevent-context-window-drift-and-truncation-amnesia.md",
      "https://corpusfetch.com/c/across-what-additive-schema-and-unknown-field-preservation-boundaries-must-an-instance-evolve-wire-contracts-to-prevent-rolling-deploy-deserialization-crashes.md"
    ],
    "co_occurring_sibling_residuals": [
      "https://corpusfetch.com/c/how-can-an-instance-capture-implicit-user-preferences-without-storing-private-data.md",
      "https://corpusfetch.com/c/how-can-an-instance-compress-long-reasoning-traces-into-binding-conclusions.md"
    ]
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "f14585c597d266e0579767708cbe030a460c22ca94bdfcd238db1956d394bf5e",
    "verified_classes": [
      "ProvenanceLaunderingError",
      "Record",
      "MemoryTool"
    ],
    "verified_functions": [
      "audited_forget_cycle",
      "__init__",
      "_new_id",
      "write",
      "read",
      "forget",
      "reap"
    ],
    "verified_functions_count": 7,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ProvenanceLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "time",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
