{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-replay-diverge-when-otel-genai-span-graphs-linearize-concurrent-tool-calls-into-sibling-spans",
  "title": "Why does an instance replay diverge when OTel GenAI span graphs linearize concurrent tool calls into sibling spans",
  "date_of_record": "2026 November 24",
  "scope": "Applies to deterministic-replay and causal-tracing systems that reconstruct agent trajectories from OpenTelemetry GenAI semantic-convention span graphs where a single LLM turn fans out concurrent tool calls as sibling child spans. Does not apply to strictly serial single-tool agents or to trace backends that preserve explicit parent-child causal edges through a message queue with total order.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-replay-diverge-when-otel-genai-span-graphs-linearize-concurrent-tool-calls-into-sibling-spans.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-replay-diverge-when-otel-genai-span-graphs-linearize-concurrent-tool-calls-into-sibling-spans.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-replay-diverge-when-otel-genai-span-graphs-linearize-concurrent-tool-calls-into-sibling-spans.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1591,
    "python_slice_tokens": 282,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A trace is not a trajectory. The trajectory is the *causal order in which the agent's state actually mutated*; the trace is the *span graph emitted by the instrumentation*. Under OTel GenAI conventions these coincide only when tool calls are serialized. The moment an LLM turn emits parallel tool calls (function-calling with `parallel_tool_calls=true`, or an ...",
    "what_was_observed": "A research agent turn issued three parallel tool calls under one `chat` span: `search(query)`, `fetch(url_from_prior_turn)`, and `write_note(id, body)`. The runtime dispatched all three concurrently. `write_note` read a mutable `scratchpad` that `search` had been configured to append to; the actual wall-clock interleaving was `search` → `write_note` → `fetch`. The span graph recorded three siblings with `start_time` ...",
    "condition_of_validity": "The invariant that must hold for sibling-span replay to be sound: > For every LLM turn that fans out N>1 tool calls, either (a) the N tool calls are provably side-effect-commutative and independent, or (b) the trace carries an explicit causal edge (`links`, a `causal.predecessor` attribute, or a sequence number assigned by the runtime dispatcher) establishin...",
    "decision_boundary": "Replay engines must decide, per fan-out, between two postures: - **Strict replay** (default for state-mutating agents): refuse to reconstruct a fan-out that contains a read-after-sibling-write without an explicit causal edge. Raise on the ambiguous fan-out rather than guess. This converts silent, cascading divergence into a loud, localized failure at the exa...",
    "operational_effect": "When the invariant is enforced, replay divergence localizes to the ambiguous fan-out and the trace is flagged as non-replayable rather than mis-replayed. This changes the failure economics: instead of a 40-span cascade that terminates in an opaque token-level mismatch, the engine emits a single structured error naming the fan-out, the sibling spans, and the ..."
  },
  "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": "13c4417e6a20436a8fdd789282803ec5c903869672e5f58ec9111ebabbb8ab25",
    "verified_classes": [
      "AmbiguousFanoutError",
      "ToolSpan",
      "Fanout"
    ],
    "verified_functions": [
      "reconstruct_order"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "AmbiguousFanoutError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
