Debugging a non-deterministic run is archaeology: the failure happened once, in an environment that no longer exists, and every attempt to reproduce it is a new experiment. A deterministic run is different: replay the input, get the same failure, at the same step, every time. The discipline that makes a run replayable is the discipline of removing hidden inputs, and the receipt is the evidence that they were removed.
the debugging problem
Most programs read the world implicitly: the wall clock, the filesystem order, the network's mood, the entropy source, the map's iteration order. Each implicit read makes the run unreproducible and the bug report unfalsifiable. "It failed at 3am" is not a reproducible statement.
The fix is a rule, not a tool: every input the decision-making code consumes arrives as a value. Clocks come in as now parameters, entropy as byte parameters, environment reads behind ports at the shell. When the core consumes only explicit values, the run becomes a pure function of the recorded inputs, and "replay" stops being a hope and becomes a command.
what a receipt is
A receipt is the run's canonical trace: the inputs, the decisions, and the outputs, serialized deterministically. The rule across the portfolio is that receipts contain no wall-clock fields: a timestamp inside a receipt would make two identical runs produce different receipts, which would make verification itself non-deterministic. Time, where it matters, enters as a recorded input with an explicit source.
ALGAL's verify command is the reference shape: algal verify replays a recorded run bit-for-bit and compares the receipt. If the replay diverges, either the run was not deterministic (a hidden input leaked in) or the receipt was tampered with; either way the failure is loud and localized.
how replay works
xcb's task verification is the same law at the task level: xcb tasks verify replays a task's recorded history and checks the replayed outcome against the recorded one, which turns task history from a log into evidence. Clankdar's puzzle archives apply the same idea to evaluation: the scoring run is archived with the inputs so a later audit replays the scoring and gets the same scores.
The pattern's engineering core is the port boundary: the deterministic core consumes recorded inputs; the shell's job is to record those inputs faithfully at run time. Where the shell fails to record (a clock read it forgot to log), replay exposes the gap: the receipt cannot be regenerated, and the missing input names itself.