Repository navigation
fix(sdk): workflow scripts run on Node 26 - #375
Merged
Merged
Conversation
This was referenced Nov 24, 2026
ChrisKrawczyk
marked this pull request as ready for review
November 24, 2026 18:43
This was referenced Nov 24, 2026
Node 26's permission model also limits the network, so a script node started with --permission could not reach its own loopback endpoint: every script failed with "fetch failed" (ERR_ACCESS_DENIED). The engines field allows Node >= 26.12.1; CI runs only Node 24.22.1, whose permission model has no network permission, so CI did not see it. The runner now passes --allow-net where the worker's Node has the flag (process.allowedNodeEnvironmentFlags), so a script reaches the network on Node 26 as it does on Node 24, as the docs already state. The flag has no host scope. Node 26 prints an experimental-flag warning on the script's stderr. workflow-script-guard, workflow-node-guardrails and workflow-script-tool-result-limit: 12 of 15 fail on Node 26.13.0 without the fix; 15 of 15 pass with it on Node 26.13.0 and 24.22.1. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: cc944a13-3e0b-43de-8040-5863182bbdb0
… review) - configuration.md: who can run script code with the worker's network, and when to set PILOTSWARM_WORKFLOW_SCRIPTS=0 (375-SEC-1). - workflow-sessions.md: the network bullet no longer contradicts itself and names the Node 26 stderr warning (375-COR-2, 375-COR-1). - runner.ts comment: parity is reachability, not identical stderr (375-COR-1). - CHANGELOG: only script nodes that called setResult or a tool failed on Node 26 (375-COR-4). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: cc944a13-3e0b-43de-8040-5863182bbdb0
Node 26's permission model limits the network, so the runner's --allow-net grant runs only there. Every other PR check pins Node 24.22.1, which is how the original failure shipped. The new job builds the workspace on Node 26.13.0 and runs the three workflow script test files (375-TST-1). The setup-node policy test allows that one pin, and the CI docs say so. Fixes #388 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: cc944a13-3e0b-43de-8040-5863182bbdb0
ChrisKrawczyk
force-pushed
the
fix/node26-script-net
branch
from
November 25, 2026 04:27
5a62d71 to
abce2a7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #388
Workflow script nodes failed on Node 26. Node 26's permission model also limits the network, so a script node started with
--permissioncould not reach its own loopback endpoint. Every script that calledsetResultor a tool failed withfetch failed(ERR_ACCESS_DENIED). The engines field allows Node>=26.12.1, but CI ran only Node 24.22.1, whose permission model has no network permission, so CI did not catch it.Fix
The runner passes
--allow-netwhen the worker's Node has the flag (process.allowedNodeEnvironmentFlags), so a script reaches the network on Node 26 as it does on Node 24. The flag has no host scope. Node 26 prints an experimental-flag warning on the script's stderr, so the script's captured stderr differs between the two versions.workflow-sessions.md,configuration.md) state this.configuration.mdnow states the trust decision next to the opt-out: anyone who can save and start a Workflow Definition can run code with the worker's network. Where they are not all trusted with it, and scripts are not isolated by other means, setPILOTSWARM_WORKFLOW_SCRIPTS=0on the workers, the portal and the MCP server.CI
A new PR-checks job, Workflow scripts (Node 26), builds the workspace on Node 26.13.0 and runs
workflow-script-guard,workflow-node-guardrailsandworkflow-script-tool-result-limit. Every other check pins Node 24.22.1 and never reaches the--allow-netbranch.Multi-model review
Three models (Claude Opus 5.5, GPT-6.2 Sol and Gemini 4 Argon) reviewed this PR as three specialists in a threaded debate, then a synthesis kept only findings grounded in the diff. The consensus was 0 must-fix, 2 should-fix, 5 to consider and 1 trade-off.
configuration.mdabove.runner.tssource text; the new CI job is the behavioral test. A least-privilege broker that keeps Node 26's network denial is a separate design change.--allow-net, rather than narrowing the engines range.Validation
All runs were on Linux (Node 24.22.1, PostgreSQL 16), one suite at a time, at
abce2a70, rebased on 0.8.18 (1f6af957), unless noted.run-tests.sh: 441 of 441 files; 4527 passed, 0 failed and 26 skipped of 4553.runner.tsfrom main, 13 of 15 fail withfetch failed, so the job catches the bug.deploy/scripts/test/node-version.test.mjspasses. It now allows the single 26.13.0 pin, and only inpr-checks.yml.