voidzero-dev / voidzero-dev/vite-task
Cache keys record absolute pnpm-store paths through `args`, so built-in-tool verdicts cannot cross machines
Nessuno ha ancora preso questa issue.
- Lingua principale
- Rust
- Stelle
- 466
- Fork
- 42
- Merge medio
- 1g 15h
- PR unite (30g)
- 19
Descrizione
SpawnFingerprint normalizes cwd and the program to workspace-relative, collapsing an out-of-workspace program to its file name (crates/vite_task_plan/src/plan.rs:631-667, cache_metadata.rs:86-92), but args are keyed verbatim. When a user task's command is a vp built-in, the CLI's resolver returns an absolute binPath (oxlint, oxfmt, vitest, pack, vite) and it reaches plan_synthetic_request unchanged (plan.rs:546-577).
Under pnpm's global virtual store the key for vp lint --type-aware is program node_modules/.bin/node with args ['--disable-warning=...', '/Users/<user>/Library/pnpm/store/v11/links/@/oxlint/1.81.0/<hash>/node_modules/oxlint/bin/oxlint', ...], so no verdict replays between a CI runner and a developer checkout. In our monorepo that is 131 type-aware lint tasks whose cold lane takes about 5m39s; the same applies to vp fmt, vp pack and vp build tasks.
Request: fingerprint a core-resolved tool by identity (package name and version, which the core knows because it resolved the path), or relativize absolute args. The resolver also injects OXLINT_TSGOLINT_PATH into the key's tracked envs, whose value hashes a second store path, so args alone are not the whole key: replacing the built-in with sh -c 'vp lint ... "$@"' vp (no synthetic plan request, so neither the resolved path nor the resolver envs reach the key) is the workaround we landed, and the next run's miss message was env 'OXLINT_TSGOLINT_PATH' changed.
Separately, some recorded accesses in the entry value are a package prefix concatenated with an absolute path, e.g. tools/workspace-cache + /Users/<user>/<worktree>/tools/.../report.test.ts.mjs, which looks like a missed strip in auto-tracking.
Related: #591 (remote cache), for which cross-machine keys are a prerequisite.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Leggi SpawnFingerprint in crates/vite_task_plan/src/plan.rs:631-667 e cache_metadata.rs:86-92, poi segui plan_synthetic_request in plan.rs:546-577 per un elemento integrato come vp lint --type-aware. Riproduci il caso pnpm-store e ispeziona i valori dell’ambiente tracciati e gli accessi registrati; il lavoro è completato quando la chiave risultante e gli accessi non dipendono più da percorsi assoluti dello store o del worktree e i risultati degli elementi integrati possono essere riprodotti su macchine diverse.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- rust
- Ambito
- build-system, tooling
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Attiva
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 48/100