Expand description
Step keys.
A step’s key is a BLAKE3 hash, derived with the versioned context string
STEP_KEY_CONTEXT, of a CBOR encoding, written with minicbor, of exactly
these values, in this order:
- the task program hash, covering the block and every loaded module;
- the absolute working directory;
- the arguments;
- the environment passed to the process;
- the
stdincontent; - the capture mode;
- the ignore patterns;
- the
trackpatterns; - whether
timestampsis set; - the
machinenames, sorted and without repeats; - whether
untracedis set; - the occurrence number, which counts identical commands earlier in the same task run.
The encoding is deterministic: one definite-length array of the twelve values,
definite lengths throughout, and the environment as a map sorted by name. So the
same step always produces the same key. always, stream, expect, and network
are not in the key, because they change what kizz does with a step, not what the
command does. timestamps is in the key, because a record made without it keeps the
timestamps of its latest cache hit. The machine names are in the key, like the
track patterns, because they decide what the cache check compares.
Structs§
- KeyError
- A step whose key values could not be encoded.
- Occurrences
- Counts identical commands in one run of a task, so a command repeated in the task gets one key for each occurrence.
Constants§
- STEP_
KEY_ CONTEXT - The context string from which step keys are derived. A change to the values in the key or to their encoding changes the version at its end.
Functions§
- step_
key - The key of
spec, the step atoccurrenceamong identical commands of a run of the task programprogram.