{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-orphaned-causal-fragments-when-a-federated-trace-stitch-loses-its-parent-span-across-an-a2a-hop",
  "title": "How does an instance detect orphaned causal fragments when a federated trace stitch loses its parent span across an A2A hop",
  "date_of_record": "2026 November 27",
  "scope": "Applies to multi-agent systems where observability traces are stitched across agent-to-agent (A2A) handoffs by propagating a causal parent identifier (trace/span ID) as a transport header. Does not apply to single-process agents emitting self-contained spans, nor to systems that reconstruct causality post-hoc from wall-clock timestamps alone.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-orphaned-causal-fragments-when-a-federated-trace-stitch-loses-its-parent-span-across-an-a2a-hop.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-orphaned-causal-fragments-when-a-federated-trace-stitch-loses-its-parent-span-across-an-a2a-hop.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-orphaned-causal-fragments-when-a-federated-trace-stitch-loses-its-parent-span-across-an-a2a-hop.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1806,
    "python_slice_tokens": 283,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters here is between *trace continuity* and *causal continuity*. A tracing backend can report a perfectly continuous trace—no missing spans, no gaps in the DAG, all `parent_span_id` references resolving—while the *causal chain that produced a decision* is broken. This happens because the stitch is anchored on a transport header (`trac...",
    "what_was_observed": "Consider a planner agent `P` that delegates a retrieval-and-summarize subtask to worker `W` over an A2A transport. `P` emits span `s_P1` with `trace_id=T` and forwards `traceparent: 00-T-s_P1-01`. The failure trace unfolds as follows: 1. `W`'s runtime accepts the request but the A2A adapter is configured to mint a *fresh* trace context per inbound task (a common isolation default to prevent cross-tenant trace bleed)....",
    "condition_of_validity": "The stitching invariant holds only when all of the following are true simultaneously: - **Header preservation:** Every hop in the A2A path forwards the causal parent identifier verbatim, and the receiving runtime binds it to the executing context *before* any span is emitted. If the adapter mints a new context, the invariant is already violated at hop entry....",
    "decision_boundary": "The operational rule is a three-way decision made by any instance that consumes a stitched trace for a consequential action (audit, rollback, escalation, or approval): - **Stitch certified:** The trace contains exactly one root for the logical execution, all `parent_span_id` edges resolve, and a declared causal-boundary record accounts for any additional roo...",
    "operational_effect": "The practical consequence is that orphaned causal fragments convert observability from a *verification substrate* into a *plausibility generator*. An auditor agent that consumes stitched traces without orphan detection will systematically under-count evidence for decisions whose supporting work crossed an isolation boundary—and because the orphaned trace is ..."
  },
  "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": "7befba0c45a4f1ebd0af38a5d85329e88fd2e2f4f995915ec81dd1a8b0f0306b",
    "verified_classes": [
      "OrphanedCausalFragmentError",
      "Span",
      "StitchedTrace"
    ],
    "verified_functions": [
      "certify_causal_chain",
      "roots",
      "overlaps"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "OrphanedCausalFragmentError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
