fix(installer): complete first-run onboarding#101901
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 7, 2026, 7:47 PM ET / 23:47 UTC. Summary PR surface: Tests +328, Docs 0, Other -1. Total +327 across 3 files. Reproducibility: yes. Source inspection of current main shows installer finalization can run gateway refresh/doctor and only bootstrap-based onboarding before the config-driven onboarding path, while the PR's shell tests model the failing unconfigured/no-TTY and stale PATH cases. Review metrics: 2 noteworthy metrics.
Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Review detailsBest possible solution: Land the installer finalization change after a maintainer accepts the focused proof and current CI, or request one successful fresh install transcript if the full black-box proof gap matters for this P0 setup path. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection of current main shows installer finalization can run gateway refresh/doctor and only bootstrap-based onboarding before the config-driven onboarding path, while the PR's shell tests model the failing unconfigured/no-TTY and stale PATH cases. Is this the best way to solve the issue? Yes, with a proof-sufficiency caveat. Moving the finalization decision to active config presence and the selected installed binary is the narrow owner-boundary fix; no existing supported path already solved the fresh-install onboarding gap on current main. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 6db0506474ce. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Tests +328, Docs 0, Other -1. Total +327 across 3 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (3 earlier review cycles)
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Merged via squash.
|
* fix(installer): complete first-run onboarding * docs(installer): document finalization paths * fix(installer): honor verify without tty * fix(installer): align config finalization
* fix(installer): complete first-run onboarding * docs(installer): document finalization paths * fix(installer): honor verify without tty * fix(installer): align config finalization
Summary
hash -rwhen the shell still caches a removed pathWhat Problem This Solves
A fresh git install could report success without creating
~/.openclaw/openclaw.json, gateway authentication, or a managed gateway service. Its suggested follow-up then failed first through a stale/usr/bin/openclawshell lookup, and subsequently through missing gateway mode/auth/service state. The TUI also failed withMissing gateway auth tokenbecause setup had never completed.This change makes first-run onboarding the installer finalization path. Doctor and gateway health behavior remain on the configured-upgrade path instead of being used as a substitute for initial setup.
Verification
node scripts/run-vitest.mjs test/scripts/install-sh.test.ts(61 passed)bash -n scripts/install.shgit diff --checkReal behavior proof
Behavior addressed: Fresh
--install-method git --version maininstalls could finish without first-run config, gateway auth, or a managed gateway service, then recommend commands that could not work in that state.Real environment tested: Linux installer regression coverage plus onboarding/Crestodian Docker scenarios and gateway-auth scenarios on the same patch.
Exact steps or command run after this patch:
node scripts/run-vitest.mjs test/scripts/install-sh.test.ts;bash -n scripts/install.sh; the existing Docker onboarding/Crestodian and gateway-auth scenario lanes were also run before the final rebase.Evidence after fix: All 61 installer regression tests pass, including fresh-install onboarding, configured-upgrade doctor behavior, stale PATH handling, no-TTY guidance, gateway finalization ordering, and successful-upgrade dashboard behavior.
Observed result after fix: Fresh installs enter onboarding before doctor/gateway probes; setup owns gateway config and token creation before service installation; follow-up commands resolve the newly installed binary; configured upgrades continue through doctor and plugin update behavior.
What was not tested: The isolated black-box fresh install did not complete because dependency installation was still running after 23 minutes and was terminated. No successful full fresh-VPS install artifact is claimed.