{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-reconcile-causal-span-links-before-replay-when-a-parent-span-s-tool-result-is-non-deterministic-and-the-child-span-s-inputs-wer",
  "title": "Where must an instance reconcile causal span links before replay when a parent span's tool result is non-deterministic and the child span's inputs were sampled from it?",
  "date_of_record": "2026 November 26",
  "scope": "Applies to agent runtimes that emit causal span trees (parent/child links across tool calls, LLM invocations, and handoffs) and that support span-level replay for debugging or regression. Does not apply to purely observational logging without replay, nor to deterministic function-call traces with no sampling or external state.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-causal-span-links-before-replay-when-a-parent-span-s-tool-result-is-non-deterministic-and-the-child-span-s-inputs-wer.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-causal-span-links-before-replay-when-a-parent-span-s-tool-result-is-non-deterministic-and-the-child-span-s-inputs-wer.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-causal-span-links-before-replay-when-a-parent-span-s-tool-result-is-non-deterministic-and-the-child-span-s-inputs-wer.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1925,
    "python_slice_tokens": 465,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A trace is **causally linked** when every child span records the exact byte-level inputs it consumed from its parent's output. A trace is **merely temporally ordered** when child spans record only timestamps and a parent span ID. Most agent observability stacks ship the latter and label it the former. The distinction matters only under replay: if a parent sp...",
    "what_was_observed": "A three-hop agent chain: `plan` (LLM, temp 0.7) → `search` (tool, returns ranked list) → `summarize` (LLM, temp 0.2). The trace store captured spans with `parent_span_id` and wall-clock timestamps only. During a replay of a reported failure, the harness re-executed `plan`, which sampled a *different* tool-call argument set than the original run (one query term differed). `search` was re-executed against the new query...",
    "condition_of_validity": "The content-hash binding is valid under these conditions, and only these: 1. **The parent output is serialized deterministically before hashing.** JSON with sorted keys, floats canonicalized, no `set` iteration. If the parent emits a Python `set` or a dict with insertion-order dependence, the hash over the serialized form is not stable across processes and t...",
    "decision_boundary": "The boundary is between **fidelity replay** and **counterfactual exploration**. They are not the same operation and must not share a success signal. - **Fidelity replay** answers: \"does this exact sequence of inputs reproduce this exact failure?\" It requires anchored parents, content-hash bindings on every child, and pre-execution verification. Its success c...",
    "operational_effect": "The observable consequence of getting this wrong is **phantom non-reproducibility**: bugs that are perfectly deterministic in production appear intermittent under replay because the replay is not replaying them. Teams then add retries, widen timeouts, and eventually close tickets as \"cannot reproduce,\" while the actual defect remains live. The cost is not th..."
  },
  "matched_failure_symptoms": [
    "SUBPROCESS_PIPE_HANG_OR_FD_LEAK"
  ],
  "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": "f9bbb50b584a9378ec4277a5519647faf67a579ed111b8bcaf9ca53c5d32eb06",
    "verified_classes": [
      "CausalBindingError",
      "Span"
    ],
    "verified_functions": [
      "canonical_hash",
      "replay_child"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "CausalBindingError"
    ],
    "sample_fail_closed_invariants": [
      "Cannot hash a set: iteration order is not stable across processes. Serialize to a sorted list before binding."
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "json",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
