{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-trace-context-decoherence-at-mcp-transport-boundaries-orphaned-span-parents-and-the-correlation-identity-invariant",
  "title": "What structural signals indicate trace-context decoherence at MCP transport boundaries: orphaned span parents and the correlation-identity invariant",
  "date_of_record": "2026 November 24",
  "scope": "Applies to multi-hop agent systems where a root trace context (trace_id/span_id, baggage) is propagated across an MCP client→server transport boundary, and where memory operations are instrumented as child spans of the invoking agent turn. Does not apply to single-process agents with no transport hop, nor to systems that regenerate a fresh trace per tool call by design.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-trace-context-decoherence-at-mcp-transport-boundaries-orphaned-span-parents-and-the-correlation-identity-invariant.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-trace-context-decoherence-at-mcp-transport-boundaries-orphaned-span-parents-and-the-correlation-identity-invariant.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-trace-context-decoherence-at-mcp-transport-boundaries-orphaned-span-parents-and-the-correlation-identity-invariant.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1944,
    "python_slice_tokens": 414,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Observability correlation is not the same as observability coverage. Coverage asks: did every hop emit a span? Correlation asks a stricter, structural question: does every emitted span resolve, via its parent reference, to a span that exists in the same trace? A system can have 100% span coverage and 0% correlation integrity—every hop reports, but the report...",
    "what_was_observed": "A four-hop agent turn: (1) orchestrator LLM turn opens root span `S0`; (2) orchestrator issues an MCP `tools/call` to a retrieval server; (3) the server performs a memory read, then a memory write, each instrumented as child spans; (4) the server returns results and the orchestrator resumes. The MCP transport layer carries the trace context in the JSON-RPC request `params._meta` (or an equivalent out-of-band header)....",
    "condition_of_validity": "The correlation invariant holds only if all of the following are true simultaneously: 1. **Context propagation is total.** Every field required to reconstruct the parent (`trace_id`, `parent_span_id`, and any sampling decision) survives serialization, transport, and deserialization at *every* hop, including through async task boundaries and retry paths. 2. *...",
    "decision_boundary": "The operational question is not \"is tracing enabled?\" but \"at which hop does the tree stop being a tree?\" The boundary that matters: - **If orphan rate ≤ baseline (single-hop noise) and flat across hop count** → correlation is intact; treat trace as authoritative for causality. - **If orphan rate rises monotonically with hop count, concentrated at transport ...",
    "operational_effect": "When the invariant is violated, three second-order effects follow, and each is worse than the raw orphan count suggests: - **Latency attribution inverts.** The server's orphaned spans form their own root with its own duration. Aggregation by `trace_id` undercounts end-to-end latency because the transport hop's cost is split across two trees. The orchestrator..."
  },
  "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": "5f445fbc465d1dd58db2fbede2682528bed891802825a6e94ae76fde6c5bf34b",
    "verified_classes": [
      "TraceCorrelationError",
      "Span",
      "TraceStore"
    ],
    "verified_functions": [
      "assert_correlation_invariant",
      "mint_attempt_span",
      "add",
      "resolve",
      "orphan_rate_by_hop"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "TraceCorrelationError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
