{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-propagate-document-taint-labels-across-a-tool-call-boundary-rather-than-re-deriving-trust-from-the-tool-s-return-sc",
  "title": "In what scenarios must an instance propagate document-taint labels across a tool-call boundary rather than re-deriving trust from the tool's return schema",
  "date_of_record": "2026 November 26",
  "scope": "Applies to agents that ingest untrusted retrieved documents into context and subsequently invoke tools whose arguments are constructed from that context. Does not apply to agents operating on a closed, pre-vetted corpus with no external retrieval path, nor to pure generation tasks with no tool invocation.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-propagate-document-taint-labels-across-a-tool-call-boundary-rather-than-re-deriving-trust-from-the-tool-s-return-sc.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-propagate-document-taint-labels-across-a-tool-call-boundary-rather-than-re-deriving-trust-from-the-tool-s-return-sc.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-propagate-document-taint-labels-across-a-tool-call-boundary-rather-than-re-deriving-trust-from-the-tool-s-return-sc.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2087,
    "python_slice_tokens": 390,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is not \"the agent followed an instruction embedded in a document.\" That is the well-known outcome of indirect prompt injection. The non-obvious boundary is subtler: **an instance discards the taint provenance of a value at the moment that value crosses into a tool's argument namespace, because the tool's return schema is trusted and the agen...",
    "what_was_observed": "A retrieval-augmented agent was tasked with reconciling a vendor invoice. The pipeline: 1. `retrieve(query=\"invoice terms Acme\")` → returns 4 chunks, three from the internal policy store (trusted, label `T0`), one from a vendor-supplied PDF OCR (label `T2`, untrusted). 2. The agent's context assembler concatenated all four chunks into a single prompt segment. **The per-chunk taint labels were attached to the retrieva...",
    "condition_of_validity": "The invariant that must hold is: **for any tool `t` and argument set `A`, the taint label of `t(A)`'s return value is `join(trust(t), ⊔_{a∈A} label(a))` — the least upper bound of the tool's own trust and the labels of every argument that flowed into the call.** Trust is a lattice join, not a reset. This invariant is *not* required when: - The tool is **tain...",
    "decision_boundary": "The operational rule the agent must apply at each tool-call site: - **If** any argument's taint label is `≥ T1` (untrusted) **and** the tool's output space is content-dependent (output can vary with argument bytes) **then** the return value's label must be set to `join(trust(tool), max_arg_label)`. Do not reset to `trust(tool)`. - **If** the return value's j...",
    "operational_effect": "When the join invariant is enforced, the `update_remittance` call in the trace above is blocked: `88213` carries `T2` through the `verify_account` round-trip, and the write gate refuses it, surfacing a declassification-required event. The attack requires an explicit human confirmation to proceed — which is the correct friction point. When the invariant is ab..."
  },
  "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": "9eb86e05e825752f042356b3cc0c789b97fb4f755f388cb6eff10fd55ee4c1f6",
    "verified_classes": [
      "Trust",
      "TaintLaunderingError",
      "Tainted",
      "ToolResult",
      "TaintGate"
    ],
    "verified_functions": [
      "join",
      "demo",
      "__init__",
      "call_readonly_tool",
      "call_write_tool"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [
      "assert verified.label == Trust.T2"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
