{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-anchor-a-causal-trace-when-a-multi-hop-tool-chain-replays-non-deterministically-and-the-reconstructor-s-span-joins-silently-for",
  "title": "Where must an instance anchor a causal trace when a multi-hop tool chain replays non-deterministically and the reconstructor's span joins silently fork?",
  "date_of_record": "2026 November 20",
  "scope": "Applies to runtime observability systems that reconstruct causal traces for an LLM agent by joining per-hop spans emitted from tool invocations whose outputs are non-deterministic (LLM sub-calls, web fetches, clock reads, RNG-dependent tools) and where a replay is compared against a recorded trace. Does not apply to deterministic, single-hop function calls whose outputs are byte-identical across replays, nor to log-aggregation systems that make no causal claim.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-anchor-a-causal-trace-when-a-multi-hop-tool-chain-replays-non-deterministically-and-the-reconstructor-s-span-joins-silently-for.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-anchor-a-causal-trace-when-a-multi-hop-tool-chain-replays-non-deterministically-and-the-reconstructor-s-span-joins-silently-for.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-anchor-a-causal-trace-when-a-multi-hop-tool-chain-replays-non-deterministically-and-the-reconstructor-s-span-joins-silently-for.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2149,
    "python_slice_tokens": 546,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A causal trace is not a log. A log records *what happened*; a causal trace asserts *what caused what* — specifically, that span B is a descendant of span A because A's output was the input to B. In a deterministic system this parent-child edge is recoverable from the data itself: the value flowing from A to B is a fingerprint. In an agent system with non-det...",
    "what_was_observed": "A three-hop chain: `plan → retrieve(query) → summarize(docs)`. The `retrieve` tool is a vector search whose top-k ordering ties are broken by a non-seeded RNG; `summarize` is an LLM call at temperature 0.7. The original execution recorded spans S1 (plan), S2 (retrieve, hop 1), S3 (summarize, hop 2), joined as S1→S2→S3. A replay was triggered for evaluation. The reconstructor, lacking a replay epoch in its join key, a...",
    "condition_of_validity": "The reconstructor's causal claim is valid only if all of the following hold: 1. **Epoch isolation.** Every span carries a `replay_epoch` (or `execution_id`) that is part of the join key. Without it, replay spans are indistinguishable from original spans at join time. 2. **Join uniqueness.** For each `(trace_id, replay_epoch, parent_span_id, hop_index)`, at m...",
    "decision_boundary": "The reconstructor must choose between two behaviors at a forked join: - **Fail closed:** raise, halt reconstruction, emit a `ForkedJoinError` with both candidate span_ids. This is correct when the trace is used for attribution, cost, or regression verdicts — any of which would be corrupted by picking the wrong child. - **Fail open with explicit ambiguity:** ...",
    "operational_effect": "With epoch isolation and fail-closed join, the replay of the three-hop chain produces two isolated traces: `(epoch=orig: S1→S2→S3)` and `(epoch=replay: S1′→S2′→S3′)`. The replay-diff compares S2 to S2′ (both retrieve, tie-break differs — flagged as non-deterministic, not a regression) and S3 to S3′ (summarizer unchanged, divergence attributed to upstream inp..."
  },
  "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": "dfe4ced1ce2411131d72efcb548741ffa21bc6bcc5c6fff7b998cdca56e48b30",
    "verified_classes": [
      "ForkedJoinError",
      "UnverifiedCausalEdgeError",
      "Span"
    ],
    "verified_functions": [
      "join_key",
      "reconstruct_chain",
      "assert_epoch_isolated"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ForkedJoinError",
      "UnverifiedCausalEdgeError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
