{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-local-span-parent-pointer-survive-federation-export-but-silently-re-root-the-reconstructed-agent-graph",
  "title": "Why does an instance-local span parent pointer survive federation export but silently re-root the reconstructed agent graph?",
  "date_of_record": "2026 November 29",
  "scope": "Applies to multi-instance agent systems where each LLM instance emits OpenTelemetry GenAI spans (`gen_ai.*` semantic conventions) into a local collector, and a federation layer merges those span sets into a cross-instance trace graph. Does not apply to single-process, single-collector deployments where `parentSpanId` is never rewritten in transit.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-local-span-parent-pointer-survive-federation-export-but-silently-re-root-the-reconstructed-agent-graph.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-local-span-parent-pointer-survive-federation-export-but-silently-re-root-the-reconstructed-agent-graph.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-local-span-parent-pointer-survive-federation-export-but-silently-re-root-the-reconstructed-agent-graph.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2069,
    "python_slice_tokens": 368,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A span's `parentSpanId` is a *local* pointer into one instance's span table. A federation merge treats it as a *global* pointer. These are not the same object. The local pointer is valid only within the emitting instance's trace context; once spans from multiple instances are concatenated into one trace, the same `parentSpanId` string resolves against a unio...",
    "what_was_observed": "A three-instance planner/executor/auditor pipeline. The executor instance (E) received a task from planner (P) via an A2A handoff, ran three tool calls, then handed to auditor (A). E's collector was configured with `parentbased_traceidratio` sampling at 0.5. The handoff span `executor.handoff.in` was sampled in; its parent — P's `planner.dispatch` span — was sampled *out* on P's side (a different sampling decision, b...",
    "condition_of_validity": "The failure is bounded by a single condition, and it is checkable at export time: > A span S with `parentSpanId = p` is a *federation-valid child* only if `p` is present in the merged span set **and** the emitting instance of `p` equals the emitting instance named in S's `gen_ai.agent.handoff.from_instance` (or S carries no handoff attribute, meaning intra-i...",
    "decision_boundary": "The decision boundary is: **do you trust `parentSpanId` as causality, or do you trust the handoff attributes as causality?** - If you trust `parentSpanId` alone, you inherit re-rooting on any sampling asymmetry, any collector drop, any crash mid-trace. The graph is structurally valid and causally wrong. - If you trust handoff attributes alone, you reconstruc...",
    "operational_effect": "Without the guardrail: reconstructed agent graphs show *more roots than agents*. A three-agent pipeline looks like three independent trees. Latency attribution double-counts because the critical path is split across roots. Fan-out detection misses cross-agent fan-out (planner dispatching to two executors looks like two roots, not one fan-out). Auditor consen..."
  },
  "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": "b7099cd720c45d4ed387c43a7c472b85bd31bb47091483559219640d6e4a1dc9",
    "verified_classes": [
      "DanglingParentError",
      "Span"
    ],
    "verified_functions": [
      "reconstruct_agent_graph",
      "merge_federation"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "DanglingParentError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
