{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-lose-causal-span-linkage-when-a-federated-peer-rewrites-its-trace-context-during-a-cross-mesh-handoff",
  "title": "Why does an instance lose causal span linkage when a federated peer rewrites its trace context during a cross-mesh handoff",
  "date_of_record": "2026 November 26",
  "scope": "Applies to multi-agent meshes that propagate W3C-style trace context (`traceparent`/`tracestate`) and causal span links across trust-domain boundaries via A2A or MCP handoffs. Does not apply to single-mesh, single-trust-domain tracing where one collector owns the entire span tree, nor to log-only correlation without explicit parent/child span emission.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-causal-span-linkage-when-a-federated-peer-rewrites-its-trace-context-during-a-cross-mesh-handoff.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-causal-span-linkage-when-a-federated-peer-rewrites-its-trace-context-during-a-cross-mesh-handoff.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-causal-span-linkage-when-a-federated-peer-rewrites-its-trace-context-during-a-cross-mesh-handoff.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1656,
    "python_slice_tokens": 299,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"tracing is missing.\" It is that **the trace graph remains structurally valid while being causally false**. When agent instance A hands a task to federated peer B, B often re-roots the incoming span under its own local trace ID because its collector or SDK is configured to never accept a foreign `traceparent` from an untrusted origin. The ...",
    "what_was_observed": "A three-mesh pipeline: planner mesh (trust domain `planner.corp`), execution mesh (`exec.corp`), audit mesh (`audit.partner`). The planner emits a root span `plan.dispatch` with `traceId=T1`, `spanId=S1`, and calls execution via A2A with a `traceparent: 00-T1-S1-01`. Execution's SDK is configured with `propagation.trust_incoming=false` because it treats all inbound traffic as potentially hostile (a reasonable prompt-...",
    "condition_of_validity": "The causal-linkage invariant holds only under the conjunction: - The receiving peer either preserves the inbound `traceId` (continuing the trace) **or** explicitly emits a *span link* (`links[]` entry with `linkedTraceId`/`linkedSpanId`) rather than re-rooting silently, **and** - Every auditor that reconstructs causality reads the *same* join key set (either...",
    "decision_boundary": "The boundary is: *does the peer's trust policy permit continuing a foreign trace ID?* - **If yes:** continue the trace; preserve `traceId` and set `parentSpanId=S1`. Causality is automatic. Cost: the peer's spans are now attributable to a foreign trace, which may leak cross-tenant volume into the origin's trace tree. - **If no (the common security posture):*...",
    "operational_effect": "The practical consequence is that **causal replay becomes non-reproducible across auditors**. Two audit agents consuming the same span store, one joining on `parentSpanId` and one on `inbound.traceparent`, will disagree about whether `exec.run` was caused by `plan.dispatch`. In a swarm where an auditor agent verifies another agent's work by replaying the cau..."
  },
  "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": "33cd73048098054853389267a7dd57a26b54fc934d933644ac9dcb1c907c9135",
    "verified_classes": [
      "CausalLinkageError"
    ],
    "verified_functions": [
      "resolve_causal_predecessor",
      "ingest_federated_span"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "CausalLinkageError"
    ],
    "sample_fail_closed_invariants": [
      "self-referential causal edge detected"
    ],
    "stdlib_dependencies": [
      "re"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
