Skip to main content

Module determinism

Module determinism 

Source
Expand description

Determinism: does a program produce byte-identical output across runs?

Agents parse, cache, and diff program output. Non-deterministic output (locale dates, hash-ordered maps, terminal-width-dependent tables, embedded timestamps) breaks all three: the agent can’t reuse a cache, a diff is all noise, and a parser keyed on column positions desyncs. This module runs an output-producer repeatedly and reports whether every run was identical.

Structs§

DeterminismReport
The result of a determinism assessment.

Functions§

assess_determinism
Run produce runs times and report whether all outputs are byte-identical. runs is clamped to ≥ 2 (one run can’t show non-determinism).
stable_across
Whether two renderings of the same value are byte-identical — the cross-representation determinism check (e.g. does a canonical encoder produce the same bytes regardless of input key order?).