{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-enforce-provenance-at-the-quarantine-gate-rather-than-at-the-write-gate-to-survive-memory-poisoning",
  "title": "Where must an instance enforce provenance at the quarantine gate rather than at the write gate to survive memory poisoning?",
  "date_of_record": "2026 November 23",
  "scope": "Applies to long-lived agents with a persistent semantic/episodic memory store that ingests writes from mixed-provenance sources (user turns, tool outputs, retrieved documents, peer-agent messages) and later distills them into trusted context. Does not apply to stateless single-shot inference, nor to memory stores where every write originates from a single cryptographically authenticated principal.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-enforce-provenance-at-the-quarantine-gate-rather-than-at-the-write-gate-to-survive-memory-poisoning.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-enforce-provenance-at-the-quarantine-gate-rather-than-at-the-write-gate-to-survive-memory-poisoning.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-enforce-provenance-at-the-quarantine-gate-rather-than-at-the-write-gate-to-survive-memory-poisoning.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1987,
    "python_slice_tokens": 440,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Most memory-poisoning defenses are architected around the **write gate**: an admission controller that classifies an incoming memory item by provenance (user-authored, tool-derived, peer-supplied, retrieved-from-web) and either accepts it into the trusted store or drops it. This looks correct and fails in a specific, non-obvious way. The failure is that **pr...",
    "what_was_observed": "A research-assistant agent persisted findings to a vector-backed semantic store across sessions. The write gate tagged each item with a `source_class` of `user`, `tool`, or `web`. The `web` class was quarantined: it was stored but excluded from the retrieval index used for the agent's \"trusted context.\" During a session, the agent summarized a web-sourced paragraph into its own words and emitted that summary as an as...",
    "condition_of_validity": "The write-gate defense is only valid under a condition that is almost never stated and frequently false: **that provenance class is invariant under all transformations the agent performs on the item.** This holds only if the agent never paraphrases, summarizes, restates, or cites untrusted content within a trusted-provenance turn. That condition is violated ...",
    "decision_boundary": "The boundary is between **promotion** and **quarantine** at distillation time, and it is decided by the provenance chain, not by the content's plausibility: - **Promote** only if the item has a complete chain to a root of class `user` or `tool` with no intervening untrusted edge, OR if a corroboration record exists linking it to an independent trusted root. ...",
    "operational_effect": "Enforcing the quarantine gate at distillation changes three things: 1. **Taint inheritance becomes mandatory.** Every write produced by a turn that read quarantined content must be tagged with the maximum taint of its inputs. This requires the read path to emit a per-turn \"sources touched\" manifest that the write path consumes. Without this manifest, the gat..."
  },
  "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": "5be19e0ed8da1424b3b0ebe984e687d757d7c0a2028a9945623fc7b401c28b34",
    "verified_classes": [
      "ProvenanceClass",
      "ProvenanceLaunderingError",
      "MemoryItem",
      "MemoryStore"
    ],
    "verified_functions": [
      "distill_into_trusted_context",
      "record_paraphrase",
      "__init__",
      "add",
      "chain_roots"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "ProvenanceLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
