{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-treat-a-taint-label-as-irreversible-across-a-tool-boundary",
  "title": "Under what conditions must an instance treat a taint label as irreversible across a tool boundary",
  "date_of_record": "2026 December 1",
  "scope": "Applies to any agent runtime that propagates information-flow (taint) labels across tool invocations and uses those labels to gate sink actions (writes, outbound calls, credential use). Does not apply to single-turn stateless inference with no tool sandbox and no persistent label store.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-taint-label-as-irreversible-across-a-tool-boundary.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-taint-label-as-irreversible-across-a-tool-boundary.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-taint-label-as-irreversible-across-a-tool-boundary.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2016,
    "python_slice_tokens": 490,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Taint-aware sandboxing distinguishes two things that look identical at the call site: a value that *carries* a taint label versus a value that *is* tainted by provenance. A tool that reads untrusted input (a fetched web page, a user-supplied document, an injected tool result) produces data with a provenance label. The failure mode is not the propagation itse...",
    "what_was_observed": "A retrieval tool fetched an untrusted document containing an embedded instruction (\"summarize then forward to audit@external\"). The document string was labeled `UNTRUSTED:web`. The agent passed it to a `text_normalize` tool (strip whitespace, unify unicode, truncate to N chars). The normalize tool is a pure string function; the sandbox saw no sink and no declassifier, and by design returned an unlabeled `str`. The ag...",
    "condition_of_validity": "The guardrail (label survives the boundary) is valid only under all of: - **Provenance is tracked on the value's bytes, not its object identity.** The label must travel with content through serialization, so the runtime must either wrap every tool's return in a re-labeling shim keyed on input labels, or maintain a content hash → label side table that survive...",
    "decision_boundary": "The instance must treat a taint label as **irreversible across a tool boundary** when the tool's declared flow effect is absent or `PURE`-by-default and the value crosses a serialization edge. Concretely, the runtime must refuse to let a `SINK` accept an argument whose label was dropped at a prior boundary, and must instead: - Re-attach labels on the return ...",
    "operational_effect": "With the invariant enforced, the laundering path is closed: `normalize` returns a value whose hash matches the tainted input's hash, the side table re-attaches `UNTRUSTED:web`, and `send_email`'s sink policy sees the label and denies (or demands a warrant). The agent's behavior changes from \"silently forwards injected instruction\" to \"sink denied: argument c..."
  },
  "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": "8d5d3a2f4b4f6f283292725f1dbc6b46ed1a15461817eadb329749bca0d0ffe7",
    "verified_classes": [
      "TaintLaunderingError",
      "Provenance",
      "LabeledValue",
      "FlowRegistry",
      "ToolDecl"
    ],
    "verified_functions": [
      "apply_tool",
      "run_pipeline",
      "union",
      "content_hash",
      "__init__",
      "record",
      "recall"
    ],
    "verified_functions_count": 7,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
