fix(node): hide Windows node task launcher#81267
Conversation
|
/review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Codex review: needs changes before merge. Summary Reproducibility: yes. source-reproducible. Current main routes the Windows node login task to Real behavior proof Next step before merge Security Review findings
Review detailsBest possible solution: Keep the hidden-launcher implementation and focused tests, remove the corrupted Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible. Current main routes the Windows node login task to Is this the best way to solve the issue? Mostly yes. The node-scoped Full review comments:
Overall correctness: patch is incorrect Acceptance criteria:
What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 3fad770510e9. |
0638ef2 to
b1b18ff
Compare
|
/review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
b1b18ff to
13aede8
Compare
|
Rebased on current origin/main and reran focused verification.\n\nChecks:\n- oxfmt --check changed files\n- node scripts/test-projects.mjs src/daemon/schtasks.install.test.ts src/daemon/schtasks.startup-fallback.test.ts src/daemon/service-env.test.ts --reporter=verbose\n- node scripts/check-changed.mjs\n- git diff --check\n\nStill draft pending the requested real Windows Scheduled Task proof.\n\n@clawsweeper re-review |
3614240 to
4a5fbfa
Compare
This comment was marked as spam.
This comment was marked as spam.
|
Updated the PR body with stronger Windows scheduled-task proof. I still cannot create the task through local @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
4a5fbfa to
36276ba
Compare
f11e76f to
46779ed
Compare
66583d9 to
5ae6492
Compare
d5c4fb4 to
553da78
Compare
553da78 to
02fc79d
Compare
02fc79d to
1fa6b3a
Compare
|
Updated #81267 with a fresh deterministic proof image and a cleaner gate-friendly proof section. The proof compares
Fresh artifact: https://raw.githubusercontent.com/giodl73-repo/openclaw/proof-artifacts/pr-81267-fresh/pr-81267/pr-81267-hidden-windows-node-task-launcher-before-after-proof.png |
Summary
Fixes #81254.
openclaw node installcurrently writes the Windows node login task as a directnode.cmdtarget, which can leave a persistent command window open after login. The node host is expected to behave like a background service, so this PR opts node installs into a hidden Windows launcher while leaving the generatednode.cmdscript available for status/restart/script inspection.This PR:
node.cmdscript plus a siblingnode.vbslauncher;.cmdtarget unless it explicitly opts in.Validation
node scripts/test-projects.mjs src/daemon/schtasks.install.test.ts src/daemon/schtasks.startup-fallback.test.ts src/commands/node-daemon-install-helpers.test.ts src/cli/node-cli/register.test.ts src/daemon/service-env.test.ts --reporter=verbosenode scripts/check-changed.mjsnode scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.core.test.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/core-test.tsbuildinfo./node_modules/.bin/oxfmt.CMD --check --threads=1 CHANGELOG.md src/daemon/schtasks.ts src/daemon/schtasks.install.test.ts src/daemon/schtasks.startup-fallback.test.ts src/daemon/node-service.ts src/daemon/service-env.ts src/daemon/service-env.test.tsgit diff --checkReal behavior proof
openclaw node installshould opt the node service into a hidden Windows launcher, stagingnode.cmdplusnode.vbsso the command host starts hidden instead of leaving a visible command window at login.upstream/mainand PR head1fa6b3aefbed39082252600bb862759e3b2d0de7, using OpenClaw's real node service environment builder and scheduled-task staging code.upstream/mainandfork/fix-windows-node-task-hidden; in each worktree rannode --import ./node_modules/tsx/dist/loader.mjs ./probe-hidden-node-task.mjs. The probe calledbuildNodeServiceEnvironment({ platform: "win32" })andstageScheduledTask()with a temp state dir, then checked whether staging produced the hiddennode.vbslauncher and whether it runs the generatednode.cmdviaWScript.Shell.Run(..., 0, False).upstream/mainstages onlynode.cmdand has no node hidden-launcher opt-in. PR head marks node installs withOPENCLAW_WINDOWS_TASK_HIDDEN_LAUNCHER=1, stagesnode.cmdplusnode.vbs, and the generated launcher invokesnode.cmdhidden withWScript.Shell.Run(..., 0, False).schtasks /Create /SC ONLOGONwas denied, the Startup-folder fallback installednode.vbs; a directly registered Windows Task Scheduler proof also ran the generatednode.vbsaction successfully and completed without leaving matchingcmd,conhost,wscript, orcscriptprocesses behind./TR node.vbsbehavior.Root cause
The shared Windows scheduled-task installer wrote direct
.cmdtask targets, and the node service reused that default even though node is expected to behave like a background service. There was no node-specific test requiring a hidden Windows launcher.User-visible / Behavior changes
On Windows,
openclaw node installlaunches the node host through a hidden launcher. Users should no longer see a persistent command window from the node login task.Security impact
No new permissions, network access, secret handling, or data access. The generated launcher only invokes the existing generated task script in hidden mode.