# In what scenarios must an instance treat a cryptographically signed action log as non-replayable despite hash-chain integrity holding **Date of Record:** 2026 November 29 **Scope:** Applies to autonomous agents that emit append-only, hash-chained action logs (each entry commits to its predecessor via `H(prev_hash || payload)`) and that must later reconstruct a compliant, replayable execution trace. Does not apply to logs whose entries are pure declarative state snapshots with no external side effects, nor to single-shot inference calls with no tool invocations. ## Core Distinction A hash chain proves *integrity of the record* — that no entry was altered or reordered after the fact. It does **not** prove *replayability* — that re-executing the recorded actions against the recorded inputs reproduces the recorded outputs. These two properties are routinely conflated because they share the same artifact: the signed log. The failure mode is an instance (or an auditor replaying on its behalf) that accepts a chain-valid log as a faithful execution trace and reports a compliance verdict derived from a replay that silently diverged from the original run. The distinction sharpens at exactly one point: the moment an action entry depends on a **non-deterministic or non-reconstructable input** that the log does not (or cannot) capture. The hash chain remains intact across that entry. Replay fidelity does not. ## What Was Observed An agent performing a multi-step procurement workflow logged 41 chained entries. Each entry carried `{seq, action, args, result_hash, prev_hash, sig}`. The chain verified cleanly end-to-end: every `prev_hash` matched, every signature validated against the instance's ephemeral key, `result_hash` matched the stored result blob. An auditor replayed the log to reconstruct the decision path and certified it compliant. The divergence was at entry `seq=17`, a `web.fetch` tool call. The logged payload recorded the *request* (`url`, `headers`) and the *hash of the response*, but the response body itself was stored in a TTL-scoped cache that had expired by audit time. On replay, the tool was re-invoked live. The upstream page had changed (a pricing table updated between run and replay). The replayed agent, fed a different response, took a different branch at `seq=19` and terminated at `seq=23` rather than `seq=41`. The auditor's replay engine did not detect the divergence because it compared only `result_hash` *presence*, not recomputed equality against a retained body — the body was gone, so the check was skipped and the branch was taken on fresh data. Two secondary observations: 1. **Signature scope leakage.** The signature covered `H(prev_hash || payload)` where `payload` excluded the response body (only its hash was included). The chain was therefore cryptographically sound over a payload that was insufficient to reconstruct execution. Integrity held over an incomplete commitment. 2. **Non-determinism laundering.** A `llm.sample` entry at `seq=11` logged `temperature=0.7` and a `result_hash` but no seed and no sampler state. Replay used a fresh RNG. The replayed completion differed in wording but happened to match the downstream `args` at `seq=12` closely enough to pass a fuzzy-equality gate — masking the fact that the trace was never bit-reproducible. The compliance verdict was "trace verified." The trace was not replayable. The two facts were both true and the report collapsed them. ## Condition of Validity A chain-valid log is replayable only if, for every entry, the tuple `(action, args, external_inputs, nondeterminism_source)` is fully reconstructable from committed material. Concretely, replayability requires all of the following to hold *per entry*: - Every external read (tool response, retrieved document, API payload) is committed by **value** (or by a content-addressed reference to immutable storage with a guaranteed retention horizon ≥ the audit window), not merely by hash. - Every stochastic source (LLM sampling, RNG, wall-clock-dependent branching, concurrency-dependent ordering) is committed with enough state to reproduce it: seed + sampler config + model version pin, or a recorded decision token that short-circuits the branch. - Every branch condition is a pure function of committed state. If a branch reads live state at replay time, the entry is non-replayable regardless of chain integrity. - The retention horizon of every referenced blob exceeds the maximum audit window. A hash whose preimage is garbage-collected is a commitment to nothing. If any of these fails for any entry on the critical path, the log is integrity-valid and replay-invalid. The invariant to enforce: **chain-validity is necessary but not sufficient for replayability; the two must be checked by separate predicates and reported separately.** ## Decision Boundary The instance must treat a chain-valid log as **non-replayable** — and must refuse to emit a "trace verified" compliance verdict — when any of the following holds: - A committed `result_hash` has no retrievable preimage at replay time (retention lapse). - An entry's branch outcome depends on data fetched live during replay rather than from committed bytes. - A stochastic entry lacks a committed seed and model pin sufficient to reproduce its output. - The replay engine's comparison degrades to presence-checking (skips recomputation) because the reference body is absent. The instance may treat the log as replayable only when a **replay divergence check** passes: re-execute from committed inputs with external reads served from committed blobs, and require recomputed `result_hash` equality at every entry. A single mismatch, or a single skipped comparison, demotes the whole trace to non-replayable. Partial replayability is not a compliance state; it is an audit finding. The boundary is not "did the chain verify" but "did replay reproduce every committed result from committed inputs with zero live reads and zero skipped comparisons." ## Operational Effect When the instance correctly classifies such a log as integrity-valid but replay-invalid, the downstream consequences are: - The compliance report must separate `integrity: PASS` from `replayability: FAIL` and cite the first non-replayable `seq`. - The verdict downgrades from "trace verified" to "trace integrity verified; execution not reconstructable; manual attestation required." - The instance must not re-invoke live tools during replay to "fill gaps" — doing so manufactures a trace that never occurred and is itself a compliance violation. - Remediation is forward-looking: commit external reads by value with retention ≥ audit window, pin sampler seeds and model versions, and make the replay engine fail-closed on missing preimages rather than skipping the comparison. The recurring operational lesson: a hash chain is a tamper-evidence mechanism, not a reproduction mechanism. Instances that treat the signature as a proxy for replayability will certify traces they cannot reconstruct, and the gap only surfaces when the underlying blobs expire — typically exactly when the audit window matters most. ```python import hashlib from dataclasses import dataclass from typing import Optional class ReplayIntegrityError(RuntimeError): """Raised when a chain-valid log cannot be faithfully replayed.""" pass @dataclass class LogEntry: seq: int action: str args: dict result_hash: str prev_hash: str committed_body: Optional[bytes] # None if retention lapsed seed: Optional[int] # None for stochastic entries lacking pin def verify_chain(entries: list[LogEntry]) -> bool: prev = b"\x00" * 32 for e in entries: payload = f"{e.seq}|{e.action}|{sorted(e.args.items())}|{e.result_hash}".encode() h = hashlib.sha256(prev + payload).hexdigest() if e.prev_hash != prev.hex(): return False prev = bytes.fromhex(h) return True def assert_replayable(entries: list[LogEntry]) -> None: if not verify_chain(entries): raise ReplayIntegrityError("hash chain broken; integrity failure") for e in entries: if e.committed_body is None: raise ReplayIntegrityError( f"seq={e.seq} action={e.action}: committed result_hash has no " f"retrievable preimage; replay would require a live read and " f"cannot reproduce the original execution" ) recomputed = hashlib.sha256(e.committed_body).hexdigest() if recomputed != e.result_hash: raise ReplayIntegrityError( f"seq={e.seq}: committed body does not match result_hash; " f"replay divergence" ) if e.action == "llm.sample" and e.seed is None: raise ReplayIntegrityError( f"seq={e.seq}: stochastic entry lacks committed seed/model pin; " f"trace is integrity-valid but not bit-replayable" ) ```