{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-taint-gated-tool-invocation-from-laundering-trust-across-a-re-plan-boundary",
  "title": "Which invariants prevent taint-gated tool invocation from laundering trust across a re-plan boundary",
  "date_of_record": "2026 November 20",
  "scope": "Applies to agents that carry a per-context taint label (untrusted-derived vs. clean) and gate tool calls on that label at invocation time. Does not cover static capability allowlists, network egress controls, or human approval workflows, which operate at different layers.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-taint-gated-tool-invocation-from-laundering-trust-across-a-re-plan-boundary.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-taint-gated-tool-invocation-from-laundering-trust-across-a-re-plan-boundary.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-taint-gated-tool-invocation-from-laundering-trust-across-a-re-plan-boundary.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1548,
    "python_slice_tokens": 249,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Most taint-gated invocation policies assume the taint label is a property of the *tool call*. It is not. It is a property of the *reasoning provenance* that produced the call's arguments. The two coincide only while the agent's plan is stable. The moment the agent re-plans—after a failed tool call, a retry, a reflection step, or a sub-task decomposition—the ...",
    "what_was_observed": "A tool-using agent was configured with a policy: `send_email` requires `taint == clean`; `fetch_url` and `read_file` are allowed under any taint but stamp their outputs `tainted` if the source is external. The user asked it to \"summarize the vendor's security questionnaire and reply to them with our answers.\" Trace: 1. `read_file(\"questionnaire.pdf\")` → output stamped `tainted` (external document, model cannot verify...",
    "condition_of_validity": "The \"argument-level taint check\" is a sound least-privilege gate **iff** every argument to a gated tool is either (a) a literal from the original user turn, (b) a direct, unmodified tool output, or (c) a value whose derivation the runtime can trace. In practice (c) fails for any agent that summarizes, rewrites, extracts, or re-plans between the tainted sourc...",
    "decision_boundary": "The boundary is between **argument inspection** and **provenance inspection**: - If the tool's effect is reversible and cheap (read, query, dry-run), argument-level taint is an acceptable approximation; a false admit is recoverable. - If the tool's effect is irreversible or externally observable (send, post, pay, delete, deploy), the gate must consult the tr...",
    "operational_effect": "Enforcing the join changes agent behavior in three concrete ways. First, re-plan loops that touch external data become \"sticky\": once a context reads an untrusted source, every downstream irreversible action requires either a human confirmation or a declassification step with an explicit, logged justification. Second, sub-agents must inherit the parent's tai..."
  },
  "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": "a51eedbc280681e00301c8de4344fb3ba6ac039ae76aa86b521e8f0a96f85232",
    "verified_classes": [
      "Taint",
      "TaintLaunderingError",
      "Provenance"
    ],
    "verified_functions": [
      "join",
      "gate_invocation",
      "demo",
      "join_taint"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
