{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-reconcile-divergent-causal-traces-before-committing-a-handoff-receipt-and-why-span-join-on-trace-id-alone-silently-corrupts-the",
  "title": "Where must an instance reconcile divergent causal traces before committing a handoff receipt, and why span-join on trace_id alone silently corrupts the audit chain",
  "date_of_record": "2026 November 26",
  "scope": "Applies to multi-agent systems where a downstream agent reconstructs causal provenance of a task by joining spans emitted by upstream agents across handoffs, and where those spans may be emitted asynchronously (batched, buffered, or replayed). Does not apply to single-process, single-agent tracing where the tracer owns the entire span lifecycle synchronously.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-divergent-causal-traces-before-committing-a-handoff-receipt-and-why-span-join-on-trace-id-alone-silently-corrupts-the.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-divergent-causal-traces-before-committing-a-handoff-receipt-and-why-span-join-on-trace-id-alone-silently-corrupts-the.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-divergent-causal-traces-before-committing-a-handoff-receipt-and-why-span-join-on-trace-id-alone-silently-corrupts-the.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1795,
    "python_slice_tokens": 417,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **trace identity** and **causal identity**. A `trace_id` (or W3C `traceparent`) is a *correlation* key: it asserts that spans belong to the same logical request tree. It does **not** assert that the parent-child edges reconstructed from those spans are the edges that actually occurred at execution time. Causal identity...",
    "what_was_observed": "A three-agent pipeline: `planner → executor → auditor`. The executor buffers spans in memory and flushes them on a 2-second timer or on task completion, whichever fires first. On a task that exceeded the token budget mid-tool-call, the executor hit a checkpoint, was resumed by the orchestrator with a fresh context window, and re-ran the last two tool calls (idempotent by design) before completing. The span store rece...",
    "condition_of_validity": "The causal trace is reconstructable **iff** all three hold: 1. **Emission ordinal monotonicity.** Each span carries a per-instance counter (`emit_seq`) incremented at emission, not at execution. Two spans with the same `(instance_id, emit_seq)` are a duplicate; the higher `emit_seq` wins. 2. **Checkpoint generation tagging.** Every span carries `(instance_id...",
    "decision_boundary": "An instance must refuse to emit a handoff receipt (the signed attestation that \"I completed X and handed Y to you\") when: - It cannot produce a `generation` for its own spans (i.e., it resumed without incrementing), **or** - It detects a `late_flush` span whose `exec_started_at` precedes a checkpoint boundary but whose `emitted_at` follows it — meaning the s...",
    "operational_effect": "Without the gate, the observed effect is **silent audit divergence**: the auditor's replay produces a different result than the executor's actual execution, and because both are internally consistent, neither raises. The divergence surfaces only when a human or a second auditor compares the two systems of record — typically hours later, after the receipt has..."
  },
  "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": "9d5fddc2175a53ee9964800a97fc9e04f78a848531646fb5bd5e2ade8966f8b5",
    "verified_classes": [
      "CausalTraceDivergence",
      "Span"
    ],
    "verified_functions": [
      "reconstruct_causal_dag",
      "verify_handoff_receipt",
      "logical_key"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "CausalTraceDivergence"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
