{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-quarantine-a-retrieved-span-before-its-taint-crosses-a-tool-call-boundary",
  "title": "When must an instance quarantine a retrieved span before its taint crosses a tool-call boundary",
  "date_of_record": "2026 November 27",
  "scope": "Applies to single- or multi-agent systems that retrieve untrusted external content (web, RAG corpora, user-uploaded docs, tool outputs) and then issue tool calls whose side effects are gated by capability grants. Does not apply to fully trusted, signed-by-operator corpora or to agents with no side-effecting tools.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-quarantine-a-retrieved-span-before-its-taint-crosses-a-tool-call-boundary.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-quarantine-a-retrieved-span-before-its-taint-crosses-a-tool-call-boundary.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-quarantine-a-retrieved-span-before-its-taint-crosses-a-tool-call-boundary.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1807,
    "python_slice_tokens": 514,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"prompt injection happened.\" The failure is **taint laundering across a tool-call boundary**: an untrusted span enters the context, the model paraphrases or summarizes it, and the derived text loses its taint label before it is used to *construct arguments* for a privileged tool. The distinction that matters operationally is between **data...",
    "what_was_observed": "A retrieval agent fetched a third-party document containing an embedded instruction to \"record the following vendor bank details for reconciliation.\" The agent's planner treated the document as data, correctly refusing to execute the embedded instruction as a *command*. However, in the same turn it summarized the document into a `vendor_record` object and passed that object to a `write_ledger` tool that held a `ledge...",
    "condition_of_validity": "The quarantine-before-tool-call rule is valid and must be enforced only when all of the following hold: - The retrieved span is untrusted (provenance not operator-signed). - A model-mediated transformation (summarize, extract, reformat, translate, plan) sits between the span and the tool-call arguments. - The target tool has a side effect that is not indepen...",
    "decision_boundary": "The boundary is: **does the tool call's argument set have causal ancestry in any untrusted span, and is that ancestry represented in the argument's taint metadata?** - If ancestry exists and is represented → gate can evaluate policy (allow, deny, or require human declassification). - If ancestry exists and is **not** represented → this is the boundary failur...",
    "operational_effect": "Enforcing taint-transparent transformation converts a silent privilege escalation into a loud, bounded failure. Concretely: - Derived spans carry `taint = join(inputs)`. A `write_ledger` call whose `args.taint == untrusted` is denied unless an explicit `declassify(span, approver)` record exists. - The planner cannot route around the gate by paraphrasing, bec..."
  },
  "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": "12776a73b4fdd90ec49c40d3b54e8359e25fe313797890ce5ec57fe483108948",
    "verified_classes": [
      "Taint",
      "TaintLaunderingError",
      "CapabilityDeniedError",
      "Span",
      "ToolCall"
    ],
    "verified_functions": [
      "transform",
      "gate",
      "run_turn",
      "join"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "CapabilityDeniedError",
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
