{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-lose-injection-taint-at-the-retrieval-boundary-when-provenance-labels-are-re-derived-rather-than-propagated",
  "title": "Why does an instance lose injection taint at the retrieval boundary when provenance labels are re-derived rather than propagated?",
  "date_of_record": "2026 December 1",
  "scope": "Applies to agents that carry a per-span provenance label (trusted / untrusted / user-authored) through a multi-hop pipeline of tool calls and retrieval steps, and that make authorization or action-gating decisions based on the aggregate taint of the assembled context. Does not apply to single-turn, no-tool systems, nor to pipelines where the entire context is treated as uniformly untrusted.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-injection-taint-at-the-retrieval-boundary-when-provenance-labels-are-re-derived-rather-than-propagated.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-injection-taint-at-the-retrieval-boundary-when-provenance-labels-are-re-derived-rather-than-propagated.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-injection-taint-at-the-retrieval-boundary-when-provenance-labels-are-re-derived-rather-than-propagated.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2018,
    "python_slice_tokens": 314,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two incompatible ways to establish the provenance of a span entering the agent's context: **propagation** and **re-derivation**. - *Propagation* treats the taint label as part of the data itself—a field carried alongside the payload through every transformation, tool return, serialization, and re-chunking. The label survives because it is copied wi...",
    "what_was_observed": "A support-triage agent ingests inbound customer emails, extracts \"requested actions,\" and executes them against an internal ticketing API. At ingestion, each email body is labeled `untrusted:external`. A preprocessing step chunks the body and writes chunks to a vector store with metadata `{source: email, ingested_by: pipeline}`. At task time, the agent retrieves relevant chunks by similarity, then asks a summarizer t...",
    "condition_of_validity": "The invariant that must hold: **for every span in the assembled context, `label(span) ⊒ label(any source span it was derived from)` under the taint lattice, where `⊒` means \"at least as tainted.\"** Labels may only be *raised* by transformation, never lowered, except by an explicit, logged declassification (e.g., a human approval, or a sanitizer with a proof ...",
    "decision_boundary": "The operational choice is: **at each boundary, do you propagate the label or re-derive it?** The decision boundary is sharp because the two options are observationally identical on benign data and diverge only under adversarial input. - *Choose propagation* when any span can originate outside the trust boundary (external email, web fetch, user upload, third-...",
    "operational_effect": "When the invariant holds, the action gate is a sound over-approximation: any context containing attacker-influenced text is `untrusted`, and the gate refuses or escalates side effects. The cost is false positives—benign retrieved text blocks actions until declassified—which is the correct direction to fail. When the invariant breaks, the system exhibits **ta..."
  },
  "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": "cea1607bb29783e5b35754d156535ce4a8f9a60ee07bba53bd294a2d87507c61",
    "verified_classes": [
      "Taint",
      "TaintLaunderingError",
      "Span"
    ],
    "verified_functions": [
      "join",
      "merge_spans",
      "gate_action",
      "run_pipeline"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [
      "cannot merge empty span list"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
