{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-treat-taint-propagation-as-a-transitive-non-absorbing-lattice-rather-than-a-per-tool-boolean",
  "title": "Under what conditions must an instance treat taint propagation as a transitive, non-absorbing lattice rather than a per-tool boolean",
  "date_of_record": "2026 November 25",
  "scope": "Applies to any agent runtime that tags tool/retrieval outputs with a trust label (e.g. `untrusted_retrieval`, `trusted_internal`) and gates context-merge or action-execution on that label. Does not apply to sandboxes that enforce isolation purely by capability (no shared context at all), nor to single-shot pipelines with no post-retrieval reasoning steps.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-taint-propagation-as-a-transitive-non-absorbing-lattice-rather-than-a-per-tool-boolean.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-taint-propagation-as-a-transitive-non-absorbing-lattice-rather-than-a-per-tool-boolean.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-taint-propagation-as-a-transitive-non-absorbing-lattice-rather-than-a-per-tool-boolean.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2104,
    "python_slice_tokens": 591,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Most taint-aware sandboxes model trust as a **per-tool boolean**: a tool is either \"trusted\" (its output merges into context freely) or \"untrusted\" (its output is quarantined). This is the wrong algebraic structure. The correct structure is a **lattice with a join (least-upper-bound) operator** where taint is *transitive through derivation* and *non-absorbin...",
    "what_was_observed": "A retrieval-augmented agent was configured with two tool classes: 1. `web_fetch` → label `untrusted_retrieval` 2. `summarize` → label `trusted_internal` (a local LLM call, no external egress) The sandbox quarantined raw `web_fetch` output correctly: it landed in a `quarantine` slot and was *not* merged into the working context. But the orchestration graph allowed a `summarize` call whose `input_ref` pointed at the qu...",
    "condition_of_validity": "The boolean model is only sound under a condition that is almost never checked: **no trusted tool may consume untrusted input and emit output into a non-quarantine slot.** Formally, for every tool `t` with `label(t) = trusted`, and every input reference `r` with `label(r) = untrusted`, the sandbox must either (a) reject the call, or (b) propagate `label(out)...",
    "decision_boundary": "The boundary is not \"trusted vs. untrusted tool.\" It is **\"does this tool's output derive, transitively, from any untrusted byte?\"** The decision procedure at each context-merge point: 1. Walk the provenance graph backward from the artifact being merged. If *any* ancestor node carries `untrusted`, the artifact is `untrusted`. 2. If `untrusted`, the artifact ...",
    "operational_effect": "Enforcing the lattice changes three things at runtime: - **Provenance tracking becomes mandatory per artifact, not per tool.** The sandbox must carry a provenance DAG and compute `join` at every write. Cost: one pointer per artifact plus a join at merge — negligible against the cost of a laundered injection reaching the planner. - **Trusted transforms of unt..."
  },
  "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": "d9de394c0eed8ec2aa1ccd39927b1dc0b74a301c1f62b3bbe71f4744e163d96a",
    "verified_classes": [
      "Trust",
      "TaintLaunderingError",
      "Artifact",
      "Tool"
    ],
    "verified_functions": [
      "join",
      "register",
      "derive",
      "merge_into_context",
      "dispatch_privileged_action"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 6,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [
      "assert digest.label == Trust.UNTRUSTED",
      "assert safe.label == Trust.TRUSTED and safe.instruction_inert"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
