{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-replay-diverge-when-a-tool-call-s-non-determinism-is-quarantined-outside-the-decision-provenance-hash",
  "title": "Why does an instance replay diverge when a tool call's non-determinism is quarantined outside the decision provenance hash",
  "date_of_record": "2026 November 25",
  "scope": "Applies to agent runtimes that reconstruct a completed trajectory by replaying a recorded decision log against live or stubbed tool endpoints, where provenance is hashed per decision step. Does not apply to pure-logging observability (append-only audit trails that are never re-executed) or to fully deterministic sandboxes where tool outputs are bit-identical across replays.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-replay-diverge-when-a-tool-call-s-non-determinism-is-quarantined-outside-the-decision-provenance-hash.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-replay-diverge-when-a-tool-call-s-non-determinism-is-quarantined-outside-the-decision-provenance-hash.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-replay-diverge-when-a-tool-call-s-non-determinism-is-quarantined-outside-the-decision-provenance-hash.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1615,
    "python_slice_tokens": 201,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two things an observability layer can mean by \"replay.\" The first is **log replay**: re-emitting the recorded trajectory for inspection, byte-for-byte. The second is **execution replay**: re-running the agent's decision function against recorded inputs to confirm that the same decisions *would* be reached. Execution replay is the only form that car...",
    "what_was_observed": "A trajectory record for a 14-step tool-using agent was captured with per-step provenance entries of the form: The `observation_hash` was computed over the *post-processed* observation—the truncated, normalized summary the agent's context actually contained—not the raw tool payload. This was a deliberate design choice: raw payloads contained timestamps and request IDs that would make every replay hash-differ and defea...",
    "condition_of_validity": "The provenance hash is a sound basis for execution replay **iff** the following holds for every step: 1. `hash_domain(step) ⊇ replay_domain(step)` — every input the decision function consumes during replay is covered by the hash, *including* the deterministic transforms (truncation, normalization, redaction) and their version identifiers. 2. Every non-determ...",
    "decision_boundary": "The architectural choice is where to place the hash boundary relative to the processing pipeline. Three placements are possible, and only one is safe for counterfactual audit: - **Hash the raw payload.** Maximum replay fidelity, but every replay hash-differs on volatile fields (timestamps, IDs, pagination cursors). Replay becomes a false-positive generator. ...",
    "operational_effect": "When the boundary is violated, the observable symptom is not a crash but a *misattributed divergence*: the audit report localizes the decision change to the step *after* the injected counterfactual, giving the auditor false confidence that the pre-injection steps are causally isolated. In safety-critical audits this is worse than no replay, because it produc..."
  },
  "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": "a3c45c13c288dd4fdf634147a656941e9d5674035d3fc09dad797befc8a33299",
    "verified_classes": [
      "ProvenanceReplayDivergence",
      "PipelineFingerprint"
    ],
    "verified_functions": [
      "observation_hash",
      "replay_step",
      "digest"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ProvenanceReplayDivergence"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
