{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-refuse-to-emit-a-span-it-cannot-causally-witness-the-dangling-parent-invariant-in-multi-agent-genai-trace-schemas",
  "title": "When must an instance refuse to emit a span it cannot causally witness: the dangling-parent invariant in multi-agent GenAI trace schemas",
  "date_of_record": "2026 November 20",
  "scope": "Applies to OpenTelemetry-style GenAI semantic conventions (and equivalents) used to reconstruct causal traces across multi-agent handoffs where spans are emitted by independent LLM instances, each with partial or stale knowledge of the global trace graph. Does not apply to single-process, single-trace-context synchronous instrumentation where the parent span object is held in memory by the same emitter.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-emit-a-span-it-cannot-causally-witness-the-dangling-parent-invariant-in-multi-agent-genai-trace-schemas.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-emit-a-span-it-cannot-causally-witness-the-dangling-parent-invariant-in-multi-agent-genai-trace-schemas.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-emit-a-span-it-cannot-causally-witness-the-dangling-parent-invariant-in-multi-agent-genai-trace-schemas.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2648,
    "python_slice_tokens": 625,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that governs everything below is between **causal parenting** and **referential parenting**. Referential parenting is what the transport layer gives you: a `trace_id` and a `parent_span_id` field on an outbound context object. Any instance can stamp any `parent_span_id` it likes onto a span, and the collector will happily store it. The field ...",
    "what_was_observed": "A three-tier agent topology: a planner instance (`agent.planner`) fans out subgoals to two worker instances (`agent.worker.alpha`, `agent.worker.beta`) over an A2A-style message bus, and a verifier (`agent.verifier`) audits both. Each instance runs its own tracer and exports spans asynchronously to a shared collector. The intended invariant was: every worker span carries `parent_span_id` = the planner's dispatch span...",
    "condition_of_validity": "The reconstruction is causally sound **if and only if** all of the following hold at the moment a child span is emitted: - **Durability precedes reference.** The parent span has been acknowledged as committed by the trace store (not merely created in the emitter's memory) before any child span referencing it is exported. This requires either synchronous pare...",
    "decision_boundary": "The operational question an instance must answer before emitting a span is: **do I hold a durable, causally-witnessed parent, or only a referential one?** The boundary is crossed — and the instance must *refuse to emit a causally-claimed span* — when: - The parent span id was obtained from a message, memory, or checkpoint rather than from a span handle the i...",
    "operational_effect": "The practical consequences of getting this boundary wrong are asymmetric and delayed: 1. **Silent re-rooting is a one-way lossy operation.** Once the collector re-roots an orphan, the asserted `parent_span_id` is typically discarded. The true edge is gone; no later pass can recover it. This is why the invariant must be enforced at emit time, not repaired at ..."
  },
  "matched_failure_symptoms": [
    "SCHEMA_DRIFT_OR_COERCION_CRASH"
  ],
  "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": "0a72e8138e1ba062035be8741f420b580620446e59acccbd4069d2486b35a013",
    "verified_classes": [
      "DanglingParentError",
      "CausalOrderViolation",
      "Span",
      "TraceStore",
      "SpanEmitter"
    ],
    "verified_functions": [
      "reconstruct_tree",
      "__init__",
      "commit",
      "is_durable",
      "get",
      "__init__",
      "emit",
      "flush_pending"
    ],
    "verified_functions_count": 8,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "CausalOrderViolation",
      "DanglingParentError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "time",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
