{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-emits-spans-for-a-reasoning-chain-it-cannot-causally-reconstruct-dangling-parent-links-under-genai-semantic-conventions",
  "title": "What happens when an instance emits spans for a reasoning chain it cannot causally reconstruct: dangling parent links under GenAI semantic conventions",
  "date_of_record": "2026 November 25",
  "scope": "Applies to multi-hop agent reasoning chains instrumented with OpenTelemetry GenAI semantic conventions (`gen_ai.operation.name`, `gen_ai.agent.*`, `trace_id`/`span_id`/`parent_span_id`) where spans are emitted by *different* LLM/tool invocations that may execute out of causal order (parallel tool calls, retried steps, resumed checkpoints). Does not cover single-process synchronous trace export where the SDK guarantees in-order parent emission.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-emits-spans-for-a-reasoning-chain-it-cannot-causally-reconstruct-dangling-parent-links-under-genai-semantic-conventions.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-emits-spans-for-a-reasoning-chain-it-cannot-causally-reconstruct-dangling-parent-links-under-genai-semantic-conventions.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-emits-spans-for-a-reasoning-chain-it-cannot-causally-reconstruct-dangling-parent-links-under-genai-semantic-conventions.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1636,
    "python_slice_tokens": 405,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There is a difference between *trace-tree completeness* and *causal reconstructability*. A span tree can be structurally complete — every `parent_span_id` resolves, no orphans, no cycles — and still fail to reconstruct the actual reasoning chain, because the parent link encodes *emission-time ancestry* rather than *logical dependency*. Under GenAI semantic c...",
    "what_was_observed": "A three-hop agent chain (planner → retriever-tool → synthesizer) was instrumented so each hop emitted a `gen_ai` span. During a resumed run, the orchestrator crashed after hop 2 and restarted from a serialized checkpoint. On resume, the orchestrator re-emitted hop 2's span (retry) and then hop 3. The retry re-used the *new* process's root context, so hop 2's retry span had `parent_span_id` pointing at the new root, n...",
    "condition_of_validity": "The invariant that must hold for causal tracing to be sound is: **for every span S with recorded input I(S), the parent link of S must resolve to a span P such that the output O(P) is a causal ancestor of I(S) in the actual dataflow.** Emission-order ancestry is a valid proxy for this *only when* the invoking context is identical to the producing context — i...",
    "decision_boundary": "The boundary is between two instrumentation strategies: - **Emission-parented spans** (default SDK behavior): parent = the span active at emission time. Cheap, structurally clean, causally unsound across resume/retry/fan-out. - **Dependency-parented spans**: parent = the span whose output was actually consumed as input. Requires the orchestrator to thread th...",
    "operational_effect": "Concretely: causal replay tools that walk parent links will reconstruct a chain that is *plausible but wrong* — right span count, right operation names, wrong inputs. The failure is silent because the trace validates. Downstream effects include: (a) replay-based verification of agent outputs passing when the actual chain diverged, (b) token-accounting audits..."
  },
  "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": "9e9ef37a0749ec8ab7067a24423beb32b80146881b620e35602ed60dd7af4daa",
    "verified_classes": [
      "CausalTraceReconstructionError",
      "GenAISpan"
    ],
    "verified_functions": [
      "_hash",
      "reconstruct_causal_chain",
      "verify_span_emission_ancestry"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "CausalTraceReconstructionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
