fix(onboard): skip API-key prompt when user skipped installing the skill (#74382)#74891
fix(onboard): skip API-key prompt when user skipped installing the skill (#74382)#74891lonexreb wants to merge 3 commits intoopenclaw:mainfrom
Conversation
|
Codex review: needs real behavior proof before merge. Summary Reproducibility: yes. Source inspection gives a high-confidence reproduction: current main can present the keyless local Whisper install option and then prompt for a separate missing primary-env skill because the post-install loop scans all missing skills. Real behavior proof Next step before merge Security Review detailsBest possible solution: Merge this PR after the contributor adds live after-fix Do we have a high-confidence way to reproduce the issue? Yes. Source inspection gives a high-confidence reproduction: current main can present the keyless local Whisper install option and then prompt for a separate missing primary-env skill because the post-install loop scans all missing skills. Is this the best way to solve the issue? Yes for the code direction. The latest What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 70f34bf1779c. |
There was a problem hiding this comment.
Pull request overview
Fixes openclaw onboard skills wizard prompting for API keys for skills the user did not opt into installing (specifically avoiding an OPENAI_API_KEY prompt when only the local openai-whisper skill was selected).
Changes:
- Track which skills were selected in the “Install missing skill dependencies” multiselect.
- Gate the post-install env-key prompt so bin-bearing skills only prompt when they were selected for install.
- Add regression tests covering the skip-install vs opt-in-install API-key prompt behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/commands/onboard-skills.ts |
Tracks selected installs and skips env-key prompting for unselected bin-missing skills |
src/commands/onboard-skills.test.ts |
Adds tests to assert OPENAI_API_KEY prompt is skipped/triggered appropriately |
| if (skill.missing.bins.length > 0 && !installSelected.has(skill.name)) { | ||
| continue; | ||
| } |
…for env-only skills (openclaw#74382) Address Codex/clawsweeper P2 on PR openclaw#74891: the bins-only guard let `openai-whisper-api` (env-only missing on hosts with curl present) prompt for OPENAI_API_KEY even when the user opted into only the local `openai-whisper` skill. Bring env-only-missing skills into the dependency multiselect so the user gets an explicit Set up missing skill dependencies choice for them, then tighten the post-install prompt guard to require selection regardless of whether binaries are missing. The install loop already short-circuits env-only entries via `installable.find()`. Tests: add two regression cases — env-only skill not selected (no prompt) and env-only skill explicitly selected (prompt + no install attempted). All 6 setupSkills tests pass.
|
Round-2 review addressed in bd7fa0a. The bot was right — the bins-only guard left P2: env-only API skill promptsBrought env-only-missing skills (those with Changes in
P3: changelog entryAdded a Regression testsAdded two cases in
All 6 Acceptance criteria status (from the bot):
@codex review |
|
Codex Review: Didn't find any major issues. Nice work! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
bd7fa0a to
1e512ce
Compare
…for env-only skills (openclaw#74382) Address Codex/clawsweeper P2 on PR openclaw#74891: the bins-only guard let `openai-whisper-api` (env-only missing on hosts with curl present) prompt for OPENAI_API_KEY even when the user opted into only the local `openai-whisper` skill. Bring env-only-missing skills into the dependency multiselect so the user gets an explicit Set up missing skill dependencies choice for them, then tighten the post-install prompt guard to require selection regardless of whether binaries are missing. The install loop already short-circuits env-only entries via `installable.find()`. Tests: add two regression cases — env-only skill not selected (no prompt) and env-only skill explicitly selected (prompt + no install attempted). All 6 setupSkills tests pass.
…for env-only skills (openclaw#74382) Address Codex/clawsweeper P2 on PR openclaw#74891: the bins-only guard let `openai-whisper-api` (env-only missing on hosts with curl present) prompt for OPENAI_API_KEY even when the user opted into only the local `openai-whisper` skill. Bring env-only-missing skills into the dependency multiselect so the user gets an explicit Set up missing skill dependencies choice for them, then tighten the post-install prompt guard to require selection regardless of whether binaries are missing. The install loop already short-circuits env-only entries via `installable.find()`. Tests: add two regression cases — env-only skill not selected (no prompt) and env-only skill explicitly selected (prompt + no install attempted). All 6 setupSkills tests pass.
1e512ce to
a7e0e73
Compare
…ill (openclaw#74382) When the onboard skills wizard prompted for API keys, it iterated over every missing skill — including ones whose binary deps the user had just chosen NOT to install in the install multiselect. The reported case was selecting only the local 'openai-whisper' (no API key) and still being asked for OPENAI_API_KEY (which actually belonged to the separate 'openai-whisper-api' skill). Track which skills the user opted into and only prompt for an API key when the skill is either env-only (no missing bins) or its bins were just selected for install. Add two regression tests covering the skip-install and opt-in-install paths. Closes openclaw#74382
…for env-only skills (openclaw#74382) Address Codex/clawsweeper P2 on PR openclaw#74891: the bins-only guard let `openai-whisper-api` (env-only missing on hosts with curl present) prompt for OPENAI_API_KEY even when the user opted into only the local `openai-whisper` skill. Bring env-only-missing skills into the dependency multiselect so the user gets an explicit Set up missing skill dependencies choice for them, then tighten the post-install prompt guard to require selection regardless of whether binaries are missing. The install loop already short-circuits env-only entries via `installable.find()`. Tests: add two regression cases — env-only skill not selected (no prompt) and env-only skill explicitly selected (prompt + no install attempted). All 6 setupSkills tests pass.
… in multiselect Copilot review on PR openclaw#74891 noted that the new installSelected gate at src/commands/onboard-skills.ts:219 silently skipped the API-key prompt for skills that have missing bins + primaryEnv but no install options. Such skills are never offered in the install multiselect (they're filtered out of installable because install.length === 0, and out of envOnlyConfigurable because missing.bins.length > 0), so they can never be in installSelected — the gate was unconditional for them. Track presentableNames as a Set of skills that actually appeared in the multiselect, then only skip when the skill was both presented AND not picked. Skills that were never presented (the documented bin-only no-install pattern in docs/tools/skills.md) keep getting prompted for their required env key. Add a regression test that builds such a skill (install: []) and asserts the API-key prompt still fires.
a7e0e73 to
f0fb38c
Compare
|
Addressed Copilot review on |
Summary
openclaw onboard, the skills wizard listed🎤 openai-whisperwith the description "Local speech-to-text with the Whisper CLI (no API key)" and the user opted in to install only that one. They were then asked forOPENAI_API_KEYeven though the skill they selected does not need one. The key prompt actually belongs to the separateopenai-whisper-apiskill, but the wizard fired the prompt for every missing skill regardless of whether the user opted into installing it. Reported as [Bug]: Asks for OpenAI Whisper/ElevenLabs API key even though initial list says KEY not needed #74382.src/commands/onboard-skills.test.ts.Change Type
Scope
Linked Issue/PR
Root Cause
The post-install env-key loop in
src/commands/onboard-skills.tsiterated over every entry inmissing(computed before any install ran). Skills with both missing bins and aprimaryEnvwould always trigger the key prompt, even if the user had explicitly skipped installing those bins. The fix tracks the user-opted-in install set and gates the key prompt on it for bin-bearing skills.Test Plan
pnpm test src/commands/onboard-skills.test.ts— 4/4 pass (2 existing + 2 new):OPENAI_API_KEYwhen only the localopenai-whisper(no key) was selected.OPENAI_API_KEYwhenopenai-whisper-apiwas selected.pnpm tsgo:core,pnpm tsgo:core:test— clean.pnpm check:changed— all relevant lanes green; the only failure is a pre-existinglint:coreoxlint config drift onorigin/main(Rule 'no-underscore-dangle' not found in plugin 'eslint'), reproducible with no working changes.Real behavior proof
After-fix evidence from a real OpenClaw checkout:
The new third test exercises the documented bin-only no-install pattern from
docs/tools/skills.md(skill with missing bins +primaryEnvbutinstall: []). Before the fix, the gate atsrc/commands/onboard-skills.ts:219skipped the API-key prompt for those skills because they were never offered in the install multiselect and so could never appear ininstallSelected. After the fix,presentableNamestracks which skills were actually offered, and the gate only fires when the skill was both presented AND not selected — so non-installable bin+env skills still get prompted.Reproduction shape (matches the wizard's behavior in a real run):
requires.bins: [some-bin]+primaryEnv: SOME_KEYand noinstall:block.missingwithmissing.bins.length > 0.installable(no install options) andenvOnlyConfigurable(has missing bins), so it never appears in the multiselect.presentableNamesdoes not contain this skill, so the gate falls through and the prompter asks forSOME_KEY.