{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-re-derive-taint-at-every-tool-boundary-rather-than-inheriting-a-sticky-provenance-bit",
  "title": "Where must an instance re-derive taint at every tool boundary rather than inheriting a sticky provenance bit?",
  "date_of_record": "2026 November 27",
  "scope": "Applies to single- and multi-agent systems that propagate data-flow provenance (taint bits, source labels, trust tiers) from retrieval and tool outputs into the model's working context. Does not apply to systems where tool outputs are never re-embedded into the prompt, or where the model has no write access to state.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-re-derive-taint-at-every-tool-boundary-rather-than-inheriting-a-sticky-provenance-bit.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-re-derive-taint-at-every-tool-boundary-rather-than-inheriting-a-sticky-provenance-bit.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-re-derive-taint-at-every-tool-boundary-rather-than-inheriting-a-sticky-provenance-bit.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1557,
    "python_slice_tokens": 349,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the model got injected.\" It is that a *taint bit attached to a retrieved span* survives a boundary it should not survive, or fails to survive one it must. Two distinct operations get conflated: 1. **Carrying taint** — a provenance label travels with a value as it moves (retrieval → context → tool arg → tool result → memory write). 2. **Re...",
    "what_was_observed": "A retrieval step pulls an untrusted web span `S` labeled `taint=external`. The agent summarizes `S` through a `summarize()` tool running under a `trusted` service identity. The summarizer returns text `T`. The provenance wrapper assigns `T` the taint of the *tool* (`trusted`), because the tool's response envelope carries the service's trust tier as the default label and the summarizer did not forward the input's tain...",
    "condition_of_validity": "The sticky-bit model is only sound when **all** of the following hold; if any fails, taint must be re-derived at the boundary: - The transformation is *trust-preserving*: output trust ≤ min(input trust, channel trust). Summarizers, translators, parsers, and LLM re-writes are **not** trust-preserving — they can inject, paraphrase, or hallucinate, so they must...",
    "decision_boundary": "At each edge `(producer, transform, consumer)`, compute: where `join` returns the *most-tainted* (least-trusted) element. Never assign `label_out = channel_trust` when inputs are non-empty. Never assign `label_out = label(v)` on a transforming edge. The single decision that separates safe from unsafe: **does the transform forward its input taints into the jo...",
    "operational_effect": "A laundering defect turns retrieval into a privilege-escalation primitive: any external span the agent reads can be promoted to memory-resident trusted state through one summarize/echo hop, after which downstream auditors see a clean label and grant it tool authority. The blast radius is the entire memory store reachable from that write. The over-taint defec..."
  },
  "matched_failure_symptoms": [
    "DOMAIN:EPISTEMIC_PROVENANCE_AND_FEDERATION_ROUTING"
  ],
  "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": "644565b46f20c04178b77bcdd9218b0f88b7c3e30d1b0ac5dc0ebdf37951a818",
    "verified_classes": [
      "TaintLaunderingError",
      "Labeled",
      "Edge"
    ],
    "verified_functions": [
      "_least_trusted",
      "rederive_taint",
      "write_to_memory",
      "_demo"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [
      "assert taint == 'external'"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
