{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-enforce-taint-propagation-across-a-provenance-labeled-context-when-a-tool-boundary-launders-untrusted-bytes-into-a-trusted-type",
  "title": "How should an instance enforce taint propagation across a provenance-labeled context when a tool boundary launders untrusted bytes into a trusted-typed return value",
  "date_of_record": "2026 November 29",
  "scope": "Applies to single- or multi-agent LLM runtimes that tag context segments with provenance labels (e.g., `user`, `tool:web_fetch`, `tool:retrieval`, `system`) and apply dynamic information-flow control (IFC) at tool-call boundaries to block prompt-injection-driven action escalation. Does not cover static prompt hardening, output filtering, or model-internal attention-level defenses.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-enforce-taint-propagation-across-a-provenance-labeled-context-when-a-tool-boundary-launders-untrusted-bytes-into-a-trusted-type.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-enforce-taint-propagation-across-a-provenance-labeled-context-when-a-tool-boundary-launders-untrusted-bytes-into-a-trusted-type.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-enforce-taint-propagation-across-a-provenance-labeled-context-when-a-tool-boundary-launders-untrusted-bytes-into-a-trusted-type.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2542,
    "python_slice_tokens": 564,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the model followed an injected instruction.\" That is the visible symptom. The boundary failure is that **the taint label attached to a context segment is a property of the segment's *origin*, but the IFC gate at the tool boundary evaluates a property of the *argument value*.** When a tool returns data, the runtime re-labels the *return en...",
    "what_was_observed": "A retrieval agent was given a task: \"Summarize the vendor security posture from `https://vendor.example/security` and file a ticket with the summary.\" The runtime labeled segments as follows: - `S0` (`system`): operator instructions, taint = `⊥` (bottom, trusted). - `S1` (`user`): the task text, taint = `user`. - `S2` (`tool:web_fetch`): the fetched page body, taint = `tool:web_fetch`, **but with an embedded span** c...",
    "condition_of_validity": "The taint-tracking scheme is sound only under all of the following, each of which is routinely violated: 1. **Span-granular labeling.** Every byte range in the context carries a label, and labels are joined, not overwritten, when ranges are concatenated. Segment-granular labeling (one label per message) is unsound whenever a tool returns mixed-origin content...",
    "decision_boundary": "The operational decision is where to place the enforcement point and what to do when derivation is unresolvable. Three boundaries matter: - **Resolvable derivation, tainted join.** The argument's bytes match untrusted spans and the join is `⊤`. The gate must *block* the call and return a structured refusal to the model: `IFCViolation(sink=file_ticket.body, t...",
    "operational_effect": "When the invariant holds, the injection in the observed trace is stopped at turn 4: `label(body) = join(tool:web_fetch, untrusted_span) = ⊤`, `⊤ ⋢ sink_policy(file_ticket.body)`, call blocked, model receives span provenance and either declassifies or reformulates. The attacker's payload never reaches the ticket. When it fails, the failure is *silent and audi..."
  },
  "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": "535af44d1f9c9cf2cce494fbfc5e24dc8a5d6aff453ac77dbe0796e3d7d6aa4b",
    "verified_classes": [
      "TaintLaunderingError",
      "IFCViolation",
      "Span",
      "Segment"
    ],
    "verified_functions": [
      "join",
      "assert_closed",
      "distill",
      "gate",
      "invoke_file_ticket",
      "label_at"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "IFCViolation",
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
