Skip to content

fix(install): defer success until verification - #126871

Merged
steipete merged 1 commit into
mainfrom
codex/autoqa-171-installer-success
Aug 20, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/autoqa-171-installer-success

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Closes #126862

AI-assisted: yes

What Problem This Solves

Fixes an issue where users installing OpenClaw with retained configuration or explicitly requesting --verify could see a successful Unix installation even though required Doctor repair or verification subsequently failed. Upgrades also displayed an impossible [4/3] verification progress stage.

Why This Change Was Made

The Unix installer now detects implicit upgrade verification before calculating its progress-stage total and renders one canonical completion banner only after required retained-configuration Doctor work and explicit or implicit verification succeed. Plain fresh installs retain their existing success-before-optional-onboarding contract and the original exec onboarding handoff. Plugin updates, dashboard opening, and service refresh remain advisory. PowerShell and prefix installer behavior is intentionally untouched.

User Impact

Required installer lifecycle failures now exit nonzero without reporting installation success. Successful fresh installs still report installation success, actual upgrades still report Upgrade complete, and implicit upgrade verification is correctly shown as [4/4]. Optional interactive onboarding behavior and ordering are intentionally unchanged.

Evidence

  • Pre-fix fail-closed unit regression: six expected failures reproduced premature Doctor/verification success and [4/3]; five contract controls passed.
  • Focused post-fix mock-only regression: 11 passed; all other installer cases skipped. Harness has no usable external-command PATH and blocks service, network, package-manager, Doctor, onboarding, and Gateway operations.
  • Secretless direct-AWS Crabbox baseline: lease cbx_92040ac3b85c, run run_94d57f6a0fb8, eight expected baseline scenarios passed.
  • Secretless direct-AWS Crabbox repaired proof: same lease, run run_8bf133e80248, all eight repaired scenarios passed.
  • Both remote proofs established IAM metadata HTTP 404, no provider credentials, isolated disposable state, zero service-manager effects, and remote cleanup. Installer execution occurred only remotely; no installer, Doctor, onboarding, service-control probe, or Gateway command ran on the operator Mac.
  • Remote matrix: retained-config Doctor failure/success; explicit verification failure/success; implicit upgrade verification [4/4]; upgrade Doctor/verification failures; unchanged plain-fresh success placement.
  • bash -n scripts/install.sh and shellcheck -e SC1091 scripts/install.sh pass.
  • Focused changed-file gate passed all format, typecheck, lint, dependency, patch, and architecture guards.
  • Fresh P1 Codex-backed autoreview passed with no accepted/actionable findings; a separate independent adversarial lifecycle/onboarding review also finished clean.
  • Production delta: +74/-74 (net zero). Regression tests: +257/-0.
  • scripts/install.ps1, scripts/install-cli.sh, onboarding handoff semantics, configuration, dependencies, and changelog are unchanged.

@clawsweeper

clawsweeper Bot commented Aug 20, 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 scripts Repository scripts size: M maintainer Maintainer-authored PR labels Aug 20, 2026
@steipete
steipete marked this pull request as ready for review August 20, 2026 22:47
@steipete

Copy link
Copy Markdown
Contributor Author

Land-ready evidence for exact head 4faa7840a848011504a7122a1ed7bcfe3a3ad7c8:

  • Root cause: fix(install): avoid success after incomplete lifecycle changes #125992 deferred completion only for upgrades; fresh retained-config Doctor and explicit verification still ran after success, and implicit upgrade verification was enabled after stage totals were calculated.
  • Owner-boundary fix: detect implicit verification before rendering progress and emit one canonical fresh/upgrade completion banner only after required Doctor and verification succeed. Fresh success still precedes optional interactive onboarding and retains the original exec handoff. Service refresh, plugin updates, and dashboard behavior remain advisory.
  • Pre-fix fail-closed local regression: six expected failures, five passing controls. Fixed regression: 11 passed, 129 unrelated installer tests skipped; every external/service command is blocked by the fixture.
  • Exact focused proof: node scripts/run-vitest.mjs test/scripts/install-sh.test.ts --configLoader runner --testNamePattern '^install\.sh required installer lifecycle:', with the Vitest cache isolated outside the shared dependency tree.
  • Exact static/gate proof: bash -n scripts/install.sh; shellcheck -e SC1091 scripts/install.sh; node scripts/check-changed.mjs -- scripts/install.sh test/scripts/install-sh.test.ts; git diff --check.
  • Secretless direct-AWS Crabbox lease cbx_92040ac3b85c was released after baseline run run_94d57f6a0fb8 and fixed run run_8bf133e80248; both completed eight scenarios. IAM metadata returned HTTP 404; no credentials, service effects, or surviving lease.
  • Full exact-head hosted CI passed: https://github.com/openclaw/openclaw/actions/runs/32425846521.
  • Dedicated cross-platform installer workflow passed Linux Docker/non-root/Fedora, macOS, Windows, syntax, and ShellCheck: https://github.com/openclaw/openclaw/actions/runs/32425804596.
  • Fresh P1 Codex-backed autoreview: clean. Separate independent adversarial lifecycle/onboarding review: clean. Native exact-head review artifacts validated as READY FOR /prepare-pr with zero findings.
  • Production LOC: +74/-74 (net zero); regression tests: +257/-0. scripts/install.ps1, scripts/install-cli.sh, onboarding semantics, dependencies, configuration, and changelog are untouched.
  • ClawSweeper's latest comment currently reports that review has started and contains no Rank-up moves or actionable findings; its publisher is still running.

Closes #126862.

@steipete
steipete merged commit e78b9d3 into main Aug 20, 2026
207 checks passed
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR scripts Repository scripts size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Unix installer reports success before required Doctor or verification completes

1 participant