Skip to content

fix: make e2e tests resilient to version manager shims#271

Merged
branchseer merged 3 commits intomainfrom
fix-e2e-version-manager-shim
Mar 18, 2026
Merged

fix: make e2e tests resilient to version manager shims#271
branchseer merged 3 commits intomainfrom
fix-e2e-version-manager-shim

Conversation

@branchseer
Copy link
Member

@branchseer branchseer commented Mar 18, 2026

Summary

  • Move 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 version manager shims (e.g. mise) read during fspy-tracked execution
  • Copy .node-version into the e2e temp directory so shims can resolve the correct Node.js version without a global install

Test plan

  • cargo test -p vite_task_bin --test e2e_snapshots — all 36 tests pass

🤖 Generated with Claude Code

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>
Copy link
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@branchseer branchseer merged commit 4a5c9bc into main Mar 18, 2026
9 checks passed
@branchseer branchseer deleted the fix-e2e-version-manager-shim branch March 18, 2026 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants