Skip to main content

Crate haz_cache_key

Crate haz_cache_key 

Source
Expand description

Cache-key derivation from workspace state for haz.

The seam between haz-cache’s pure cache-key serialisation and the workspace state a key is derived from. build_cache_key gathers a task’s resolved inputs, its hard-predecessor stream hashes, and its environment from the validated workspace, and folds them into a haz_cache::CacheKey; resolve_input_files exposes just the input-resolution step for read-only consumers.

The derivation is pure and synchronous (no tokio runtime), so both the executor (haz-exec) and the read-only haz why introspection path depend on this crate without either pulling the other in.

pattern_walk is the shared path-pattern projection and recursive filesystem walker that input resolution builds on; the executor reuses the same walker for output materialisation.

Modules§

pattern_walk
Shared kernel for resolving a task’s InputSpec / OutputSpec patterns against the filesystem.

Structs§

OwnedInputFile
One file resolved from a task’s inputs patterns, paired with the hash of its content under the active hash function.
PredecessorStreamHashes
Hashes of one hard-edge predecessor’s captured stdout and stderr, as recorded by its prior successful run (CACHE-007).

Enums§

BuildKeyError
Failure modes of build_cache_key.

Functions§

build_cache_key
Derive the cache key for one task in workspace per CACHE-001..009.
resolve_input_files
Resolve every InputSpec declared on a task against fs and hash the bytes of each matched file under algo.