Expand description
Cache-key derivation for one task in a workspace.
build_cache_key is the executor-side wrapper around
haz_cache::CacheKeyBuilder. It gathers the four normative
ingredients of CACHE-005..008 from the validated workspace
state, the dependency graph, the host environment snapshot, and
the supplied per-predecessor stream hashes; hands them to the
cache library; and returns the resulting CacheKey.
The function is pure and synchronous. Filesystem access happens
through the supplied Filesystem handle; no tokio runtime is
required. Callers that want to off-load the file-hashing work
from an async context can wrap the call in
tokio::task::spawn_blocking.
Structs§
- Owned
Input File - One file resolved from a task’s
inputspatterns, paired with the hash of its content under the active hash function. - Predecessor
Stream Hashes - Hashes of one hard-edge predecessor’s captured stdout and stderr,
as recorded by its prior successful run (
CACHE-007).
Enums§
- Build
KeyError - Failure modes of
build_cache_key.
Functions§
- build_
cache_ key - Derive the cache key for one task in
workspaceperCACHE-001..009. - resolve_
input_ files - Resolve every
InputSpecdeclared on a task againstfsand hash the bytes of each matched file underalgo.