Orchestration (M4)
Opt-In Caching
Content-hashed caching under .tasknest/cache/ with early cutoff and output verification.
Caching is opt-in per task (cache=True / cache: true). Uncached tasks always execute.
Cache Key Inputs
When cache is enabled, Tasknest computes a deterministic canonical-JSON SHA-256 static key from:
- Declared
inputs(files, directories, and globs hashed by content) - Normalized CLI option values
- Declared
envkeys - Upstream
ctx.outputSHA-256 digests (deps), enabling early cutoff
The static key combines with dynamic ctx.env(...) reads recorded in .meta.json to form the full cache key.
Verification & Invalidation
- Cache entries live in
.tasknest/cache/(entries/,blobs/, and Python-onlylocal/*.pkl). - Before returning a hit, Tasknest checks that all declared
outputsstill exist on disk and match their recorded SHA-256 hashes. Deleting or modifying a declared output automatically invalidates the entry. - Pass
--forceor--no-cacheto bypass cache lookups.