Repository navigation
fix(install): publish git checkouts without Node before it is provisioned - #195382
Conversation
…oned The git install path provisions Node after cloning, but the staging checkout was published with a Node script, so hosts without Node failed with 'node: command not found' and lost the clone. Publish with shell moves, keeping the appeared-target refusal, .git-last ordering and rollback.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesReplaces Node-dependent Git checkout publication with shell operations so installation can provision Node afterward. Example: Run bash install.sh --install-method git --no-onboard --no-prompt on Debian 13 without Node.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open for merge: this PR fixes a current fresh-host installation failure, preserves the existing publication contract, and has no actionable findings. Priority: P1 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherBoth Unix installer profiles share the clone publisher, which turns a successful staging clone into the configured checkout before ref selection, runtime admission, and builds. flowchart LR
A[Unix installer] --> B[Clone into staging]
B --> C[Shared shell publisher]
C --> D[Select checkout ref]
D --> E[Provision compatible Node]
E --> F[Build and install CLI]
Technical reviewBest possible solution: Merge the shared shell publisher while retaining checkout-specific Node admission and the existing transactional safeguards. Do we have a high-confidence way to reproduce the issue? Fetched-main source establishes the missing-Node publication failure, and the contributor's inspected Debian screenshot confirms it through the installer entry point; no target code was executed during this review. Is this the best way to solve the issue? Removing the premature runtime dependency in the existing shared publisher is the smallest complete repair and avoids undoing intentional checkout-specific engine selection. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 465c110e4975. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests +26, Other +1. Total +27 across 2 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed November 8, 2026, 4:16 PM ET / 21:16 UTC (Revision 2). |
|
Added the full assembled-installer proof the review asked for, run on an isolated fresh Debian 13 host without Node. On main it fails at line 518 with @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Thanks @wr-web, merged as 75c2c49. The fresh no-Node Debian proof made this an easy call. We also reviewed it independently against main's Node publisher, one behavior at a time. The parts that matter all hold: |
#195382 left main 19 lines over the test-lines ceiling, so every PR that adds tests failed the ratchet. Grant exactly the inherited debt.
…oned (openclaw#195382) The git install path provisions Node after cloning, but the staging checkout was published with a Node script, so hosts without Node failed with 'node: command not found' and lost the clone. Publish with shell moves, keeping the appeared-target refusal, .git-last ordering and rollback.
openclaw#195382 left main 19 lines over the test-lines ceiling, so every PR that adds tests failed the ratchet. Grant exactly the inherited debt.
…oned (openclaw#195382) The git install path provisions Node after cloning, but the staging checkout was published with a Node script, so hosts without Node failed with 'node: command not found' and lost the clone. Publish with shell moves, keeping the appeared-target refusal, .git-last ordering and rollback. (cherry picked from commit 75c2c49) Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit ab6a9ef71d9ca4f66f88b2d787cabceea11c9420)
Fixes #195366
What Problem This Solves
install.sh --install-method gitfails on any host that does not already have Node.clone_git_checkout_transactionallyinscripts/install-policy.shpublished the staging clone withnode - …, but the git path only provisions Node later, inensure_node "$repo_dir", which needs the checkout'sengines. The clone completed, publication hitnode: command not found, the staging checkout was deleted, and every retry downloaded it again.User Impact
On a fresh Debian/LXC or macOS host with no Node, the git install now publishes the checkout and goes on to provision Node as the npm path does. The user no longer gets a misleading "inspect the destination for partial files" error after a full clone.
Why This Change Was Made
Publication is now a small shell function,
publish_git_clone_staging, with the same contract as the old Node script:.gitlast, and the staging dir is removed afterwards..recoverywith the same "recovery files remain" message.Node bootstrap ordering is unchanged, because the target-engine phase still needs the cloned
package.json.install-cli.shshares this function through the same policy include.Evidence
Full installer on fresh Debian 13 without Node
This is the assembled-installer run the review asked for. It ran in an isolated WSL Debian GNU/Linux 13 (trixie) as root, where
command -v nodeandcommand -v npmboth print nothing. The command wasbash install.sh --install-method git --no-onboard --no-prompt, using thescripts/install.shandscripts/install-policy.shpair from each revision.772657222638, fresh hostinstall-policy.sh: line 518: node: command not foundand "Could not publish the cloned checkout: /root/openclaw"./root/openclawdoes not exist afterwards, and the script still exits 0.mainchecked out. Then: "Node.js not found, installing it now", "Node.js v24.22.2 installed" via NodeSource, pnpm 12.15.0 via Corepack, dependencies installed, UI and OpenClaw built, wrapper installed.openclaw --versionprintsOpenClaw 2026.11.1 (51b8257). Total time 9m40s.openclaw config set gateway.port 28799, the rerun reports "Existing OpenClaw installation detected, upgrading". It reuses/root/openclaw(no clone, so the publisher is not involved) and checks outv2026.11.2with a clean tree.gateway.port: 28799is still in~/.openclaw/openclaw.json. That rerun's doctor refused because the state DB schema 39 was written by the newer main build and is newer than the schema 22 that 2026.11.2 supports, and the 2026.11.2 UI build failed on a packaged knowledge manifest. Both are release-state outcomes outside this change.Publisher-level runs (Git Bash)
git cloneof a local repo)772657222638ba5cc37f0ba4install-policy.sh: line 518: node: command not found, rc=1, no checkoutcleanup_tmpfilesTests:
test/scripts/install-sh.test.ts"publishes Git clones before Node is provisioned ([Bug]: install.sh --install-method git fails on hosts without Node: clone publish step runsnodebefore ensure_node #195366)". It shadowsnodewith a failing function, then publishes both a fresh target and an empty existing dir. Its shell body passes in Git Bash. Vitest'srunInstallShellspawns/bin/bash, which does not exist on this Windows host, so the bash-based install tests can't run here in Vitest.createInstallGitCloneFixtureScript("publishes fresh Git clones only after success…") passes in Git Bash. The symlink-alias step needs symlink privileges this host lacks.bash -n scripts/install-policy.sh,oxfmt --checkandcheck:test-lines-ratchetpass.standalone-installers.test.tsfails 6/6 identically on main and on this branch here (symlinks and/bin/bash).