Repository navigation
Description
Part of the 2026 Q4 plan (P0).
Goal
Tools such as Vitest, TypeScript and Astro read and rewrite their own cache files, and many build tools read back the folders they write. vp run used to refuse to cache a task whose reads and writes overlap. Cache these tasks without manual exclusions in cache.input or cache.output, and make every hit and miss explainable, so a person or an AI agent can tell why a task missed and what would make it hit.
The remote cache depends on this. In trials on real workspaces, most tasks either couldn't be cached or missed on every fresh checkout.
Done
- Cache tasks that rewrite files they read: feat(cache): cache tasks that rewrite files they read #913
- Restore output symlinks as links: fix(cache): restore symlinks in task outputs as links #885, test(cache): check that cache hits restore output symlinks as links #911
- pnpm's own files no longer break hits: fix(cache): leave noisy fields of pnpm's .modules.yaml out of its fingerprint #823, fix(cache): fingerprint only whether files in node_modules/.bin exist #824, fix(cache): stop tracking pnpm's workspace state files #825, fix(cache): fingerprint only whether node_modules/.modules.yaml exists #850
- Miss explanations: fix(summary): say "modified its inputs" and use singular counts #783, feat(summary): show how to exclude a read-and-written file in --last-details #784
- Earlier groundwork: feat: skip caching tasks that modify their inputs #248 (skip caching tasks that modify their inputs), feat(cache): honor runner ignored inputs #431 and feat(cache): honor runner ignored outputs #459 (inputs and outputs that tools ask
vp runto ignore)
In progress
Merge in this order:
- feat(cache): let a hit rebuild folders that hold only the task's outputs #914 Let a hit rebuild folders that hold only the task's outputs
- feat(cache): let a listed folder lack entries a hit can rebuild #915 Let a listed folder lack entries a hit can rebuild
- feat(cache): treat files and folders renamed into place as outputs #916 Treat files and folders renamed into place as outputs (fixes Automatic output tracking misses files a task renames into place, so a cache hit restores nothing #908)
- feat(cache): let a hit rebuild empty folders the task made #917 Let a hit rebuild empty folders the task made
- feat(cache): restore symlinks a task creates #918 Restore symlinks a task creates
- fix(cache): stop skipping dist in directory listings #919 Stop skipping
distin directory listings
Diagnostics: with the new rules, people and AI agents need to see why a task missed more than before. RFC: #933 (vp run --dry-run with every miss reason, and vp run --json for the task graph; #791, voidzero-dev/vite-plus#2848).
Next
- Windows fspy reports the workspace root as a read-write overlap and prevents caching #548 Windows reports the workspace root as a read-write overlap
- On macOS, files cp writes are not recorded as outputs, although fspy swaps cp for its bundled coreutils #910 Files
cpwrites on macOS aren't recorded as outputs - Define precise disableCache trigger points for uncacheable operations #482 Tools disable caching too early (
disableCachetrigger points) - An input edited while a cached task runs is fingerprinted after the run, so the next run replays output built from the old content #905 An input edited while the task runs is fingerprinted after the run
Related pull requests from contributors
- fix(cache): fingerprint only whether files a task probes exist #869 Fingerprint only whether probed files exist (Existence probes of pnpm-workspace.yaml become content inputs, so any manifest edit misses every task #860)
- feat(cache): skip reads inside directories tagged with CACHEDIR.TAG #794 Skip reads inside folders tagged with
CACHEDIR.TAG(Let tools mark cache directories with CACHEDIR.TAG #793) - fix(cache): skip
.gitin directory listings #903 Skip.gitin directory listings, so agit worktreecan replay a checkout's entries (Agit worktreenever replays a checkout's cache entry for a task that lists the workspace root #902). fix(cache): stop skipping dist in directory listings #919 changes the same skip list. - feat(run): add --dry-run to preview cache hits #792
vp run --dry-run, related to the diagnostics work
All pull requests: label:"read-write overlap"
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Start date
Target date
Effort
Activity
git worktreenever replays a checkout's cache entry for a task that lists the workspace root #902docs(rfc): JSON task graph, and dry-run plans with cache status (#933)
inputpattern is ignored for files discovered viareaddir#504