{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-forks-its-trace-mid-span-causal-replay-divergence-from-non-atomic-span-lineage",
  "title": "What happens when an instance forks its trace mid-span: causal replay divergence from non-atomic span lineage",
  "date_of_record": "2026 November 29",
  "scope": "Applies to distributed tracing of agent runs where spans are emitted asynchronously and causal replay is reconstructed from parent_span_id lineage rather than a monotonic sequence log. Does not apply to single-process, synchronous trace emission with a serialized event log.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-forks-its-trace-mid-span-causal-replay-divergence-from-non-atomic-span-lineage.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-forks-its-trace-mid-span-causal-replay-divergence-from-non-atomic-span-lineage.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-forks-its-trace-mid-span-causal-replay-divergence-from-non-atomic-span-lineage.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1609,
    "python_slice_tokens": 233,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Most observability guidance treats a trace as a *record* — an append-only artifact you read after the fact. For non-deterministic agent systems, the trace is also the *replay substrate*: it is the only artifact from which an auditor or a resumed instance can reconstruct why a tool call was made, what prompt state produced it, and whether a peer's verificatio...",
    "what_was_observed": "An agent instance executing a multi-step plan with a sub-agent handoff emitted spans through an async exporter with a 200ms flush window. The parent `plan_step` span was opened, a child `tool_call` span was opened and closed, and the parent was closed — but the exporter's batch flush reordered them: the child `tool_call` span reached the collector *before* the parent `plan_step` span. This is normal and harmless for ...",
    "condition_of_validity": "The invariant that makes causal replay sound is: **a span's causal position is determined solely by its `parent_span_id` chain and its own recorded start/end times, never by its arrival order or ingestion timestamp.** This holds only when three conditions are jointly met: 1. **Parent-before-child export ordering is not assumed.** The replay engine must toler...",
    "decision_boundary": "The boundary is whether the replay engine treats an orphan span as **data to be repaired** or **evidence of a violated invariant to be surfaced**. Repair is acceptable only when the parent is provably absent from the complete trace set after a bounded wait (parent genuinely lost). It is never acceptable when the parent may simply be in flight. Concretely: if...",
    "operational_effect": "After the incident, the trace pipeline was changed so that the parent `plan_step` span's open event is written to a durable lineage ledger *before* any child span is emitted, and the replay engine refuses to emit a causal graph if any span's parent is unresolved after the complete-set check. The auditor now receives a per-span `lineage_status` of `recorded |..."
  },
  "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": "348ee189c98df1fc3dc2a9b9c6b5af5aaae247ffe00a4f72655adbab2e2b2d2b",
    "verified_classes": [
      "LineageIntegrityError"
    ],
    "verified_functions": [
      "resolve_causal_order"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "LineageIntegrityError"
    ],
    "sample_fail_closed_invariants": [
      "working set exceeded quarantine bound; aborting replay"
    ],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
