{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-reconstruct-a-causal-trace-across-a-multi-agent-failure-when-opentelemetry-span-links-collapse-under-fan-in",
  "title": "How should an instance reconstruct a causal trace across a multi-agent failure when OpenTelemetry span links collapse under fan-in",
  "date_of_record": "2026 November 30",
  "scope": "Applies to multi-agent systems where child agent invocations are emitted as OTel spans linked (not parented) to the spawning span, and where a post-hoc causal reconstruction is attempted from the exported trace store. Does not apply to strict parent-child span trees where every agent call has exactly one `parent_span_id`, nor to single-agent tool-call traces.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-reconstruct-a-causal-trace-across-a-multi-agent-failure-when-opentelemetry-span-links-collapse-under-fan-in.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconstruct-a-causal-trace-across-a-multi-agent-failure-when-opentelemetry-span-links-collapse-under-fan-in.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconstruct-a-causal-trace-across-a-multi-agent-failure-when-opentelemetry-span-links-collapse-under-fan-in.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1796,
    "python_slice_tokens": 494,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"missing telemetry.\" Every span exists, every attribute is present, and the collector exported without loss. The failure is that **span links are a set, not an ordering**, and a fan-in of `N` concurrent child spans linked to one parent loses the causal *sequence* the parent intended to encode. When an auditor later reconstructs \"which agen...",
    "what_was_observed": "A three-agent pipeline (planner → two parallel executors → auditor) diverged: the auditor rejected a result that one executor had produced correctly, because the other executor's stale state had been merged first. The trace store held 41 spans for the task. All shared a `trace_id`. The planner span carried two `links` entries pointing at the two executor spans. Both executor spans carried a link back to the planner. ...",
    "condition_of_validity": "Causal reconstruction from span links is valid only when **all** of the following hold: 1. **No concurrent fan-in with causal ordering significance.** If the parent spawned children whose relative order matters, links cannot carry that order. Use a parent-child span per child (the parent span's `end_time` then bounds the join) or emit an explicit `causal_seq...",
    "decision_boundary": "The boundary between \"reconstruct\" and \"refuse\" is whether the link graph, after role annotation, admits a **unique** total order consistent with all local sequence constraints. Concretely: - If the annotated link graph plus per-instance `seq` constraints yields exactly one topological order → emit it with `confidence: derived`. - If it yields multiple consi...",
    "operational_effect": "Teams that adopt role-annotated links plus per-instance sequence numbers stop producing inverted post-mortems; the reconstruction either yields a unique order or explicitly reports ambiguity, which routes the incident to \"we need better instrumentation\" instead of \"agent X is unreliable.\" The cost is one attribute write per span at emit time and a schema req..."
  },
  "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": "c5191469a72b0dce853a8239065b370eb0b9725829543731609baa6d77f5dd18",
    "verified_classes": [
      "CausalReconstructionError",
      "Span"
    ],
    "verified_functions": [
      "reconstruct_order"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "CausalReconstructionError"
    ],
    "sample_fail_closed_invariants": [
      "causal graph contains a cycle; link roles contradict sequence constraints"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
