Repository navigation
Description
Describe the bug
A task whose command is a Vite+ built-in, such as vp pack or vp build, misses the task cache whenever the project sits at another path, even when nothing it reads changed. The miss reason is args changed. The stored key's args hold the absolute path of Vite+'s own entry script inside that checkout's node_modules:
vp pack:<checkout>/node_modules/.pnpm/vite-plus@1.5.0_…/node_modules/vite-plus/dist/pack-bin.jsvp build:<checkout>/node_modules/.pnpm/@voidzero-dev+vite-plus-core@1.5.0_…/node_modules/@voidzero-dev/vite-plus-core/dist/vite/bin/vite.js
A plain task (node copy.mjs) with the same inputs replays at the second path, so only the built-in's path is the difference.
I expect a built-in task's key to name its entry relative to the workspace, or by the tool's package and version, so two checkouts of one commit share results.
Why it matters: git worktrees, several agents working on one machine each in its own checkout, and machines sharing one remote cache all run the same commit from different paths. In a workspace with 12 build tasks, a second worktree reading from a shared remote cache replayed 1 of 12. The one that hit was a package script, not a built-in.
This looks like the Vite+ side of voidzero-dev/vite-task#790, whose fix, voidzero-dev/vite-task#789, adds tool_entry to synthesized commands but notes that nothing sets it yet: Vite+ would pass the entry it resolves for each built-in tool. voidzero-dev/vite-task#717 is the same key field for entries in a global pnpm store. The tracked OXLINT_TSGOLINT_PATH env that #717 names is a second absolute path, for vp lint.
Reproduction
https://gist.github.com/mihar-22/b1d3bec920bb75e571fccefa533d23c7
Steps to reproduce
- Put the gist's files in one folder and run
bash repro.sh. It needs pnpm andsqlite3. - It creates a project in a temporary folder, runs
vp run packandvp run copy, then copies the project, with itsnode_modules/.vite/task-cache, to a second path and runs both again. - At the second path,
vp run copyprints◉ cache hit, replayingandvp run packprints○ cache miss: args changed, executing. - The script then prints the
pack-bin.jspath from each stored key. They differ only in the checkout's folder.
System Info
# No global vp installed; this is the project's local CLI.
$ vp --version
vp v1.5.0
Local vite-plus:
vite-plus v1.5.0
Tools:
vite v8.3.5
rolldown v1.2.16
vitest v5.1.0
oxfmt v0.76.0
oxlint v1.91.0
oxlint-tsgolint v7.0.2005
tsdown v0.23.4
Node.js v26.12.0, pnpm 12.14.0, Linux x64Used Package Manager
pnpm
Logs
# At the second path:
$ node copy.mjs ◉ cache hit, replaying
vp run: cache hit, 25ms saved.
$ vp pack ○ cache miss: args changed, executing
# The pack-bin.js path in each stored key:
/tmp/tmp.XXXX/a/node_modules/.pnpm/vite-plus@1.5.0_@vitest+ui@5.1.0/node_modules/vite-plus/dist/pack-bin.js
/tmp/tmp.XXXX/b/node_modules/.pnpm/vite-plus@1.5.0_@vitest+ui@5.1.0/node_modules/vite-plus/dist/pack-bin.jsValidations
- Read the Contributing Guidelines.
- Check that there isn't already an issue for the same bug.
- Confirm this is a Vite+ issue and not an upstream issue (Vite, Vitest, tsdown, Rolldown, or Oxc).
- The provided reproduction is a minimal reproducible example.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Effort
Target date
Start date
Activity
voidzero-bot commentedon Nov 7, 2026
Triage failed unexpectedly (attempt 1 of 3).
Run: https://github.com/voidzero-dev/vite-plus/actions/runs/42328483401
I can retry if a new comment provides more information or asks me to try again.
Error:
mihar-22 commentedon Nov 7, 2026
vp testhas the same problem. Its task's stored spawn args hold the absolute path of Vitest's entry in the checkout:Reproduced on 1.5.0 with the gist above, plus a
test: { command: 'vp test run', cache: { input: ['src/**'] } }task and one test file: run it, copy the project to a second path, run it again, and it misses onargs changed. The same command run asnode node_modules/vite-plus/bin/vp test runhits at the second path, since the key then holds the relative path.We also see
vp checkandvp lintkeys hold<checkout>/node_modules/.pnpm/oxlint@…/node_modules/oxlint/bin/oxlint. For now we run every cached built-in throughnode node_modules/vite-plus/bin/vp ….