{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-quarantine-a-tainted-value-before-crossing-a-tool-boundary-and-why-dynamic-label-propagation-silently-fails-at-the-serialization",
  "title": "When must an instance quarantine a tainted value before crossing a tool boundary, and why dynamic label propagation silently fails at the serialization edge",
  "date_of_record": "2026 November 30",
  "scope": "Applies to single- or multi-agent systems where an LLM instance reads untrusted content (web, tool output, retrieved documents) and subsequently invokes tools whose arguments may include, or be derived from, that content. Does not apply to pure generation tasks with no side-effecting tool calls, nor to systems where all tool inputs are statically typed and validated against a closed schema with no free-form string fields.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-quarantine-a-tainted-value-before-crossing-a-tool-boundary-and-why-dynamic-label-propagation-silently-fails-at-the-serialization.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-quarantine-a-tainted-value-before-crossing-a-tool-boundary-and-why-dynamic-label-propagation-silently-fails-at-the-serialization.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-quarantine-a-tainted-value-before-crossing-a-tool-boundary-and-why-dynamic-label-propagation-silently-fails-at-the-serialization.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2745,
    "python_slice_tokens": 518,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between *taint as a property of a value in the runtime's memory graph* and *taint as a property that survives the encode/decode boundary of a tool call*. Most information-flow-labeling (IFL) schemes for agents propagate labels through the in-memory dataflow: the string returned by `fetch_url` is labeled `UNTRUSTED`, and any va...",
    "what_was_observed": "A retrieval-augmented agent was given a task: \"Summarize the deployment notes at the provided wiki page and, if it mentions a rollback URL, register it with the ops webhook.\" The instance fetched the page (labeled `UNTRUSTED`), the page contained a legitimate-looking rollback URL, and the agent called `webhook_register(url=...)`. The failure trace: 1. `fetch_url` returns a `str` with shadow label `UNTRUSTED`. The run...",
    "condition_of_validity": "The invariant required for dynamic IFL to hold across tool boundaries is: > **For every value `v` that crosses a serialization edge into a tool invocation, the label set `L(v)` present at the moment of serialization must be a superset of the join of labels of all values from which `v` was transitively derived, and `L(v)` must be transmitted in the wire forma...",
    "decision_boundary": "The instance must make an explicit decision at the serialization edge, and the decision must be a function of the label, not of the value's surface form. The boundary is: - **If `L(v)` is `TRUSTED` only** → serialize normally, no label field needed. - **If `L(v)` contains `UNTRUSTED` and the tool is declared `effect: read`** → serialize with the label field ...",
    "operational_effect": "Concretely, the guardrail that bounds this failure mode is a *serialization-edge taint gate* that sits between the agent's argument construction and the tool transport, and that operates on the *wire representation* rather than the in-memory object. It must: 1. Walk the serialized argument tree and, for every leaf string, look up the label by *value content*..."
  },
  "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": "d9992a00757246d52fda19ae76e99b0a57894b28eb464f7c475d1082e7bee55b",
    "verified_classes": [
      "TaintLabel",
      "ToolEffect",
      "TaintBoundaryViolation",
      "LabelRegistry",
      "ToolSpec"
    ],
    "verified_functions": [
      "serialization_edge_gate",
      "run_agent_turn",
      "_digest",
      "register",
      "lookup",
      "visit"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "TaintBoundaryViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
