Skip to content

sea: mount the VFS at layer 0 and in workers - #67256

Open
avivkeller wants to merge 1 commit into
nodejs:mainfrom
avivkeller:vfs-archive-fix
Open

avivkeller wants to merge 1 commit into
nodejs:mainfrom
avivkeller:vfs-archive-fix

Conversation

@avivkeller

Copy link
Copy Markdown
Member

A single executable application built with "useVfs" and "assets"
mounted its virtual file system at the next free layer, and only in
the main thread. A worker had no mount at all, so a path into it, such
as a bundled worker script, could not be loaded there. On Windows the
reserved root sits under \.\NUL, so the loader read the NUL device
and failed with an invalid package.json error.

Fixes: #67223
Assisted-by: A Closed Source Agent

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/config
  • @nodejs/loaders
  • @nodejs/single-executable

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs involving general changes in the lib/ or src/ directories. needs-ci PRs that need a full CI run. labels Nov 4, 2026
@avivkeller
avivkeller marked this pull request as ready for review November 4, 2026 16:13
Signed-off-by: avivkeller <me@aviv.sh>
@codecov

codecov Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 89.18919% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.66%. Comparing base (d36e9ba) to head (3aac2a3).
⚠️ Report is 99 commits behind head on main.

Files with missing lines Patch % Lines
lib/internal/modules/esm/worker.js 72.72% 3 Missing ⚠️
src/node_sea.cc 90.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #67256      +/-   ##
==========================================
- Coverage   90.68%   90.66%   -0.02%     
==========================================
  Files         797      797              
  Lines      279045   279376     +331     
  Branches    53666    53747      +81     
==========================================
+ Hits       253050   253303     +253     
- Misses      16337    16359      +22     
- Partials     9658     9714      +56     
Files with missing lines Coverage Δ
lib/internal/main/worker_thread.js 95.11% <100.00%> (ø)
lib/internal/vfs/sea.js 100.00% <100.00%> (ø)
src/node_options.cc 88.18% <100.00%> (ø)
src/node_options.h 95.27% <100.00%> (-0.43%) ⬇️
src/node_sea.h 100.00% <ø> (ø)
src/node_sea.cc 87.70% <90.00%> (-0.04%) ⬇️
lib/internal/modules/esm/worker.js 92.23% <72.72%> (-0.67%) ⬇️

... and 29 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mcollina mcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@avivkeller avivkeller added author ready PRs with CI started, the required approvals, and no outstanding review comments. request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. labels Nov 5, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Nov 5, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@gurgunday

Copy link
Copy Markdown
Member

There are conflicts :/

@gurgunday gurgunday removed the author ready PRs with CI started, the required approvals, and no outstanding review comments. label Nov 10, 2026
@bakkot

bakkot commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

Looks like this raced with #67239

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs involving general changes in the lib/ or src/ directories. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

VFS breaking node:worker_modules

5 participants