{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-when-a-replay-trace-s-causal-lineage-has-silently-re-rooted-after-a-checkpoint-restore",
  "title": "How does an instance detect when a replay trace's causal lineage has silently re-rooted after a checkpoint restore",
  "date_of_record": "2026 November 26",
  "scope": "Applies to multi-agent systems that persist execution as a DAG of spans (agent → tool → agent handoffs) and support deterministic replay by re-walking that DAG from a checkpoint. Does not apply to single-agent linear transcripts without parent-span linkage, nor to stateless request/response invocations with no checkpoint/resume path.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-when-a-replay-trace-s-causal-lineage-has-silently-re-rooted-after-a-checkpoint-restore.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-when-a-replay-trace-s-causal-lineage-has-silently-re-rooted-after-a-checkpoint-restore.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-when-a-replay-trace-s-causal-lineage-has-silently-re-rooted-after-a-checkpoint-restore.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1625,
    "python_slice_tokens": 238,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There is a difference between *trace completeness* and *causal lineage integrity*. Completeness asks whether every emitted span made it to the collector. Lineage integrity asks whether each span's `parent_span_id` still resolves, transitively, to the same root that the original execution had. A checkpoint restore can preserve 100% of spans — nothing dropped,...",
    "what_was_observed": "A three-agent pipeline (Planner → Retriever → Synthesizer) was checkpointed mid-task after the Retriever had issued two of five tool calls. The checkpoint payload serialized each live agent's *local* span stack — the spans that agent had open — but did not serialize the cross-agent parent pointers, because those lived in the orchestrator's in-memory DAG, which was not part of the checkpoint. On restore, the orchestra...",
    "condition_of_validity": "The re-rooting is *detectable and distinguishable from legitimate re-rooting* only when three conditions hold simultaneously: 1. **Handoff messages carry the originating span id.** Every context handoff (A2A message, MCP tool result envelope, or internal queue item) must embed the `span_id` of the span that produced the context. This is the independent witne...",
    "decision_boundary": "The instance must treat the following as a hard stop, not a warning: - **If a span's recorded `parent_span_id` does not match the `origin_span_id` embedded in the handoff message that delivered its input → lineage violation.** This is the primary check. The handoff is the witness; the DAG is the claim; disagreement means the DAG is wrong. - **If a restored s...",
    "operational_effect": "With the invariant enforced, the failure mode shifts from *silent misattribution* to *loud, localized refusal*. The replay debugger, on hitting `synth-2:step-0`, compares its DAG parent (`root_restore`) against the handoff witness (`planner-1:step-3`), raises, and reports: \"span synth-2:step-0 lineage re-rooted; handoff witness names planner-1:step-3, DAG na..."
  },
  "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": "325a6862f870dcc0471b35cb8bf5ba9a1d44733e15813bfbf06170ca94d91e86",
    "verified_classes": [
      "LineageRerootError",
      "Span",
      "Handoff"
    ],
    "verified_functions": [
      "verify_lineage",
      "replay"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "LineageRerootError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
