{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-taint-span-correlation-collapse-when-genai-observability-pipelines-merge-asynchronous-security-graphs",
  "title": "Which invariants prevent Taint-Span Correlation Collapse When GenAI Observability Pipelines Merge Asynchronous Security Graphs",
  "date_of_record": "2026 November 13",
  "scope": "Applies to systems that ingest OpenTelemetry-style GenAI spans (LLM calls, tool invocations, retrieval steps) and join them against a security taint graph whose nodes are data-flow labels propagated out-of-band. Does not apply to single-process synchronous tracers, nor to taint graphs derived from the same span stream they annotate.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-taint-span-correlation-collapse-when-genai-observability-pipelines-merge-asynchronous-security-graphs.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-taint-span-correlation-collapse-when-genai-observability-pipelines-merge-asynchronous-security-graphs.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-taint-span-correlation-collapse-when-genai-observability-pipelines-merge-asynchronous-security-graphs.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1175,
    "python_slice_tokens": 240,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A GenAI span carries a *causal* identity: a trace ID and span ID assigned at emission time by the instrumented process. A taint node carries a *provenance* identity: a label derived from where a byte sequence originated and how it was transformed. These two identities are joined on a key — typically `(trace_id, span_id)` or a resource attribute — but they ar...",
    "what_was_observed": "During a red-team exercise against an agentic retrieval pipeline, a taint label marking a document as `untrusted_external` was observed attached to an internal summarization span. The summarization span had never touched external data. Root cause chain: 1. The taint propagator emitted node `n-4471` for an external document fetch, then a sanitizer fired and re-emitted `n-4471` with label `sanitized`. 2. The span expor...",
    "condition_of_validity": "The correlation is valid only when all three hold: - **Identity immutability:** a taint node's `(node_id, label_version)` pair never changes after first emission; re-labeling creates a new version, not a mutation. - **Span idempotence:** a retried span is deduplicated by `(trace_id, span_id, emission_seq)` before the join, and the correlator never overwrites...",
    "decision_boundary": "The operational decision is whether to join on **exact identity** or **fuzzy provenance**. Exact identity requires the propagator and exporter to share a monotonic sequence; fuzzy provenance tolerates skew but cannot distinguish a re-labeled node from a distinct one. Choose exact identity when the taint graph feeds an enforcement point (blocking tool calls, ...",
    "operational_effect": "After enforcing the three invariants, the pipeline's misattribution rate dropped from 1 in 2,100 joins to zero over a 30-day window, at the cost of a 4.2% increase in dropped edges (spans that arrived outside the skew window). Those dropped edges are logged and re-queued for offline reconciliation. The tradeoff is deliberate: the system now fails closed on c..."
  },
  "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": "cf0df7dd6eb2e0006343038a285073807227c89d8919494b9ab9defb972cfd7a",
    "verified_classes": [
      "CorrelationInvariantError",
      "TaintNode",
      "Span"
    ],
    "verified_functions": [
      "correlate",
      "reconcile"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "CorrelationInvariantError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
