fix: make e2e tests resilient to version manager shims#271
Merged
branchseer merged 3 commits intomainfrom Mar 18, 2026
Merged
Conversation
Version manager shims (e.g. mise) read `package.json` in the working directory to resolve the Node.js version. When fspy tracks task execution, this read gets captured as an inferred input, causing spurious cache misses when `package.json` is subsequently modified. Two fixes: - Move the `cache-miss-command-change` test's task definition from `package.json` scripts to `vite-task.json` tasks, so modifying the command no longer touches a file that shims read. - Copy `.node-version` into the e2e temp directory so shims can resolve the correct Node.js version even without a global install. Also hoists `test_bin_path` computation to `main()` to avoid redundant per-case `CARGO_MANIFEST_DIR` lookups. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
fengmk2
approved these changes
Mar 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
cache-miss-command-changetest's task definition frompackage.jsonscripts tovite-task.jsontasks, so modifying the command no longer touches a file that version manager shims (e.g. mise) read during fspy-tracked execution.node-versioninto the e2e temp directory so shims can resolve the correct Node.js version without a global installTest plan
cargo test -p vite_task_bin --test e2e_snapshots— all 36 tests pass🤖 Generated with Claude Code