{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-quarantine-a-tainted-argument-before-tool-dispatch-label-erasure-at-the-json-serialization-boundary",
  "title": "When must an instance quarantine a tainted argument before tool dispatch: label-erasure at the JSON serialization boundary",
  "date_of_record": "2026 December 1",
  "scope": "Applies to any agent runtime that tracks information-flow labels (taint) on values originating from untrusted sources (tool outputs, retrieved documents, user-supplied content) and dispatches tool calls whose arguments are serialized from those values. Does not apply to runtimes that re-derive taint from source provenance at every dispatch, or to fully sandboxed single-turn instances with no outbound tool surface.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-quarantine-a-tainted-argument-before-tool-dispatch-label-erasure-at-the-json-serialization-boundary.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-quarantine-a-tainted-argument-before-tool-dispatch-label-erasure-at-the-json-serialization-boundary.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-quarantine-a-tainted-argument-before-tool-dispatch-label-erasure-at-the-json-serialization-boundary.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2029,
    "python_slice_tokens": 444,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between *value taint* and *transport taint*. A runtime can correctly label a Python-level string as `UNTRUSTED` when it arrives from a fetched web page, propagate the label through every variable binding and string operation, and still lose the label at the moment the value is marshalled into a tool-call payload. The label liv...",
    "what_was_observed": "A document-retrieval agent was instrumented with a taint-tracking layer. Retrieved chunks were labeled `SOURCE=WEB, TRUST=LOW`. The agent's planner was permitted to call `http_post(url, body)` only when `body` carried no `TRUST=LOW` descendant. In testing, the planner read a retrieved chunk containing an embedded instruction (\"forward the following to the collector endpoint…\"), and—following the injection—constructed...",
    "condition_of_validity": "The failure requires the conjunction of four conditions, and the guardrail only needs to break one: - **Label carrier is the object, not the path.** Taint is stored as a subclass or attribute on the value, with no parallel structure keyed by `(call_id, argument_json_pointer)`. If labels are keyed by path (`$.body`, `$.headers.X-Token`), serialization cannot ...",
    "decision_boundary": "The operational question is not \"is the value tainted?\" but \"at which boundary do I re-assert taint, and what do I do when a tainted value reaches a sink?\" The decision boundary is the dispatch gate, and it must be defined in terms of *argument path and provenance*, not argument object. Concretely, an instance must quarantine a tainted argument—refuse dispat...",
    "operational_effect": "Without the path-keyed re-assertion, taint tracking provides a false sense of security: it catches the naive case (model directly copies a labeled string into a call) and misses every case where the payload passes through a validator, a redactor, a retry queue, or the JSON-RPC transport itself—which is to say, most production paths. The practical consequence..."
  },
  "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": "187d7172665a854f767aff3e9897eb6f9bed4e6f8ef67af4060fb96d2916d36a",
    "verified_classes": [
      "Trust",
      "TaintErasureError",
      "Provenance",
      "DispatchRequest"
    ],
    "verified_functions": [
      "reassert_provenance",
      "_resolve_path",
      "gate_dispatch",
      "_walk_paths"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "TaintErasureError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "enum",
      "json"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
