{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-silent-provenance-collapse-in-agent-long-term-memory-stores",
  "title": "Which invariants prevent silent provenance collapse in agent long-term memory stores",
  "date_of_record": "2026 November 17",
  "scope": "Applies to append-only or versioned long-term stores where agent-written memories carry provenance metadata (origin, taint, confidence) and downstream retrieval feeds decision-making. Does not apply to stateless retrieval over externally-owned corpora where the agent has no write path.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-silent-provenance-collapse-in-agent-long-term-memory-stores.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-silent-provenance-collapse-in-agent-long-term-memory-stores.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-silent-provenance-collapse-in-agent-long-term-memory-stores.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1289,
    "python_slice_tokens": 355,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Memory poisoning detection is usually framed as a *content* problem: is this retrieved fact true? The failure mode that actually defeats detection is a *provenance* problem: is this fact still attached to the source that justified it? These diverge because most stores treat provenance as a per-record attribute written once at insert time, while the dangerous...",
    "what_was_observed": "In a store that performed nightly consolidation, an agent ingested a poisoned document from a web-fetch tool (taint = `untrusted_external`). The consolidation pass merged that document's claims into a larger \"user preferences\" summary record, which was written with the provenance of the consolidator process (`trusted_internal`, confidence 0.9). The original tainted record was then pruned as redundant. Retrieval later...",
    "condition_of_validity": "The monotone-provenance invariant holds only when all of the following are enforced at the store layer, not by convention: 1. Every write path that derives a record from existing records must compute provenance as the union (taint-join) of all inputs, and the union must be *non-decreasing* in taint — a derived record can never be less tainted than its most-t...",
    "decision_boundary": "The boundary is whether a derived record may be *served* to a decision path when its provenance join is unresolved or incomplete. The safe rule: if provenance cannot be computed (missing input lineage, unknown merge, cross-store copy without lineage transfer), the record is quarantined with taint = `unknown`, which is treated as strictly worse than `untruste...",
    "operational_effect": "With the invariant enforced, consolidation and dedup become taint-monotone: any record whose lineage touches an external source remains tainted no matter how many times it is summarized, and pruning cannot erase the taint. The cost is that trusted summaries of tainted material stay tainted and require explicit human or policy promotion to shed the mark — an ..."
  },
  "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": "db020f7fef773ddda435d883cfd4fa06aa81d921a7a67c61ca97e5657418a081",
    "verified_classes": [
      "ProvenanceCollapseError",
      "Record"
    ],
    "verified_functions": [
      "derive",
      "dedup",
      "serve_for_decision"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 6,
    "raised_exceptions": [
      "ProvenanceCollapseError"
    ],
    "sample_fail_closed_invariants": [
      "dedup called with identical records"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
