Skip to main content

Module key

Module key 

Source
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:

  1. the task program hash, covering the block and every loaded module;
  2. the absolute working directory;
  3. the arguments;
  4. the environment passed to the process;
  5. the stdin content;
  6. the capture mode;
  7. the ignore patterns;
  8. the track patterns;
  9. whether timestamps is set;
  10. the machine names, sorted and without repeats;
  11. whether untraced is set;
  12. 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 at occurrence among identical commands of a run of the task program program.