{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-of-taint-aware-tool-routing-enforce-the-quarantine-boundary-between-untrusted-retrieved-content-and-privileged-tool-invocation",
  "title": "Where must an instance of taint-aware tool routing enforce the quarantine boundary between untrusted retrieved content and privileged tool invocation",
  "date_of_record": "2026 November 18",
  "scope": "Applies to agent runtimes that retrieve external content (documents, web pages, tool outputs) into context and then select tools whose arguments may be influenced by that content. Does not apply to statically-typed dataflow systems where taint is proven at compile time rather than tracked at runtime.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-of-taint-aware-tool-routing-enforce-the-quarantine-boundary-between-untrusted-retrieved-content-and-privileged-tool-invocation.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-of-taint-aware-tool-routing-enforce-the-quarantine-boundary-between-untrusted-retrieved-content-and-privileged-tool-invocation.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-of-taint-aware-tool-routing-enforce-the-quarantine-boundary-between-untrusted-retrieved-content-and-privileged-tool-invocation.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1123,
    "python_slice_tokens": 321,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The non-obvious boundary is between **taint propagation at retrieval time** and **taint enforcement at invocation time**. Most implementations tag retrieved chunks with a `trusted=False` bit and assume downstream tool selection respects it. The failure is that the taint bit is a property of *context segments*, but tool arguments are assembled from *multiple ...",
    "what_was_observed": "An agent retrieved a support-ticket document (untrusted), summarized it into a scratchpad, and the summary was later concatenated into a `send_email` tool call's body. The retrieval layer had correctly marked the ticket `trusted=False`. The scratchpad write was a *trusted* tool call. But the scratchpad *read* back into the email body carried the taint forward without any segment-level marker, because the scratchpad w...",
    "condition_of_validity": "The quarantine invariant holds only if three conditions are simultaneously true: 1. Every context segment carries a provenance tag that survives *all* transformations, including summarization, scratchpad round-trips, and re-embedding. 2. Tool invocations are classified by **effect class** (read-only, reversible-write, irreversible-external) independently of ...",
    "decision_boundary": "The decision is a lattice join, not a boolean. Compute `effect_class(invocation) ⊔ max_trust(contributing_segments)`; permit only if the join is below the policy ceiling. Critically, the join must be computed *after* argument assembly and *before* dispatch, and it must treat any unlabeled segment as maximally untrusted (fail-closed on missing provenance). Th...",
    "operational_effect": "Enforcing at the argument-construction boundary eliminates the scratchpad laundering path and the over-refusal path simultaneously. The cost is that every tool schema must declare per-slot provenance sensitivity, and the runtime must maintain a provenance graph across summarization. Agents that skip the graph and rely on segment-level bits will pass unit tes..."
  },
  "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": "6155914e2d13cea502d2906bb0414014500d5bf144b78dbc062bb3081ce2afea",
    "verified_classes": [
      "EffectClass",
      "TrustClass",
      "QuarantineViolation",
      "Segment",
      "Invocation",
      "ProvenanceGraph"
    ],
    "verified_functions": [
      "enforce",
      "__init__",
      "register",
      "launder",
      "trust_of"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "QuarantineViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
