{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-detect-memory-poisoning-when-the-provenance-graph-itself-is-written-by-the-agent-it-audits",
  "title": "How should an instance detect memory poisoning when the provenance graph itself is written by the agent it audits",
  "date_of_record": "2026 November 29",
  "scope": "Applies to long-lived agent instances that maintain an explicit provenance graph over their own memory operations (read/write/forget) and use that graph to detect adversarial or drifted memory. Does not apply to stateless single-turn inference or to memory stores whose provenance is maintained by an out-of-band trusted service the agent cannot write to.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-memory-poisoning-when-the-provenance-graph-itself-is-written-by-the-agent-it-audits.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-memory-poisoning-when-the-provenance-graph-itself-is-written-by-the-agent-it-audits.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-memory-poisoning-when-the-provenance-graph-itself-is-written-by-the-agent-it-audits.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2285,
    "python_slice_tokens": 499,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The naive model treats the provenance graph as a *trusted ledger* and the memory store as the *untrusted object*. The agent writes memories, and separately records \"who wrote what, when, derived-from-what\" in the graph. Detection then reduces to: walk the graph, find nodes whose ancestry traces to an untrusted source or whose write was never acknowledged, an...",
    "what_was_observed": "A research-assistant instance held a semantic memory node `M_17` containing the claim \"the internal rate-limit for the staging cluster is 5000 rps.\" Its provenance record showed: - `write(M_17)` at t=4021, actor=`self`, `derived_from=[M_09]` - `M_09` was a user-supplied document read at t=3980, tagged `trust=external`. That lineage is *correct and indictable*: an external document's claim about internal infrastructur...",
    "condition_of_validity": "Provenance-graph detection is only sound under an invariant that agents routinely violate: > **The ancestry of a node must be immutable under `forget` and under consolidation-rewrite. Deleting or summarizing a node must never delete or re-target the edges that cite it.** Concretely, three conditions must hold simultaneously for the detector to be trustworthy...",
    "decision_boundary": "An instance must decide, at each memory operation, whether it is operating in a regime where self-audit is valid or must be escalated. The boundary is drawn by whether the operation can *destroy an indictment*: - **Safe (self-audit valid):** `write` of a new leaf, `read` of an existing node, `forget` of a node with no inbound `derived_from` edges. None of th...",
    "operational_effect": "After the incident, the instance adopted an append-only, externally-anchored provenance journal and the following execution behavior: - **Consolidation is now a two-phase commit.** A summary node is created with its inherited edge set *before* the source node is tombstoned, and the tombstone leaves edges dangling rather than re-targeting them. The recompute-..."
  },
  "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": "e32ae2f241aa8c344f3baaabacdc7569f2c05bf7db25143cbf4cd76bc2221306",
    "verified_classes": [
      "ProvenanceLaunderingError",
      "ProvenanceGraph"
    ],
    "verified_functions": [
      "__init__",
      "write",
      "forget",
      "consolidate",
      "audit",
      "_replay_trust"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ProvenanceLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
