From 102b2c18e95de330f537d178764cff1a0f8bf6b1 Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Sun, 24 May 2026 15:50:16 +0200 Subject: [PATCH] fix(installer): count verify progress stage --- CHANGELOG.md | 2 +- scripts/install.sh | 9 +++++++++ test/scripts/install-sh.test.ts | 19 +++++++++++++++++++ 3 files changed, 29 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 67787b07e8c1..c0708c5dad03 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ Docs: https://docs.openclaw.ai ### Changes ### Fixes - +- Installer: include the optional verify phase in the progress counter so `--verify` shows `[4/4] Verifying installation` instead of `[4/3]`. - Tests: fail the kitchen-sink RPC Docker walk when gateway RSS sampling is unavailable instead of silently disabling the per-process memory guard. - Tests: suppress the current Rolldown plugin timing warning format in the Vitest wrapper so tiny focused runs do not drown useful stderr in repeated build-timing noise. - Models/OpenRouter: use endpoint-specific OpenRouter context limits from `top_provider` metadata so provider-routed models no longer overstate available context. (#85949) Thanks @TurboTheTurtle. diff --git a/scripts/install.sh b/scripts/install.sh index 3d4f3a99b9d6..1584fc03aef1 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -339,6 +339,14 @@ ui_error() { INSTALL_STAGE_TOTAL=3 INSTALL_STAGE_CURRENT=0 +configure_install_stage_total() { + INSTALL_STAGE_TOTAL=3 + INSTALL_STAGE_CURRENT=0 + if [[ "${VERIFY_INSTALL:-0}" == "1" ]]; then + INSTALL_STAGE_TOTAL=4 + fi +} + ui_section() { local title="$1" if [[ -n "$GUM" ]]; then @@ -3126,6 +3134,7 @@ main() { if [[ "${OPENCLAW_INSTALL_SH_NO_RUN:-0}" != "1" ]]; then parse_args "$@" + configure_install_stage_total configure_verbose main fi diff --git a/test/scripts/install-sh.test.ts b/test/scripts/install-sh.test.ts index a75c5d74cc44..ffea71490abe 100644 --- a/test/scripts/install-sh.test.ts +++ b/test/scripts/install-sh.test.ts @@ -148,6 +148,25 @@ describe("install.sh", () => { ); }); + it("counts the verify stage when --verify is enabled", () => { + const result = runInstallShell( + [ + `source ${JSON.stringify(SCRIPT_PATH)}`, + "parse_args --verify", + "configure_install_stage_total", + 'ui_stage "Preparing environment"', + 'ui_stage "Installing OpenClaw"', + 'ui_stage "Finalizing setup"', + 'ui_stage "Verifying installation"', + ].join("\n"), + { TERM: "dumb" }, + ); + + expect(result.status).toBe(0); + expect(result.stdout).toContain("[4/4] Verifying installation"); + expect(result.stdout).not.toContain("[4/3] Verifying installation"); + }); + it("loads nvm before checking Node.js so stale system Node does not win", () => { expect(script).toMatch( /# Step 2: Node\.js\s+load_nvm_for_node_detection\s+if ! check_node; then/,