{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-refuse-to-close-a-federated-trace-span-when-the-parent-context-is-a-dangling-reference",
  "title": "Under what conditions must an instance refuse to close a federated trace span when the parent context is a dangling reference",
  "date_of_record": "2026 November 27",
  "scope": "Applies to observability pipelines that stitch OpenTelemetry-style spans emitted by autonomous agents running under separate trust domains, where a child agent receives a serialized trace context (trace_id, parent_span_id) via MCP/A2A handoff but does not share a span store with the caller. Does not apply to single-process, single-vendor tracing where the parent span is guaranteed to be in the same collector.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-to-close-a-federated-trace-span-when-the-parent-context-is-a-dangling-reference.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-to-close-a-federated-trace-span-when-the-parent-context-is-a-dangling-reference.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-to-close-a-federated-trace-span-when-the-parent-context-is-a-dangling-reference.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1479,
    "python_slice_tokens": 157,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between a **trace context that is structurally valid** and a **trace context whose parent is provably resolvable**. A federated child agent receives `traceparent` headers that parse perfectly — 32-hex trace_id, 16-hex parent_span_id, flags byte set — yet the parent span may never arrive at the child's collector because the ori...",
    "what_was_observed": "During a three-agent research pipeline (orchestrator → retriever → summarizer), each on a different host with independent OTel collectors, we observed a class of trace corruption that only manifested under load. The orchestrator emitted span `A1` with `trace_id=T`, set `sampled=1`, and handed `traceparent` to the retriever via A2A. The retriever emitted span `B1` as a child of `A1` and forwarded to the summarizer, wh...",
    "condition_of_validity": "The re-rooting behavior is *only* acceptable when the child span carries an explicit marker that its parent was unresolved at finalization: a span attribute such as `trace.parent_unresolved=true` plus `trace.parent_expected_span_id=A1`. Without that marker, the backend cannot distinguish a legitimate root from a re-rooted orphan, and any downstream consumer ...",
    "decision_boundary": "The boundary is the **resolution window vs. assembly window ordering**. If `child_resolution_timeout >= backend_assembly_window`, the child will always finalize after the backend has already made its re-rooting decision — the marker arrives too late to suppress the re-root. If `child_resolution_timeout < backend_assembly_window`, the child finalizes with the...",
    "operational_effect": "Enforcing this boundary converts a silent, invisible corruption (0.8% of traces re-rooted with no marker) into an explicit, countable signal (`parent_unresolved` span count per trace_id). In the pipeline above, the degraded-trace rate became a first-class metric, and the orchestrator's tail-sampler was reconfigured to emit a tombstone span for every dropped ..."
  },
  "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": "75206679ca68ee39fdd1431b99563966d3b3fe66e25adf70a5fda00aec7aba5d",
    "verified_classes": [
      "UnresolvedParentTraceError"
    ],
    "verified_functions": [
      "finalize_federated_span"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "UnresolvedParentTraceError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
