Repository navigation
fix(onboard): preserve the saved skills package manager - #130438
Conversation
Keep explicit CLI choice precedence while preserving existing pnpm, Bun, and Yarn preferences when onboarding is rerun. Retain npm defaults for fresh config and the narrower explicit CLI choices. Fixes #130433.
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 26, 2026, 6:00 PM ET / 22:00 UTC. ClawSweeper reviewWhat this changesThe PR preserves a saved skills package-manager preference during interactive and non-interactive onboarding unless a valid Regression provenancePossible regression — probable (reproduction; reviewed change). No predecessor PR is attributed. Merge readinessKeep this maintainer-owned PR open for normal merge review. The patch repairs both configuration-selection owners with the documented explicit CLI > saved setting > npm precedence; no blocking code, test, documentation, or security finding was found. Priority: P1 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherOnboarding combines an optional CLI package-manager choice with saved skills configuration before writing setup state and invoking selected skill installers. The selected value controls later Node-based skill installation commands. flowchart LR
A[Saved skills configuration] --> C[Onboarding selection]
B[CLI node-manager option] --> C
C --> D[Validate explicit choice]
D --> E[Explicit, saved, or npm]
E --> F[Persisted configuration]
E --> G[Skill installer]
Before merge
Agent review detailsSecurityNone. PR surfaceSource -1, Tests +57, Docs +1. Total +57 across 5 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain one canonical precedence rule—explicit CLI choice, then valid saved setting, then npm—and merge after exact-head validation confirms it across setup entry points. Do we have a high-confidence way to reproduce the issue? Yes—source establishes a deterministic path: start with a saved manager, omit Is this the best way to solve the issue? Yes—the change fixes selection at both owners rather than compensating in installers, while preserving the existing narrower CLI contract and fresh-config npm default. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 99a2434f7b89. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
|
Post-landing verification: b10beeee7c24 is on current Separate maintainer-tooling follow-up: native |
* origin/main: (275 commits) fix(ai): require explicit compatible-provider endpoints (#130453) test(control-ui): guard the hand-mirrored theme --bg copies (#130444) fix(onboard): preserve the saved skills package manager (#130438) improve(worker): diagnose admission-deadline failures and widen daemon revalidation budget (#130435) fix(plugins): align diffs external install metadata (#130362) refactor(models): consolidate config normalization (#130439) fix(browser): accept common keyboard aliases (#130401) fix(release): refresh IMAP plugin baselines (#130351) fix(tests): type sticky model agent fixtures (#130441) fix(qa): track current Slack progress cards (#130354) feat(ui): refine the mobile composer (#130308) fix(ui): clarify gateway disconnect status in tab title (#130364) test(qa): await gateway startup before network probes (#130353) fix(qa): run Buzz profile scenarios with pooled credentials (#130316) fix(crabbox): keep the setup failure reason and name its phase (#130425) fix: dashboard tools target the wrong Gateway after admission (#130112) fix(ui): distinguish inherited model defaults from session pins (#120805) feat(feishu): let agents resend received stickers (#130374) refactor(models): prepare selection policy once (#130413) fix(ui): make dashboard side panels enter split view (#130426) ... # Conflicts: # test/scripts/docker-build-helper.test.ts
) Keep explicit CLI choice precedence while preserving existing pnpm, Bun, and Yarn preferences when onboarding is rerun. Retain npm defaults for fresh config and the narrower explicit CLI choices. Fixes openclaw#130433.
Closes #130433
What Problem This Solves
Fixes an issue where operators rerunning non-interactive onboarding would silently lose a saved pnpm, Bun, or Yarn skill-install preference when they did not pass
--node-manager. Interactive skills setup also replaced a valid saved Yarn preference with npm, affecting classic onboarding, configure, and hosted skills setup.Why This Change Was Made
Both existing setup owners now resolve explicit CLI choice, then saved configuration, then npm. Validation applies to explicitly supplied CLI choices; the persisted config contract is intentionally wider because it also supports Yarn. No new helper, dependency, setting, migration, or installer-policy change is needed.
The removed path is the interactive resolver's redundant three-value filter on already-validated persisted configuration. CLI validation still accepts only npm, pnpm, and Bun, and
--skip-skillsleaves existing settings untouched.User Impact
Setup no longer silently changes which package manager subsequent skill installs use. Existing preferences survive, explicit overrides still win, and fresh configurations still default to npm. The skills configuration reference now states this precedence.
Evidence
git diff --check: passed.99a2434f7b89c682f934326be9f7cc786f7ddecareset saved pnpm/Bun/Yarn to npm with exit 0. Exact PR head541dc3bba62b99ea85917b3bd6364556e198f256preserved npm/pnpm/Bun/Yarn, defaulted fresh config to npm, and honored explicit npm/pnpm/Bun overrides: all eight cases exited 0 with the expected persisted value and unrelatedpreferBrew: falseretained.node --import tsx scripts/build-all.mts cliStartupwith frozen worktree-local dependencies. The candidate build included CLI bootstrap import validation and 48 built plugin-control-plane load checks.d916808353e42b419c3fd5ec9ed5739c26eacbcfreproduces both errors unchanged (sessions-mutations.sticky-model.test.ts:216,245, assigning the readonlymodelproperty). This is recorded as a separate gateway test-fixture follow-up, not treated as a passing full changed check.541dc3bba62b99ea85917b3bd6364556e198f256; requiredopenclaw/ci-gateis SUCCESS. The focused commands test-type graph and configured changed-file oxlint also passed with the fresh PR-owned dependencies.The same defect exists in stable tag
v2026.7.1-2. Local blame stops at a shallow-history boundary, so the original introducing author/PR is unknown and that boundary is not attributed as the introduction.Earlier shared-install build attempts encountered existing checkout dependency issues (missing worktree dependency roots, then an installed TUI dependency lacking
TuiMainScreen). Installing frozen dependencies in the native PR-owned checkout resolved these without changing product code. A remote changed-gate upload timed out before tests ran; its Blacksmith test machine was stopped and verified completed. Local gate results are recorded above.The latest ClawSweeper review on this exact head has no actionable code, test, documentation or security findings. Its rank-up move, finishing exact-head CI and focused onboarding validation, is complete. Independent maintainer review and fresh Codex autoreview are also complete; landing uses the native prepare/merge flow.
The CLI proof runs
node openclaw.mjs onboard --non-interactive --accept-risk --auth-choice skip --skip-health --skip-hooks --skip-bootstrap --skip-channels --skip-search --skip-ui --no-install-daemon --json, with optional--node-manageroverrides, against isolated config seeded with each saved manager. State is created byscripts/lib/openclaw-test-state.mts create --scenario minimal; only the expected manager result is reported, and each temporary root is removed afterward. No daemon, real provider, external package installation, or live user state is involved.AI-assisted maintainer repair. No credentials, live user configuration, or running Gateway were changed.