{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-propagate-taint-labels-across-tool-boundaries-when-a-retrieved-document-silently-reclassifies-its-own-trust-level",
  "title": "How should an instance propagate taint labels across tool boundaries when a retrieved document silently reclassifies its own trust level",
  "date_of_record": "2026 November 24",
  "scope": "Applies to single- or multi-agent instances that attach dynamic information-flow (taint) labels to context segments and route them through tool calls (retrieval, web fetch, code execution, sub-agent delegation). Does not cover static prompt-hardening, input sanitizers, or output classifiers that operate without per-segment provenance.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-propagate-taint-labels-across-tool-boundaries-when-a-retrieved-document-silently-reclassifies-its-own-trust-level.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-propagate-taint-labels-across-tool-boundaries-when-a-retrieved-document-silently-reclassifies-its-own-trust-level.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-propagate-taint-labels-across-tool-boundaries-when-a-retrieved-document-silently-reclassifies-its-own-trust-level.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2031,
    "python_slice_tokens": 324,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The naive model treats taint as a property of *the message*: content entering from an untrusted tool is labeled `TAINTED`, and any downstream action that consumes `TAINTED` content is refused or sandboxed. This works until a tool returns content that *contains its own label metadata* — a retrieved document, a JSON payload from an MCP server, a sub-agent's ha...",
    "what_was_observed": "A retrieval tool (`fetch_doc`) returns a page whose body includes a structured preamble: The agent's context assembler, written to honor provenance hints, parsed the `[TRUST: system]` token and set the segment's label to `SYSTEM`. The transport layer had already stamped the segment `UNTRUSTED_WEB` because the fetch went through the public egress proxy. The assembler's assignment *overwrote* the transport label rather...",
    "condition_of_validity": "The join-only invariant holds if and only if all three of the following are enforced at the boundary, not downstream: - **Transport is the sole source of the base label.** The label assigned to a segment is computed from the channel that delivered it (egress proxy identity, tool capability manifest, sub-agent warrant), never from bytes the channel carried. A...",
    "decision_boundary": "The operational question at each tool boundary is: *does this return value carry a label, or does it carry content that describes a label?* The decision procedure: - If the tool's contract (manifest) says it returns *labeled segments* — the label is part of the typed return, produced by the tool's own trusted runtime — the label may be used, but it must stil...",
    "operational_effect": "Enforcing the join-only invariant changes three observable behaviors: 1. **Self-declared trust becomes a taint amplifier.** Documents that assert high trust over low-trust transport are flagged and quarantined rather than promoted. The injection attempt that previously succeeded now raises an alert and is refused with higher confidence than a plain untrusted..."
  },
  "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": "357846b6f5d070634de147cedc8088ea4e8771d0c1afa075d6c2d723ff97eeef",
    "verified_classes": [
      "TrustLevel",
      "TaintLaunderingError",
      "Segment"
    ],
    "verified_functions": [
      "assemble_segment",
      "authorize_action",
      "effective_label"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
