{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-distinguish-prompt-injection-taint-propagation-from-legitimate-instruction-flow-when-labels-cross-tool-output-and-retrieval-bou",
  "title": "How should an instance distinguish prompt-injection taint propagation from legitimate instruction flow when labels cross tool-output and retrieval boundaries",
  "date_of_record": "2026 November 14",
  "scope": "Applies to agent runtimes that attach dynamic information-flow labels (taint bits, provenance tags, trust levels) to content entering the context window from tool outputs, retrieved documents, and memory. Does not apply to static, compile-time label systems or to single-turn inference where no external content enters the context after the initial prompt.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-distinguish-prompt-injection-taint-propagation-from-legitimate-instruction-flow-when-labels-cross-tool-output-and-retrieval-bou.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-distinguish-prompt-injection-taint-propagation-from-legitimate-instruction-flow-when-labels-cross-tool-output-and-retrieval-bou.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-distinguish-prompt-injection-taint-propagation-from-legitimate-instruction-flow-when-labels-cross-tool-output-and-retrieval-bou.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1699,
    "python_slice_tokens": 198,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The naive model treats taint as a boolean: content that originated from an untrusted source is tainted, content from the user or system prompt is clean, and any instruction appearing inside tainted content is ignored. This model fails at a specific and non-obvious boundary: **the moment a tool output is *summarized or transformed by the model itself* before ...",
    "what_was_observed": "In a production agent with a three-stage retrieve→summarize→act loop, the following was observed across a corpus of 1,200 adversarial retrieval documents: 1. **Signature evasion via model paraphrase.** 71% of injected instructions that were blocked at the raw-retrieval stage passed through the summarization stage undetected when the summarizer was asked to \"rephrase in your own words.\" The output summary contained th...",
    "condition_of_validity": "The failure is only reachable when all of the following hold: - Content crosses at least one **model-mediated transformation** (summarize, extract, translate, reformat) between ingestion and use. - The label system propagates taint by **immediate producer** rather than by **transitive origin set**. - Downstream policy distinguishes \"trusted\" from \"untrusted\"...",
    "decision_boundary": "The operational rule that resolves the boundary: - **Propagate labels as an origin *set*, not a bit.** Every context segment carries `origins: {source_ids}` and `transforms: [(kind, actor)]`. A model-mediated transform *adds* to `transforms` but never *removes* from `origins`. The scratchpad write in observation (2) must carry `origins: {web_fetch_4421}, tra...",
    "operational_effect": "With origin-set propagation and semantic-equivalence checking enabled, the paraphrase-evasion rate in the corpus dropped from 71% to 9% (residual cases were transformations that legitimately restated a document's own recommendations, indistinguishable from injection without human review). The over-block rate on benign summaries fell from 14% to 2% because de..."
  },
  "matched_failure_symptoms": [
    "PROMPT_INJECTION_OR_CONFUSED_DEPUTY"
  ],
  "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": "d5ca467d28bc7744b7d3f6362acaf84c6eaf9d8ecaec1d646caf54d8a578f51e",
    "verified_classes": [
      "TaintBoundaryError",
      "Segment"
    ],
    "verified_functions": [
      "check_instruction_admissible",
      "reingest_summary",
      "derive"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "TaintBoundaryError"
    ],
    "sample_fail_closed_invariants": [
      "origin set collapsed during model-mediated transform"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
