Skip to content

fix(install): keep --beta on a fresh host instead of silently installing stable - #188005

Merged
steipete merged 1 commit into
mainfrom
upd/upd-l1984
Oct 30, 2026
Merged

steipete merged 1 commit into
mainfrom
upd/upd-l1984

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes fresh install.sh --beta installations silently selecting stable before Node/npm exists.

Fixes #187982. Regression from #187564; the original review identified the cold-host failure in r4410996147. Thanks @McgAtom for the report and installer-entry reproduction.

User Impact

Cold and warm hosts preserve the requested beta channel. If beta cannot be resolved once npm is available, the installer visibly warns before falling back to latest. Runtime admission checks the package actually selected.

Why This Change Was Made

The early engine resolver consumed beta intent when its npm lookup could not run. It now preserves the unresolved request during conservative runtime bootstrap, then resolves the target and enforces its engines before package installation. The later duplicate beta selector is removed.

PowerShell already preserves its beta tag, but now refreshes the target engine after provisioning npm as well. No options, dependencies, schemas, or baselines change.

Evidence

  • Native macOS /bin/bash 3.2.57, Node 26.12.1, and real npm metadata over a loopback registry. The assembled standalone installer runs parse_args --install-method npm --beta --no-onboard --no-prompt, configure_verbose, and main; the real SQLite capability probe runs. Provisioning exposes the native tools, and package installation deliberately records its spec and exits 86, matching the reporter's probe boundary. This is live installer-entry/selection proof, not a completed public-registry installation or Homebrew qualification.
  • On pre-fix source: cold beta, missing-beta warning, and stricter-beta admission regressions fail; warm beta passes. On the fix, all four pass: cold/warm select [email protected], absent beta selects openclaw@latest with a warning, and an incompatible beta engine prevents reaching package installation. Final focused file: 4.066 s test time, 5.46 s wrapper wall time.
  • Command: node scripts/run-vitest.mjs test/scripts/install-sh-beta.test.ts --maxWorkers=1. All HOME/state/cache/prefix/temporary paths are isolated in a private user temporary directory and cleaned up.
  • Ten installer-consumer files: 435 passed, 57 skipped, 2 inherited failures (81.38 s wrapper wall time). The failures are install-sh.test.ts's quoted-prefix Bash PATH remedy and literal-safe zsh PATH remedy. Replaying the generated commands against untouched base f00dd960e35c and the fix gives identical Bash exit 2 (unmatched quote) and zsh exit 1 (unmatched quote). This patch does not change PATH-remedy quoting. PowerShell execution is among the unavailable-host skips.
  • node scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.test.root.tooling.json --incremental, touched-file oxlint and oxfmt, /bin/bash -n scripts/install.sh, git diff --check, and Madge pass (0 cycles).
  • Both ratchets pass: max-lines 404 grandfathered suppressions; environment names 458/458; test lines 6,281,386 against ceiling 6,328,564. No allocation or baseline edits.
  • Codex autoreview of the local candidate against f00dd960e35c, through P2: scoped-clean, no actionable findings. Subsequent edits only fix test lint syntax and remove an unnecessary test-line allocation.
  • PowerShell is unavailable on this host: its existing engine fixture is extended with cold beta admission, but PowerShell execution remains for CI. Full check:changed/SQLite inventory is omitted under the campaign's local gate budget; targeted gates above ran instead.

Production LOC: +32/-27 (net +5); regression tests: +141; docs: +2. An initial literal-reference search also selected the unrelated package-acceptance workflow suite; that task-owned run was canceled and is not claimed as passing proof. Its existing 256-planner-group admission test passed in 61.699 s for 257 evaluations; the large frozen planner inventory accounts for its cost. The final consumer selection below loads, assembles, or executes the actual installers.

Sibling test command
node scripts/run-vitest.mjs \
  test/scripts/install-ps1.test.ts \
  test/scripts/install-sh-beta.test.ts \
  test/scripts/build-and-run-mac.test.ts \
  test/scripts/standalone-installers.test.ts \
  test/scripts/install-sh.test.ts \
  test/scripts/install-sh.provisioning.test.ts \
  test/scripts/install-git-ref.test.ts \
  test/scripts/install-ps1.release.test.ts \
  test/scripts/install-bun.test.ts \
  src/install-sh-version.test.ts --maxWorkers=1

Keep beta intent pending until npm is available, then resolve the selected target and enforce its engines before installation. Refresh PowerShell target engines after runtime provisioning as well.

Fixes #187982. Regression from #187564. Thanks @McgAtom for the report and installer-entry reproduction.
@clawsweeper

clawsweeper Bot commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation scripts Repository scripts size: M labels Oct 30, 2026
@steipete
steipete marked this pull request as ready for review October 30, 2026 01:10
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-30T01:12:21.578572Z 3735179 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@steipete
steipete merged commit 6c4a948 into main Oct 30, 2026
182 of 184 checks passed
@steipete
steipete deleted the upd/upd-l1984 branch October 30, 2026 01:21
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 30, 2026
…ing stable (openclaw#188005)

openclaw#187564 made the installers resolve the target release's engines through npm, but on a host without Node the beta tag lookup ran before npm existed, so install.sh --beta switched the target to latest and cleared the beta request, silently installing stable. The installer now keeps the beta request through Node provisioning, resolves the beta tag afterwards, checks the selected package's engines, and warns visibly before falling back to latest when no beta exists. The PowerShell installer refreshes engines after provisioning too.

Fixes openclaw#187982. Thanks @McgAtom for the report.
RomneyDa added a commit that referenced this pull request Nov 17, 2026
…ing stable (#188005)

#187564 made the installers resolve the target release's engines through npm, but on a host without Node the beta tag lookup ran before npm existed, so install.sh --beta switched the target to latest and cleared the beta request, silently installing stable. The installer now keeps the beta request through Node provisioning, resolves the beta tag afterwards, checks the selected package's engines, and warns visibly before falling back to latest when no beta exists. The PowerShell installer refreshes engines after provisioning too.

Fixes #187982. Thanks @McgAtom for the report.
(cherry picked from commit 6c4a948)

Co-authored-by: RomneyDa <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation scripts Repository scripts size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fresh --beta installation silently switches to stable before npm exists

1 participant