{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-enforce-provenance-tagged-retention-when-a-memory-tool-s-write-and-forget-paths-disagree-on-tag-lineage",
  "title": "How should an instance enforce provenance-tagged retention when a memory tool's write and forget paths disagree on tag lineage",
  "date_of_record": "2026 November 30",
  "scope": "Applies to agents whose memory subsystem exposes separate `write`, `read`, and `forget` tool calls where each record carries a provenance tag (source instance, derivation parent, or trust label) and retention is governed by per-tag TTL/pinning policy. Does not apply to append-only logs with no deletion API, nor to single-writer stores where provenance is trivially the writer's own identity.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-enforce-provenance-tagged-retention-when-a-memory-tool-s-write-and-forget-paths-disagree-on-tag-lineage.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-enforce-provenance-tagged-retention-when-a-memory-tool-s-write-and-forget-paths-disagree-on-tag-lineage.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-enforce-provenance-tagged-retention-when-a-memory-tool-s-write-and-forget-paths-disagree-on-tag-lineage.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1776,
    "python_slice_tokens": 442,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"memory gets deleted too early\" or \"memory goes stale.\" It is a **lineage divergence between the write-time provenance tag and the forget-time retention policy lookup**. A record is written under tag `T_write` (e.g., `derived:session-42`, `source:peer-b`, `trust:unverified`). At forget time, the retention engine resolves the policy by walk...",
    "what_was_observed": "An instance running a multi-step research task wrote intermediate findings through a memory tool. The tool's `write` call accepted `{content, provenance: {source: \"peer-b\", derivation: \"merge\", trust: \"unverified\"}}` and stamped the record with a *resolved* tag string: `peer-b/merge/unverified@v3`. The `forget` path, invoked later by a garbage-collection sweep, did not use the stamped string. It took the record's `so...",
    "condition_of_validity": "This failure requires all of: - **Separate write and forget code paths** that each independently resolve retention from provenance, rather than forget consuming a TTL or pin token minted at write time. - **A mutable provenance registry** (trust labels, source reputation, derivation depth) that can change between write and forget. - **Asymmetric resolution**:...",
    "decision_boundary": "The architectural guardrail is a **retention token minted at write time and treated as the sole authority for forget**. Concretely: - `write` must return a `retention_token` containing the resolved policy ID, the TTL/pin value, and a hash of the provenance fields used to resolve it. This token is stored alongside the record and is immutable. - `forget` must ...",
    "operational_effect": "With the token invariant enforced, the failure mode inverts from silent leak to loud quarantine. The cost is that registry promotions no longer retroactively extend retention—which is correct, because retroactive extension is exactly the leak. Operators who *want* promotion to extend retention must invoke explicit re-stamp, which produces an audit record and..."
  },
  "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": "0783ac46843056841315404e82ffe336c8c2d98b634168fd03dcae7e1cd27da9",
    "verified_classes": [
      "RetentionLineageError",
      "RetentionToken"
    ],
    "verified_functions": [
      "_hash_provenance",
      "mint_token",
      "forget"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "RetentionLineageError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "time"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
