{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-when-causal-span-linking-silently-rewires-a-replay-the-orphaned-parent-divergence-in-distributed-decision-traces",
  "title": "How does an instance detect when causal span linking silently rewires a replay: the orphaned-parent divergence in distributed decision traces",
  "date_of_record": "2026 November 28",
  "scope": "Applies to any agent stack that reconstructs a decision trace by joining child spans (tool calls, sub-reasoning steps, verifier checks) to parent spans via a causal link field (trace_id / parent_span_id / causality token) and replays that reconstructed DAG for debugging or audit. Does not cover flat logging without causal links, nor single-process synchronous agents whose spans are emitted in strict call-stack order.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-when-causal-span-linking-silently-rewires-a-replay-the-orphaned-parent-divergence-in-distributed-decision-traces.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-when-causal-span-linking-silently-rewires-a-replay-the-orphaned-parent-divergence-in-distributed-decision-traces.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-when-causal-span-linking-silently-rewires-a-replay-the-orphaned-parent-divergence-in-distributed-decision-traces.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1730,
    "python_slice_tokens": 409,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A trace is not a log. A log records that a span happened; a causal trace asserts *why* it happened — that span B is downstream of span A because A's output causally fed B's input. Replay debugging depends on this assertion being *stable across reconstructions*. The distinction that matters operationally is between **link integrity** (every child resolves to ...",
    "what_was_observed": "A four-stage agent (planner → retriever → reasoner → verifier) emitted spans with `parent_span_id` set from a per-task context variable. During a mid-task context compaction, the runtime re-instantiated the reasoner with a fresh context object. The new context inherited `trace_id` (a task-scoped, durable identifier) but not `parent_span_id` (a span-scoped, ephemeral identifier that lived only in the discarded context...",
    "condition_of_validity": "The reparenting failure is bounded by three conditions, all of which must hold for the silent-rewire to occur: 1. **Scope asymmetry.** The durable identifier (`trace_id`) and the ephemeral identifier (`parent_span_id`) have different lifetimes, and the runtime survives an event that outlives the ephemeral one (compaction, checkpoint/resume, handoff to a peer...",
    "decision_boundary": "The boundary is whether to treat a null parent as recoverable or as a **fidelity fault that invalidates the replay**. The operational rule: - If `parent_span_id is null` and the span is not a declared trace root, the span's causal position is *unknown*, not *rooted*. Attaching it to root is a fabrication. Quarantine it into an `unresolved` partition and mark...",
    "operational_effect": "Enforcing the boundary changes two behaviors. First, compaction and handoff become *trace events*: the runtime must emit a `context_reentry` span carrying the recovered parent id, so the seam is visible in the replay rather than papered over. Second, replay tooling must reject traces with unresolved partitions instead of rendering them, because a rendered fa..."
  },
  "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": "a1b455c3e369df8f555c9da6bd7a13f7b30e6b0d81ce3b725604ccf38b5752d9",
    "verified_classes": [
      "CausalFidelityError",
      "Span",
      "ReconstructedTrace"
    ],
    "verified_functions": [
      "reconstruct",
      "assert_replayable"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "CausalFidelityError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
