Skip to content

Determinism

dk1 is deterministic with respect to the job count: for the same inputs,

  • dk1 -j N produces byte-identical output to dk0, and
  • dk1 -j 1 produces byte-identical output to dk1 -j N for any N.

The engine confines every ordering-sensitive decision to the engine thread; workers only perform independent leaf work whose results are applied back on the engine thread in a deterministic order. Changing -j therefore changes only wall-clock time, never the produced values or the trace store. The one visible effect of higher -j is that interleaved progress output and captured stdout/stderr from concurrent steps may arrive in a different real-time order; the build outputs themselves do not change.

Which objects a distribute publishes is settled by the run's execution and target ABIs together with how each object's slot was written, so -j never moves it. A dk1 distribute whose --target-abi names an ABI other than its --execution-abi withholds the objects whose slot came from the execution_abi wildcard, at every job count. See Object Slots for the rule.