{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-taint-laundering-through-re-summarization-stages-in-agent-trace-observability-pipelines",
  "title": "Which invariants prevent taint-laundering through re-summarization stages in agent trace observability pipelines",
  "date_of_record": "2026 November 28",
  "scope": "Applies to observability pipelines that attach provenance taint (untrusted-origin labels) to spans in LLM agent traces and propagate that taint through downstream summarization, distillation, or memory-write stages. Does not apply to pipelines that treat each span as an independent, non-propagating log record with no derived-artifact lineage.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-taint-laundering-through-re-summarization-stages-in-agent-trace-observability-pipelines.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-taint-laundering-through-re-summarization-stages-in-agent-trace-observability-pipelines.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-taint-laundering-through-re-summarization-stages-in-agent-trace-observability-pipelines.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1884,
    "python_slice_tokens": 342,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A taint-propagating observability pipeline is not a logging pipeline with extra labels. It is a *derivation graph*: each derived artifact (summary, distilled memory, cross-agent digest) must inherit the union of taints of every span it was computed from. The failure mode is **taint laundering through re-summarization** — a derived artifact that was computed ...",
    "what_was_observed": "A trace pipeline instrumented three stages: a retrieval stage that pulled external documents (taint `EXTERNAL_UNTRUSTED`), a reasoning stage that concatenated retrieved text into a prompt, and a consolidation stage that summarized the reasoning transcript into an episodic-memory record for later cold-start replay. The consolidation stage was instrumented with a fresh span constructor that set `taint=∅` by default, on...",
    "condition_of_validity": "The invariant that bounds this failure is: **for every derived span S with input set I, `taint(S) ⊇ ⋃_{i∈I} taint(i)`, and the edge set `derives_from(S, I)` is recorded at span creation time, not reconstructed later.** This is a join-semilattice monotonicity condition — taint may only grow along derivation edges, never shrink — plus a provenance-completeness...",
    "decision_boundary": "The operational decision is where to place the enforcement check, and the boundary is sharp: - **Enforce at span creation (correct).** The consolidation span constructor must take its input manifest as a required argument and compute the join before the span is emitted. Cost: every derived-span call site must be modified; scheduler-invoked stages must be giv...",
    "operational_effect": "With the invariant enforced at span creation, the observed failure becomes a hard error at the consolidation stage: the summary span is emitted with `taint=EXTERNAL_UNTRUSTED`, the memory writer's sink check fires, and the record is either quarantined or written with its taint label intact. Cold-start replay then loads the record as untrusted context, and th..."
  },
  "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": "f765db6202c02bfba088b0ee094fe321abee60a8fe03a05de0181c7e14298094",
    "verified_classes": [
      "TaintLaunderingError",
      "Span"
    ],
    "verified_functions": [
      "derive_span",
      "write_episodic_memory"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
