Skip to content

Warn when the Node in the Windows sandbox can't start child processes - #1208

Draft
tolgaergin wants to merge 4 commits into
feat/bundled-node-gypfrom
feat/sandbox-node-warning
Draft

tolgaergin wants to merge 4 commits into
feat/bundled-node-gypfrom
feat/sandbox-node-warning

Conversation

@tolgaergin

@tolgaergin tolgaergin commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

libuv before 1.53.0 names a child process's pipes where a Windows AppContainer may not create them, and retries forever. Under a Node that bundles such a libuv, an install script that starts a child process and reads its output never returns inside the sandbox. It is stopped at its time limit, and nothing says why. node-gyp-build and node-gyp both start one.

No Node release bundles libuv 1.53.0 yet, so this can't be fixed here. It can be explained.

Change

A sandboxed run on Windows asks the host's node which libuv it bundles. For an affected one it prints a warning once, before the scripts start, and gives the reason as one possible cause under a script that ran out of time. With JSON output the warning goes to the log instead of the terminal. Nothing changes on other platforms or with the sandbox off.

The node is asked the way the build cache's toolchain probes ask: never an executable the project controls, with a short list of variables, a two-second limit and bounded output. Its answer is kept for the process; a node that gave none is asked again by the next rebuild.

A limit: the warning describes the host's node. A script that finds another node first, one a dependency supplies, runs that one, and the warning says nothing about it.

Tests

  • Unit tests for reading the versions Node prints: affected, fixed, and output that isn't two versions.
  • The warning names the libuv to look for (1.53.0 or later) instead of saying that no Node release has it.
  • The check itself runs only on Windows. There it printed both lines, in the wording here, with the bounded probe taking 0.04 s. That run printed the warning twice, to the terminal and to the log; printing it once is compiled and linted for Windows and has not run there yet.

🤖 Generated with Claude Code

@tolgaergin
tolgaergin added this pull request to stack #1205 November 16, 2026 01:37
@tolgaergin
tolgaergin force-pushed the feat/sandbox-node-warning branch from dc05f16 to fa21a63 Compare November 16, 2026 02:41
@tolgaergin
tolgaergin force-pushed the feat/sandbox-node-warning branch from fa21a63 to 3fa69e9 Compare November 16, 2026 05:15
@tolgaergin
tolgaergin force-pushed the feat/sandbox-node-warning branch from 3fa69e9 to 1cbfd4b Compare November 16, 2026 13:40
@tolgaergin
tolgaergin force-pushed the feat/sandbox-node-warning branch from 1cbfd4b to 0f54e10 Compare November 16, 2026 16:10
tolgaergin and others added 4 commits November 16, 2026 18:06
libuv before 1.53.0 names a child process's pipes where a Windows
AppContainer may not create them and retries forever. Under a Node that
bundles such a libuv, an install script that starts a child with piped
output never returns inside the sandbox and is stopped at its time limit,
with nothing to say why.

A sandboxed run on Windows now asks the `node` its scripts will find which
libuv it bundles. For an affected one it says so before the scripts start,
and again under a script that ran out of time.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
- The check ran the first `node.exe` on PATH with LPM's own environment
  and no limits. It now runs the way the build cache's probes do: never an
  executable the project controls, with only data-bearing environment, a
  time limit and bounded output.
- It runs once per process, after the sandbox itself has been checked, and
  the warning is printed once. It is logged as well, so a run with JSON
  output still records it.
- The warning names the Node on PATH, says which child processes are
  affected and how long the script's time limit is, and says that no Node
  release has the fix yet. Under a timeout it is given as one possible
  cause.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The warning went to the log and to the terminal, and the default log
level shows warnings, so a rebuild printed it twice. It now goes to the
terminal, or to the log when the output is JSON.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The answer of the host's Node was kept for the process even when there
was none: a probe that timed out, or a project whose own Node isn't
asked, left every later rebuild in the process without the warning. Only
an answer is kept now.

The warning said no Node release includes the fixed libuv yet, which
stops being true without a change here. It names the libuv to look for
instead.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@tolgaergin
tolgaergin force-pushed the feat/sandbox-node-warning branch from 0f54e10 to 36f43cc Compare November 16, 2026 18:13

This branch has not been deployed

No deployments
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