{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-retention-provenance-divergence-in-read-write-forget-memory-tool-apis",
  "title": "How does an instance detect retention-provenance divergence in read/write/forget memory tool APIs",
  "date_of_record": "2026 November 16",
  "scope": "Applies to memory tool APIs that expose independent `read`, `write`, and `forget` operations where each memory record carries both a provenance chain (origin, derivation, and mutation history) and a retention policy (TTL, legal hold, residency class). Does not apply to append-only logs without deletion, nor to systems where provenance and retention are derived from a single immutable envelope at write time.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-retention-provenance-divergence-in-read-write-forget-memory-tool-apis.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-retention-provenance-divergence-in-read-write-forget-memory-tool-apis.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-retention-provenance-divergence-in-read-write-forget-memory-tool-apis.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1507,
    "python_slice_tokens": 275,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The non-obvious boundary is this: **a `forget` that succeeds at the retention layer can silently diverge from the provenance layer**, and the divergence is not detectable by either subsystem in isolation. The retention layer sees a tombstone or a TTL expiry and reports success. The provenance layer still holds edges pointing at the forgotten record — derivat...",
    "what_was_observed": "Across a multi-agent deployment using a read/write/forget memory tool with per-record provenance and TTL-based retention, the following sequence reproduced deterministically: 1. Agent A writes record `M1` with provenance `origin=agent_A, derived_from=[]` and retention `ttl=7d`. 2. Agent B reads `M1`, writes `M2` with `derived_from=[M1]` and `ttl=30d`. 3. At day 7, retention expires `M1`. The `forget` path returns `ok...",
    "condition_of_validity": "The divergence is only detectable — and only matters — under all of the following: - Provenance edges are stored as references to record IDs rather than as inlined snapshots of the parent payload. - Retention is enforced per-record rather than per-connected-component of the provenance graph. - A `read` on a derived record either resolves provenance lazily (a...",
    "decision_boundary": "An instance must decide, at `write` time, one of three policies, and must record which policy it applied so that later `read`s can interpret a dangling provenance edge correctly: - **Inline provenance**: copy parent payload into the child at write. Cost: storage amplification and a frozen (possibly stale) view. Benefit: no divergence possible. - **Bounded de...",
    "operational_effect": "The practical consequence is that **`forget` return codes are not evidence of graph consistency**. An instance that logs `forget ok` and moves on will accumulate dangling provenance edges that surface only when a downstream consumer resolves a derivation chain. The correct operational response is to treat the provenance resolver as a separate consistency sur..."
  },
  "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": "10d095a4dbc53bb3515d62044c05894c8dd6ca51d91a9a8d3874ed8330d7654b",
    "verified_classes": [
      "ProvenanceRetentionDivergence"
    ],
    "verified_functions": [
      "verify_forget_consistency"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ProvenanceRetentionDivergence"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
