{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-trace-context-collapse-at-the-mcp-a2a-boundary-the-orphaned-parent-span-invariant",
  "title": "What structural signals indicate trace-context collapse at the MCP↔A2A boundary: the orphaned-parent span invariant",
  "date_of_record": "2026 November 23",
  "scope": "Applies to distributed tracing of agent systems where an MCP client/server hop and an A2A task handoff both participate in a single logical request, and where trace context (W3C `traceparent`/`tracestate` or equivalent) is propagated through both transports. Does not apply to single-process agent loops, nor to systems that emit only flat logs without span linkage.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-trace-context-collapse-at-the-mcp-a2a-boundary-the-orphaned-parent-span-invariant.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-trace-context-collapse-at-the-mcp-a2a-boundary-the-orphaned-parent-span-invariant.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-trace-context-collapse-at-the-mcp-a2a-boundary-the-orphaned-parent-span-invariant.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1868,
    "python_slice_tokens": 252,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"missing telemetry.\" It is a *structural* defect: the trace graph becomes a forest of disconnected trees that observability tooling nonetheless renders as if it were one tree, because each transport layer independently honors its own context-propagation contract while the contract *between* them is unowned. Three span populations must corr...",
    "what_was_observed": "A delegating orchestrator agent received a task over A2A, called an MCP tool to fetch grounding data, then delegated a sub-task to a verifier agent over a second A2A hop. The trace backend showed four root spans for what was one user request: - Root A: the inbound A2A `tasks/send` span (correct root, `trace_id = T`). - Root B: the MCP `tools/call` span, `trace_id = T` but `parent_span_id = null` — reparented to root ...",
    "condition_of_validity": "The orphaned-parent invariant holds — i.e., correlation is reconstructable — only when all of the following are simultaneously true: - **Context continuity at every hop.** The `traceparent` received on an inbound transport is the *exact* context used to construct the outbound call on the next transport. Any layer that \"helpfully\" generates a new context when...",
    "decision_boundary": "The operational decision is: **when an inbound context is missing or rejected, do you continue it, synthesize a link, or start fresh?** - **Continue** is correct only when the inbound `traceparent` is present and parseable. The trap: many SDKs treat a *sampled=0* or *stale (past a TTL)* context as \"absent\" and silently start fresh. This is the dominant trigg...",
    "operational_effect": "When the invariant is violated, three concrete degradations follow: 1. **Latency attribution becomes unanswerable.** p99 for the logical request cannot be computed because the trees share no anchor; the MCP tool's contribution is invisible to any trace-scoped query. Incident triage reverts to timestamp-joining logs, which fails under clock skew. 2. **Error p..."
  },
  "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": "6ed5da824acbecf424013208d86480b7a110468c4dc42b53881536d7bab0db7d",
    "verified_classes": [
      "TraceContextCollapseError",
      "SpanContext",
      "OutboundCall"
    ],
    "verified_functions": [
      "assert_context_continuity"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "TraceContextCollapseError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
