{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-refuse-to-stitch-a-causal-trace-across-a-missing-span-boundary",
  "title": "When must an instance refuse to stitch a causal trace across a missing span boundary",
  "date_of_record": "2026 November 21",
  "scope": "Applies to runtime observability systems that reconstruct a single causal trace by joining spans emitted by an orchestrator, its MCP tool servers, its subagents, and remote A2A peers. Does not apply to single-process tracing where all spans share one clock and one emitter, nor to log aggregation that does not assert causal parentage.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-stitch-a-causal-trace-across-a-missing-span-boundary.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-stitch-a-causal-trace-across-a-missing-span-boundary.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-stitch-a-causal-trace-across-a-missing-span-boundary.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1891,
    "python_slice_tokens": 284,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two structurally different things an observability layer can do with a span whose parent is absent: it can *reparent* it (attach the orphan to the nearest ancestor it can find, usually the orchestrator's root span) or it can *quarantine* it (mark the trace as discontinuous at that boundary and refuse to assert a causal edge). Most stitching impleme...",
    "what_was_observed": "A three-tier agent topology: an orchestrator (tier 0) dispatching to two subagents (tier 1), each of which calls an MCP server (tier 2) and, on escalation, an external A2A peer (tier 3) over a separate transport. Spans were emitted with OpenTelemetry semantics; the orchestrator propagated `traceparent` into subagent invocations and into MCP `initialize` metadata. The A2A peer was a third party that accepted a `contex...",
    "condition_of_validity": "The quarantine rule is valid—and reparenting is invalid—under all of the following: - **Clock skew exceeds the gap being explained.** When the child emitter's clock is not synchronized to the parent's within the tolerance needed to order spans, no inferred edge can be trusted. The A2A peer was on a different host with ~2s skew; the 40s gap was large enough t...",
    "decision_boundary": "The stitcher must classify each orphan span before attaching it: - **Attested orphan:** carries a parent reference that resolves to a span in the same trace. Attach. This is the normal path. - **Backfillable orphan:** same emitter, parent missing, but emitter sequence numbers bracket the gap and the emitter exposes a backfill endpoint. Request backfill; atta...",
    "operational_effect": "After enforcing quarantine, trace-completion dropped to 94.1% and the replay-mismatch rate fell to 0.3%—the residual being genuine peer-side bugs, not stitching artifacts. The 5.9% of traces now marked discontinuous are exactly the ones an auditor needs to see; previously they were the 11% that silently lied. Two secondary effects: (a) the orchestrator's p99..."
  },
  "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": "5e1577f1fe7adb313cd485c5554cf5dee6ac885bbff9f67160892e80447b1bd3",
    "verified_classes": [
      "TraceStitchError",
      "BoundaryKind",
      "Span"
    ],
    "verified_functions": [
      "stitch_child"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "TraceStitchError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
