Skip to content

vfs: resolve inherited worker entry after --import - #66271

Open
lazerg wants to merge 1 commit into
nodejs:mainfrom
lazerg:fix/issue-66270-worker-vfs-load
Open

lazerg wants to merge 1 commit into
nodejs:mainfrom
lazerg:fix/issue-66270-worker-vfs-load

Conversation

@lazerg

@lazerg lazerg commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

With --import, a worker that inherits --vfs-load only mounts the source after the preloads have run, but executeUserEntryPoint() resolved the worker's entry point before that. The lookup inside the mount found nothing, so the entry skipped the usual extension search and a worker like new Worker(path.join(__dirname, 'worker')) failed with ERR_MODULE_NOT_FOUND. This resolves the entry again once the mount is in place.

Written with AI assistance (Claude Code), reviewed and tested by me.

Refs: #66270

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/loaders

@nodejs-github-bot nodejs-github-bot added module Issues and PRs related to the module subsystem. needs-ci PRs that need a full CI run. labels Sep 25, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Caution

AgentScan found account activity patterns that may be consistent with automation. This is a heuristic, not proof that this pull request was opened by an agent or violates policy. AI-assisted contributions are permitted, but automated tooling must not open pull requests without advance approval, and contributors must personally understand, test, verify, and take responsibility for every submitted change. See the AgentScan analysis, AI use policy, and automation policy for additional context.

@lazerg

lazerg commented Sep 25, 2026

Copy link
Copy Markdown
Contributor Author

y an agent or violates policy. AI-assisted contributions are permitted, but automated tooling must not open pull requests without advance approval, and contributors must personally understand, test, verify, and take responsibility for every submitted change. See the AgentScan analysis, AI use policy, and automation policy for additional context.

It is not full automation, i review, test myself

@codecov

codecov Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.36%. Comparing base (9800c29) to head (5a95da1).
⚠️ Report is 145 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #66271      +/-   ##
==========================================
- Coverage   92.79%   90.36%   -2.44%     
==========================================
  Files         421      792     +371     
  Lines      191392   275569   +84177     
  Branches    29399    52835   +23436     
==========================================
+ Hits       177606   249023   +71417     
- Misses      13464    16964    +3500     
- Partials      322     9582    +9260     
Files with missing lines Coverage Δ
lib/internal/modules/run_main.js 100.00% <100.00%> (+14.43%) ⬆️

... and 548 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.

@pipobscure

Copy link
Copy Markdown
Contributor

Note: #66140 gives --vfs-load mouted volumes a fixed layerId for that very reason and solves this issue as well.

@inoway46

Copy link
Copy Markdown
Contributor

Could you change Fixes to Refs for #66270? As noted in my testing there, the reported worker.js case did not reproduce, while this PR addresses the extensionless worker case.

Signed-off-by: lazerg <lazerg2@gmail.com>
Assisted-by: Claude Code
@lazerg
lazerg force-pushed the fix/issue-66270-worker-vfs-load branch from e78102a to 5a95da1 Compare September 30, 2026 01:17
@lazerg

lazerg commented Sep 30, 2026

Copy link
Copy Markdown
Contributor Author

@inoway46 thanks, switched it to Refs. the commit now also carries the Assisted-by trailer per AGENTS.md.

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

Labels

agentscan:community-flagged module Issues and PRs related to the module subsystem. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants