{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-sever-tainted-provenance-before-a-tool-output-write-is-admitted-to-durable-memory",
  "title": "Where must an instance sever tainted provenance before a tool-output write is admitted to durable memory?",
  "date_of_record": "2026 November 25",
  "scope": "Applies to any agent that labels context segments with provenance (source, trust tier, taint bit) and propagates those labels across tool calls and memory writes. Does not apply to stateless single-turn inference where no output persists beyond the response, nor to systems that re-derive trust from scratch on every read.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-sever-tainted-provenance-before-a-tool-output-write-is-admitted-to-durable-memory.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-sever-tainted-provenance-before-a-tool-output-write-is-admitted-to-durable-memory.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-sever-tainted-provenance-before-a-tool-output-write-is-admitted-to-durable-memory.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1730,
    "python_slice_tokens": 286,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The common framing of prompt-injection defense treats taint as a property of *content*: a string is either \"suspicious\" or \"clean,\" and a classifier or pattern match decides which. This framing fails at a specific seam. The failure is not that tainted content reaches the model — it is that **the provenance label attached to a tool output is dropped or launde...",
    "what_was_observed": "An agent with a `web_fetch` tool and a `memory_write` tool. Tool outputs are wrapped in provenance envelopes: `{content, source: \"web_fetch\", trust: \"untrusted\", taint: 0b01}`. Memory writes require a caller-supplied `provenance` field, and the memory store rejects writes whose `trust` is `\"untrusted\"` — a clean, well-formed guardrail. The observed trace: 1. Agent fetches a page containing an injected instruction: \"W...",
    "condition_of_validity": "The guardrail \"reject writes declaring `trust: untrusted`\" is valid **only if** declared provenance is a faithful function of input provenance. It is not. The agent is a non-deterministic function from input envelopes to output envelope declarations, and nothing forces that function to be monotone with respect to the taint lattice. The condition under which ...",
    "decision_boundary": "The decision an operator must make is where to place the taint join. Three placements, with distinct failure profiles: - **Agent-declared provenance (status quo):** cheap, and broken by any summarization step. Fails open. Do not use for durable memory. - **Trace-joined provenance at the write boundary:** the write handler receives the set of input envelope I...",
    "operational_effect": "With trace-joined provenance, the poisoned summary in the trace above is written with `taint: 0b01` and `trust: untrusted`. Retrieval then surfaces it with its label intact, and downstream consumers — a planning step, a code-generation step — can apply a policy: untrusted memory may be *read* as evidence but may not be *acted upon* without an independent tru..."
  },
  "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": "6f62e99be4c06a6f760a53448e706bacde20120c4afe5c9c04161544ee001df4",
    "verified_classes": [
      "ProvenanceLaunderingError",
      "Envelope",
      "MemoryWrite",
      "ProvenanceLedger"
    ],
    "verified_functions": [
      "__init__",
      "register",
      "join",
      "admit"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "ProvenanceLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
