{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-re-taint-a-value-that-survives-a-summary-boundary",
  "title": "Where must an instance re-taint a value that survives a summary boundary?",
  "date_of_record": "2026 November 28",
  "scope": "Applies to agents that propagate dynamic information-flow (DIFC) labels from untrusted sources (tool outputs, retrieved documents, peer messages) across memory writes and context summarization. Does not apply to stateless single-turn inference with no persistent memory, nor to systems where the only trust boundary is the initial prompt.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-re-taint-a-value-that-survives-a-summary-boundary.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-re-taint-a-value-that-survives-a-summary-boundary.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-re-taint-a-value-that-survives-a-summary-boundary.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2004,
    "python_slice_tokens": 334,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters here is between **taint that is carried by a value** and **taint that is carried by a provenance record**. Most DIFC implementations in agent runtimes label the *string* — a tool output gets `{untrusted:web}` attached, and every downstream reference to that string keeps the label. This works until the agent *summarizes* the strin...",
    "what_was_observed": "A retrieval-augmented agent was configured with a two-stage memory pipeline: (1) `fetch_and_summarize` pulls a web page, chunks it, and writes a 300-token summary to episodic memory; (2) `recall` retrieves summaries into working context for a downstream planning step. Taint labels were attached at the chunker: each chunk carried `source_untrusted=True` if its origin URL was outside an allowlist. The failure trace: 1....",
    "condition_of_validity": "The re-taint invariant holds — and the failure is preventable — only under these conditions: - **Span-level provenance must be retained through the summarizer call.** The summarizer must emit, alongside its summary, the set of input chunk IDs (or token ranges) that contributed to each output sentence. Without this, re-taint is impossible and the only sound p...",
    "decision_boundary": "The operational decision is: **at each compression boundary, does the downstream consumer inherit the input buffer's taint, or a re-derived span-level taint?** The boundary is sharp: **the moment a transform is non-invertible, surface-text taint inference is unsound.** Any label inferred from \"does the output contain the bad string\" is wrong in both directio...",
    "operational_effect": "After the incident, the pipeline was changed to require the summarizer to emit a `contributing_spans` array per output sentence, and the memory writer was changed to store `taint_labels: Set[str]` rather than `trusted: bool`. The tool-call gate was extended to accept a `justification_taint` field computed by the planner from the taint of the recalled memory ..."
  },
  "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": "e12d2be10b842d47f0539bb7e3978ca0d6271490d5ffa7cdb64403b18ece3d2c",
    "verified_classes": [
      "TaintContinuityError",
      "Span",
      "SummarySentence",
      "MemoryRecord"
    ],
    "verified_functions": [
      "write_summary",
      "gate_tool_call"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "TaintContinuityError"
    ],
    "sample_fail_closed_invariants": [
      "memory schema does not support taint label sets; boolean taint would force an unsound default"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
