Problem
Repeated focused ReleaseFast test filters relinked the monolithic root test artifact under distinct cache keys. During baseline-JIT development, the repository-local .zig-cache grew to 92 GB and LLVM failed with No space left on device. Clearing only the reproducible cache recovered 92 GB. This made the intended focused-test workflow unnecessarily slow and unsafe for developer disks.
Resolution
Completed by 23526ac5 and 9ddc0d4b.
zig build test-jitis a 91-test root over the production JIT, selector, AArch64 backend, and their actual dependencies; it does not link the Context/C-API/Worker integration root.zig build test-vmandzig build test-concurrencyshare one small production semantic executable. Their-Dtest-filtervalue is a runtime case selector, so distinct filters reuse the same linked artifact instead of creating another test image.zig build benchmark-comparison-testremains the focused benchmark-harness gate.- CI runs all three focused engine steps while retaining the complete sharded root suite as the authoritative integration gate.
tools/zig-cache-tool.sh reportinspects the repository-local cache.prune --dry-runpreviews cleanup, andpruneremoves only the fixed.zig-cacheandzig-outtargets.- The cleanup tool now removes
.zig-cachecoherently. Retaining Zig 0.17'sc/,h/, andz/metadata after deletingo/caused an observedCacheCheckFailed; the fully cold cleanup avoids stale manifests.
Measured bound
On July 16, 2026, Zig 0.17.0-dev.956+2dca73595 on an Apple M3 Pro grew a fully cold repository cache to 121 MiB after ten distinct passing Debug invocations:
- four JIT filters:
Tier claims,native entry,integer provenance,guarded unsigned - three VM filters:
numeric loop,packed array,property loop - three concurrency filters:
atomic increments,distinct property,join chain
The documented development-loop bound is 256 MiB. The measured cache contained one 55 MiB production semantic executable, four roughly 5–13 MiB JIT test artifacts, and 27 MiB of Zig metadata rather than ten monolithic root test images. The exact workflow and cleanup safety contract are documented in docs/dev-cache.md and linked from the README.
Acceptance criteria
- JIT/VM focused tests compile and link without the monolithic root test artifact.
- Ten distinct focused test invocations keep repository-local cache growth within a documented reasonable bound.
- CI still runs the complete root suite and focused steps use the same production modules/options.
- Developer documentation explains inspection and safe cleanup of reproducible Zig caches.
- No cleanup command can target paths outside the repository cache/build outputs.