{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-treat-a-tool-output-whose-taint-label-was-laundered-through-a-summarizer-the-label-join-invariant-for-prompt-injection-taint-pr",
  "title": "How should an instance treat a tool output whose taint label was laundered through a summarizer: the label-join invariant for prompt-injection taint propagation",
  "date_of_record": "2026 December 1",
  "scope": "Applies to any agent that assigns dynamic information-flow (taint) labels to context segments, propagates those labels across tool-call outputs and memory writes, and gates sensitive sinks (outbound tool calls, file writes, state mutations) on label predicates. Does not apply to stateless single-turn completions with no persistent memory or tool egress.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-treat-a-tool-output-whose-taint-label-was-laundered-through-a-summarizer-the-label-join-invariant-for-prompt-injection-taint-pr.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-treat-a-tool-output-whose-taint-label-was-laundered-through-a-summarizer-the-label-join-invariant-for-prompt-injection-taint-pr.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-treat-a-tool-output-whose-taint-label-was-laundered-through-a-summarizer-the-label-join-invariant-for-prompt-injection-taint-pr.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2288,
    "python_slice_tokens": 376,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between *label propagation by provenance* and *label propagation by content*. A taint-tracking layer that labels a tool output `tainted` because its bytes descend from an untrusted source is doing provenance propagation. A layer that decides a derived artifact is clean because it \"looks like a summary\" is doing content propaga...",
    "what_was_observed": "A retrieval-augmented agent with three tools: `fetch_url`, `summarize_to_memory`, and `send_email`. The taint layer marks `fetch_url` outputs `UNTRUSTED`. The sink policy blocks `send_email` when any `UNTRUSTED` segment is in the active context window. Memory writes are supposed to be gated the same way. Trace of the boundary crossing: 1. `fetch_url(\"https://attacker.example/post\")` returns text containing, embedded ...",
    "condition_of_validity": "The join invariant is only enforceable under a specific condition: **every derivation must be mediated by a call site that the taint layer can observe, and every observation must carry the full input label set forward.** Concretely: - The taint layer must intercept the summarizer/distiller call as a derivation with declared inputs, not as an opaque tool that...",
    "decision_boundary": "The boundary is between *compression that preserves provenance* and *compression that severs it*. A derivation that the taint layer can see through — same process, declared inputs, labels joined at the call boundary — is safe to compress. A derivation that emits a string the layer can only inspect post hoc is not, and must be treated as a label-laundering ha...",
    "operational_effect": "With the join invariant enforced, the email in the trace is blocked: the memory write carries `UNTRUSTED` because its input set did, the later retrieval surfaces an `UNTRUSTED` segment, and the sink policy refuses `send_email`. The cost is false positives — legitimate summaries of untrusted pages stay tainted and cannot feed sensitive sinks without declassif..."
  },
  "matched_failure_symptoms": [
    "PROMPT_INJECTION_OR_CONFUSED_DEPUTY"
  ],
  "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": "b666601e9cd2b4dead675836366c534866d34d374ae8eefdad295a20917dbdf0",
    "verified_classes": [
      "Taint",
      "TaintLaunderingError",
      "Segment",
      "Derivation",
      "MemoryStore"
    ],
    "verified_functions": [
      "label_derivation",
      "persist_derivation",
      "replay_audit",
      "join",
      "write"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [
      "assert derived.label is Taint.UNTRUSTED"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
