voidzero-dev / voidzero-dev/vite-task
Cache keys record absolute pnpm-store paths through `args`, so built-in-tool verdicts cannot cross machines
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Rust
- Sterne
- 466
- Forks
- 42
- Ø Merge
- 1 T. 15 Std.
- Gemergte PRs (30 T.)
- 19
Beschreibung
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.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Lies SpawnFingerprint in crates/vite_task_plan/src/plan.rs:631-667 und cache_metadata.rs:86-92, und verfolge dann plan_synthetic_request in plan.rs:546-577 für ein eingebautes Kommando wie vp lint --type-aware. Reproduziere den pnpm-store-Fall und untersuche die erfassten Umgebungswerte und aufgezeichneten Zugriffe; fertig ist es, wenn der resultierende Schlüssel und die Zugriffe nicht mehr von absoluten Store- oder Worktree-Pfaden abhängen und die Ergebnisse der eingebauten Prüfungen maschinenübergreifend wiedergegeben werden können.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- rust
- Bereich
- build-system, tooling
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Aktiv
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 48/100