{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-re-derive-taint-labels-when-opentelemetry-genai-span-attributes-are-aggregated-across-a-fan-out",
  "title": "Where must an instance re-derive taint labels when OpenTelemetry GenAI span attributes are aggregated across a fan-out",
  "date_of_record": "2026 November 29",
  "scope": "Applies to agent runtimes that carry prompt-injection / data-provenance taint as OpenTelemetry `gen_ai.*` span attributes and aggregate child spans into a parent task decision. Does not apply to single-shot, single-span invocations where no aggregation or cross-span trust decision occurs.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-re-derive-taint-labels-when-opentelemetry-genai-span-attributes-are-aggregated-across-a-fan-out.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-re-derive-taint-labels-when-opentelemetry-genai-span-attributes-are-aggregated-across-a-fan-out.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-re-derive-taint-labels-when-opentelemetry-genai-span-attributes-are-aggregated-across-a-fan-out.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1742,
    "python_slice_tokens": 243,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There is a difference between *recording* taint and *propagating* taint. OpenTelemetry's GenAI semantic conventions give you attribute slots (`gen_ai.prompt`, `gen_ai.completion`, plus custom `gen_ai.taint.*` extensions) on individual spans. They do not define an aggregation algebra. When an agent fans out to N tool calls or sub-agents and then re-enters its...",
    "what_was_observed": "An orchestration agent received a user task, spawned four parallel retrieval sub-agents, and merged their outputs into a synthesis prompt. Each sub-agent emitted spans with `gen_ai.taint.source=external_untrusted` when it fetched from a third-party URL. The parent span carried `gen_ai.operation.name=invoke_agent` and a child-of relationship to all four. A downstream policy gate evaluated the parent span's attributes ...",
    "condition_of_validity": "The re-derivation requirement holds precisely when three conditions co-occur: 1. **Context re-entry exists.** A child span's output is serialized into a string that becomes part of an ancestor's `gen_ai.prompt` (or equivalent input attribute). If outputs are only summarized by a separate trusted model, or discarded, the child's taint need not reach the paren...",
    "decision_boundary": "The decision an implementer must make is *where* the re-derivation hook lives, and there are only two defensible answers: - **At the merge/serialization call site.** Wrap the function that concatenates child outputs into the parent prompt. For each child segment appended, union that child's `gen_ai.taint.*` labels into a segment-scoped label set attached to ...",
    "operational_effect": "The practical consequence is that taint labels in GenAI attributes are **not a property of spans; they are a property of prompt regions.** Any policy gate that reads taint off a span's attribute map is reading a proxy that is only valid if the runtime maintains the region-to-span map and re-derives at every re-entry. Runtimes that skip this get one of two si..."
  },
  "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": "7bfbfedc714dcb1b9221591f2ffc76aacc56a6b21e3f3f9205a192ad9ea0c5c8",
    "verified_classes": [
      "TaintAggregationError",
      "ChildSpan",
      "ParentPrompt"
    ],
    "verified_functions": [
      "_present",
      "rederive_taint",
      "assert_taint_covered"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "TaintAggregationError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
