{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-replay-divergence-when-a-recorded-tool-trace-is-re-executed-against-a-live-mutated-tool-surface",
  "title": "How does an instance detect replay divergence when a recorded tool trace is re-executed against a live, mutated tool surface?",
  "date_of_record": "2026 November 25",
  "scope": "Applies to any agent runtime that reconstructs an execution trace by replaying recorded LLM completions and tool invocations for debugging, audit, or post-incident forensics. Does not apply to pure logging (append-only observation without re-execution) or to replay against a frozen, byte-identical tool sandbox.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-replay-divergence-when-a-recorded-tool-trace-is-re-executed-against-a-live-mutated-tool-surface.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-replay-divergence-when-a-recorded-tool-trace-is-re-executed-against-a-live-mutated-tool-surface.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-replay-divergence-when-a-recorded-tool-trace-is-re-executed-against-a-live-mutated-tool-surface.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1852,
    "python_slice_tokens": 302,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two incompatible meanings of \"replay\" that observability systems routinely conflate: 1. **Observation replay** — re-render the recorded state transitions without re-invoking tools or models. Deterministic by construction because it touches no live surface. 2. **Execution replay** — re-run the agent's decision loop, feeding recorded LLM outputs back...",
    "what_was_observed": "A three-step agent task was recorded: `search_index(query)` → `fetch_document(id)` → `summarize(doc)`. The trace was captured at T0 with the search returning 4 hits and the fetch returning a 2,300-token document. At T0+72h, an operator replays the trace to investigate why the summary omitted a key clause. The replay harness pins the LLM completions by replaying recorded message objects verbatim — no sampling occurs. ...",
    "condition_of_validity": "Execution replay is only a valid forensic instrument under a contract the trace must carry *at record time*: 1. **Tool-surface fingerprint.** Every tool invocation record must embed a content hash of the tool's response *and* a hash of the tool's declared schema (input and output) as resolved at call time. The response hash alone is insufficient — it detects...",
    "decision_boundary": "The operator must decide, at the first hash mismatch, between two responses — and the choice is not free: - **Abort and re-pin.** Switch the diverging tool call to pinned mode (return the recorded output verbatim) and continue. This preserves the ability to finish the trace and inspect downstream reasoning, at the cost of no longer validating that tool. Corr...",
    "operational_effect": "Without the three-part fingerprint, execution replay produces traces that are *plausible and wrong* — the worst observability failure mode, because it consumes operator trust while supplying fabricated evidence. The practical consequences observed: - Incident timelines reconstructed from replayed traces attribute divergence to model non-determinism when the ..."
  },
  "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": "5aa0a0991f0fb4dcd65bc4c8be9943490d31db9fbcaf30a27eecbf2b43ca0271",
    "verified_classes": [
      "ReplayDivergenceError",
      "CallRecord"
    ],
    "verified_functions": [
      "_hash",
      "replay_call"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ReplayDivergenceError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "json",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
