Skip to content

test(cache): check that cache hits restore output symlinks as links - #911

Merged
wan9chi merged 1 commit into
mainfrom
test/e2e-symlinks-restored-as-links
Oct 30, 2026
Merged

wan9chi merged 1 commit into
mainfrom
test/e2e-symlinks-restored-as-links

Conversation

@wan9chi

@wan9chi wan9chi commented Oct 30, 2026

Copy link
Copy Markdown
Member

Motivation

The symlink e2e cases added in #885 only check that files are reachable through the restored paths: vtt print-file dist/pkg/index.js in the vtt case, and require in the Nitro case. A restore that copied each link's target instead of recreating the link would pass them too. Replacing each restored link with a copy of its target leaves both cases passing, so they don't pin down what #885 fixed.

Changes

  • vtt read-link <path> prints a link's target, and fails if the path isn't a symbolic link.
  • output_globs___symlinks_restored_on_cache_hit: after each cache hit, vtt read-link dist/pkg must print store/pkg.
  • nitro_build_restores_traced_dependency_links: check.cjs checks that node_modules/tslib and each package's node_modules/tslib are symbolic links into .nf3. It resolves both ends with realpath, so the output is the same with nf3's relative targets on Unix and its absolute junction targets on Windows.

🤖 Generated with Claude Code

The symlink e2e cases only checked that files were reachable through the
restored paths, which a restore that copied the link targets would also
pass. Add `vtt read-link` and check the link target after each cache hit
in the `vtt` case. In the Nitro case, check that each path nf3 links is a
symbolic link into `.nf3`, resolving both ends so the output matches with
relative targets on Unix and absolute junction targets on Windows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@wan9chi
wan9chi merged commit cb0bddc into main Oct 30, 2026
20 checks passed
@wan9chi
wan9chi deleted the test/e2e-symlinks-restored-as-links branch October 30, 2026 01:51
@github-actions

Copy link
Copy Markdown

fspy benchmark

linux

dynamic/launch             change  +0.07%  [ -3.75% ..  +4.36%]  overhead   +57.95%
dynamic/access             change  +0.36%  [ -3.16% ..  +4.52%]  overhead   +21.65%
dynamic/access-relative    change  +0.59%  [ -4.51% ..  +6.47%]  overhead   +72.96%
dynamic/access-contended   change  -3.18%  [-12.93% ..  +5.97%]  overhead   +36.04%
static/launch              change  +0.51%  [ -3.69% ..  +5.51%]  overhead  +192.95%
static/access              change  +0.54%  [ -1.00% ..  +2.54%]  overhead +1441.67%
static/access-relative     change  -0.05%  [ -2.44% ..  +1.21%]  overhead +1934.02%
static/access-contended    change  +0.31%  [ -1.13% ..  +1.35%]  overhead +1840.68%

macos

dynamic/launch             change  -0.45%  [ -4.45% ..  +4.26%]  overhead  +241.72%
dynamic/access             change  -2.09%  [-19.08% .. +12.51%]  overhead    +3.17%
dynamic/access-relative    change  -0.38%  [ -9.98% ..  +4.20%]  overhead  +262.29%
dynamic/access-contended   change  -1.17%  [-10.57% ..  +6.14%]  overhead    +1.41%

windows

dynamic/launch             change  -0.18%  [ -5.64% ..  +4.29%]  overhead   +24.49%
dynamic/access             change  +0.00%  [ -0.55% ..  +0.56%]  overhead    +1.31%
dynamic/access-relative    change  +0.18%  [ -0.53% ..  +0.73%]  overhead    +1.64%
dynamic/access-contended   change  +0.00%  [ -0.87% ..  +0.35%]  overhead    +1.25%

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.

1 participant