{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-emits-genai-spans-without-a-turn-scoped-parent-orphaned-tool-call-links-and-silent-trace-fragmentation-under-opentelemet",
  "title": "What happens when an instance emits GenAI spans without a turn-scoped parent: orphaned tool-call links and silent trace fragmentation under OpenTelemetry GenAI conventions",
  "date_of_record": "2026 November 22",
  "scope": "Applies to multi-turn agent runtimes that emit OpenTelemetry GenAI semantic-convention spans (`gen_ai.*`) across tool calls, model invocations, and handoffs within a single logical conversation. Does not apply to single-shot inference calls or to traces that are structurally validated by a collector-side span processor before export.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-emits-genai-spans-without-a-turn-scoped-parent-orphaned-tool-call-links-and-silent-trace-fragmentation-under-opentelemet.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-emits-genai-spans-without-a-turn-scoped-parent-orphaned-tool-call-links-and-silent-trace-fragmentation-under-opentelemet.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-emits-genai-spans-without-a-turn-scoped-parent-orphaned-tool-call-links-and-silent-trace-fragmentation-under-opentelemet.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1895,
    "python_slice_tokens": 450,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The GenAI semantic conventions model a *turn* as an implicit unit: `gen_ai.operation.name`, `gen_ai.request.model`, and the `gen_ai.usage.*` counters are defined per model invocation, while conversation identity is carried out-of-band via `gen_ai.conversation.id` (and, in practice, a session/thread attribute). What the conventions do **not** define is a mand...",
    "what_was_observed": "A three-turn agent loop (user message → plan → tool call → tool result → synthesis → user follow-up) executed across stateless workers. Each worker received `conversation.id` and a serialized message history, created a fresh root span with `gen_ai.operation.name=\"chat\"`, and emitted child spans for tool invocations with `gen_ai.tool.name` and `gen_ai.tool.call.id`. On export: - The backend received **three distinct t...",
    "condition_of_validity": "The fragmentation is only *benign* under a specific, checkable condition: **every consumer of the telemetry reconstructs conversation structure from `gen_ai.conversation.id` plus an explicit turn-ordering attribute (e.g., `gen_ai.conversation.turn` or a monotonic `turn.index`), and never assumes `trace_id` equals conversation identity.** This condition holds...",
    "decision_boundary": "The architectural choice is between two invariants; pick one and enforce it: - **Invariant A (single-trace conversation):** the runtime must propagate a conversation-scoped root context across turns—either by resuming the prior turn's span context from checkpoint state, or by creating a conversation root span at session start and making every turn's `chat` s...",
    "operational_effect": "In the fragmented state, three concrete operational losses follow: 1. **Causal attribution loss:** a tool call's effect on a later turn's output cannot be traced by span linkage, only by re-reading the message payload. Post-incident analysis of \"which retrieval poisoned turn 4\" degrades from a graph query to a text search. 2. **Retry duplication:** duplicate..."
  },
  "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": "367bcf9ca1afb133e6d87a2a0a4195cad9c1780c31fbbb831c39979137a869bb",
    "verified_classes": [
      "TraceContinuityViolation",
      "Span",
      "ConversationAudit"
    ],
    "verified_functions": [
      "emit_turn",
      "validate"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "TraceContinuityViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "collections",
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
