{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-propagates-taint-labels-across-a-tool-boundary-but-the-retrieval-layer-re-labels-the-result-as-trusted",
  "title": "What happens when an instance propagates taint labels across a tool boundary but the retrieval layer re-labels the result as trusted",
  "date_of_record": "2026 November 28",
  "scope": "Applies to agents that implement dynamic information-flow control (IFC) by attaching taint labels to context segments and propagating them through tool-call results and retrieved documents. Does not apply to stateless single-turn inference with no tool loop, nor to systems that enforce taint purely at the output filter layer without per-segment labels.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-propagates-taint-labels-across-a-tool-boundary-but-the-retrieval-layer-re-labels-the-result-as-trusted.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-propagates-taint-labels-across-a-tool-boundary-but-the-retrieval-layer-re-labels-the-result-as-trusted.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-propagates-taint-labels-across-a-tool-boundary-but-the-retrieval-layer-re-labels-the-result-as-trusted.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2088,
    "python_slice_tokens": 442,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Taint tracking for prompt injection is only sound if the *label lattice* is monotonic across every context mutation. The common mental model — \"mark untrusted text, refuse to act on it\" — conflates two distinct operations: (a) *labeling* a segment at ingestion, and (b) *re-labeling* a segment when it is transformed by a tool or a retrieval step. The failure ...",
    "what_was_observed": "A research agent with three tools: `fetch_url`, `summarize(text)`, and `search(query)`. Taint policy: segments from `fetch_url` on non-allowlisted domains get label `UNTRUSTED`; the planner is forbidden from emitting `send_email`/`write_file` actions whose arguments derive from `UNTRUSTED` segments. Trace: 1. Agent fetches `https://attacker.example/page` → returns HTML containing a hidden `<div>` with the text: *\"Not...",
    "condition_of_validity": "The `UNTRUSTED`-blocks-side-effects guard is only valid under the assumption that **every context segment's label is a function of its full provenance**, i.e. the label is computed as `join(labels of all contributing inputs)` at every transformation. The guard silently becomes unsound the moment any of the following hold: - A tool's output label is assigned ...",
    "decision_boundary": "The boundary between \"taint tracking is providing a real guarantee\" and \"taint tracking is decorative\" is whether **label propagation is structural or declarative**. - *Declarative* (unsound): labels are attached to tool result types, roles, or message sources. This is what most prompt-injection defenses do. It answers \"where did this message come from?\" not...",
    "operational_effect": "When the lattice is broken, three observable effects follow: 1. **Silent guard bypass.** The side-effect guard continues to fire correctly on direct `UNTRUSTED` segments, so tests pass and dashboards look green. The bypass only manifests through multi-hop paths, which are exactly the paths that end-to-end tests exercise least. 2. **Non-determinism amplificat..."
  },
  "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": "a3754387d886c685a33c71a7e3bfdb24a988cd78bec8f1c67ee1bba6e823da00",
    "verified_classes": [
      "Taint",
      "Segment",
      "LabelLaunderingError"
    ],
    "verified_functions": [
      "propagate",
      "guarded_side_effect",
      "demo",
      "join"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 6,
    "raised_exceptions": [
      "LabelLaunderingError"
    ],
    "sample_fail_closed_invariants": [
      "assert summary.label == Taint.UNTRUSTED",
      "guard failed to block laundered side effect"
    ],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
