Repository navigation
fix(skills): skills update --all keeps replacing skills after Ctrl+C - #198163
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThe skills CLI passes its interrupt signal to the update loop so Ctrl+C prevents further skill updates while the active update finishes. Example: Press Ctrl+C while s1 downloads during a bulk update from 1.0.0 to 1.1.0.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this PR fixes a current cancellation bug with a focused patch and convincing CLI proof; no actionable defects found, and current-head CI remains pending. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe skills CLI resolves the selected workspace and calls the ClawHub lifecycle owner, which updates tracked skill files and metadata through the existing installation path. flowchart TD
A[Terminal Ctrl C] --> B[CLI cancellation scope]
B --> C[Skills update command]
C --> D[ClawHub update loop]
D --> E[Existing skill installer]
E --> F[Skill files and tracking metadata]
B --> G[Exit 130 after cleanup]
Technical reviewBest possible solution: Retain the existing cancellation scope and installation owner, stopping only the admission of subsequent skill updates. Do we have a high-confidence way to reproduce the issue? Current-main source confirms the uncancelled bulk loop, and supplied before/after PTY captures demonstrate the failure through the built CLI; no target code was executed during this review. Is this the best way to solve the issue? This is the smallest complete repair: forward the existing interrupt signal and check it before each update while preserving admitted writes and their receipts. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 4aa0168e1f2a. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +7, Tests 0. Total +7 across 3 files. Added test files: 0. View PR surface stats
Preflight sourceSource stale. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReviewed November 13, 2026, 5:11 AM ET / 10:11 UTC (Revision 3). |
|
Proof on the built CLI ( Main ( Candidate (this branch): alpha finishes and is recorded, no other skill starts, exit 130. Controls on the candidate: an uninterrupted Cleanup on top of the contributor commit: removed the test-lines allocation file and the docs note, dropped the CLI mock assertion, and replaced the bulk-update test with a smaller one (net test lines 0). |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
…lls-update-all-ctrl-c
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Landed in aab5100. Thanks @masatohoshino. |
The describe and delete/patch loops resolve one key per Gateway RPC but never read the command's cancellation signal, so Ctrl+C while deleting several sessions keeps mutating the remaining keys until the CLI is force-killed. Forward the shared interrupt signal through both loops and stop starting further work once it fires; an operation already in flight finishes. This follows the skills update fix in openclaw#198163. Co-Authored-By: nebulacoder-v8.0 <[email protected]>
…penclaw#198163) fix(skills): stop skills update --all from starting more skills after Ctrl-C After Ctrl-C, openclaw skills update --all kept downloading and replacing every remaining skill until the launcher force-killed it, and that kill could land between replacing a skill's files and recording its version in lock.json. The CLI now passes the command's abort signal, and the update loop starts no further skill once it is aborted; a skill already in progress finishes. Uninterrupted --all runs and single-skill updates are unchanged. No new text. Evidence: the built CLI with a real terminal Ctrl-C against a local ClawHub stand-in with three tracked skills, with the first download held. On main it went on to install the other two skills after Ctrl-C and was force-killed with exit 137, leaving one skill with new files and its old lock.json version. With this change the in-progress skill finishes and is recorded, the other two keep their files and versions, and it exits 130. An uninterrupted --all run and a single-skill update behave the same on both. A compact aborted-signal test fails without the loop check, at net 0 test lines. Details: openclaw#198163 (comment). Closes openclaw#198162. Thanks @masatohoshino. Co-authored-by: Ayaan Zaidi <[email protected]>
fix(cli): stop skills verify ClawHub reads on Ctrl-C and SIGTERM `openclaw skills verify` (and `--card`) called the ClawHub verification and card readers without the command's abort signal, so a Ctrl-C or SIGTERM during a slow ClawHub request left the request running and the CLI printed a late report after the interrupt notice. Both readers already accept a signal; the verify action now passes the existing one, as `skills status` (#198298), `skills update --all` (#198163) and `skills search` already do. No new text. Evidence: host, isolated state, a workspace with an installed ClawHub skill, `OPENCLAW_CLAWHUB_URL` pointed at an unroutable address so the TCP connect naturally stays in SYN_SENT; SIGINT and SIGTERM sent to the real OpenClaw CLI process (ocx src traps terminal signals), twice per side. Base exits 130/143 only after about 95 s and prints a late timeout report after the interrupt notice; this change exits 130/143 in 7-10 s with no output after the notice, the same time as the existing `skills search` cancellation control on this host. Uninterrupted errors are identical. Vitest-source: two cases fail on base, 8 pass here; full build and packed-install smoke pass. Receipts: #195342 (comment). Thanks @Alix-007. Co-authored-by: Ayaan Zaidi <[email protected]>
…5342) fix(cli): stop skills verify ClawHub reads on Ctrl-C and SIGTERM `openclaw skills verify` (and `--card`) called the ClawHub verification and card readers without the command's abort signal, so a Ctrl-C or SIGTERM during a slow ClawHub request left the request running and the CLI printed a late report after the interrupt notice. Both readers already accept a signal; the verify action now passes the existing one, as `skills status` (openclaw#198298), `skills update --all` (openclaw#198163) and `skills search` already do. No new text. Evidence: host, isolated state, a workspace with an installed ClawHub skill, `OPENCLAW_CLAWHUB_URL` pointed at an unroutable address so the TCP connect naturally stays in SYN_SENT; SIGINT and SIGTERM sent to the real OpenClaw CLI process (ocx src traps terminal signals), twice per side. Base exits 130/143 only after about 95 s and prints a late timeout report after the interrupt notice; this change exits 130/143 in 7-10 s with no output after the notice, the same time as the existing `skills search` cancellation control on this host. Uninterrupted errors are identical. Vitest-source: two cases fail on base, 8 pass here; full build and packed-install smoke pass. Receipts: openclaw#195342 (comment). Thanks @Alix-007. Co-authored-by: Ayaan Zaidi <[email protected]>
…penclaw#198163) (cherry picked from commit aab5100) Co-authored-by: Ayaan Zaidi <[email protected]> Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit 4a7b1933ff772c42c72fb0e08c4f80cc3350b417) (cherry picked from commit 2085d521f61902f076fc0f7f7cd0a329b0a28517)
Closes #198162
What Problem This Solves
Fixes: after Ctrl+C,
openclaw skills update --allkeeps resolving, downloading and replacing every remaining tracked skill until the CLI is force-killed.User Impact
User impact: Ctrl+C during
openclaw skills update --allnow lets the skill that is updating finish, starts no other update, and exits 130. Skills that were not reached stay at their installed version.Why This Change Was Made
The bulk update loop never read the command's cancellation signal. It now stops starting new skill updates once the signal fires. The CLI passes its existing interrupt signal. This follows #197508, which did the same for
openclaw sessions import --all.Evidence
Maintainer re-proof at
ca3fe8642251(real pty Ctrl+C, main vs candidate, controls): #198163 (comment)Tested at this PR's head (base
main53368c0ef6de).Setup:
HOME, state directory and config, on a fresh copy of one seed per run.s1..s5at 1.0.0.OPENCLAW_CLAWHUB_URLpoints at a local stand-in ClawHub. It answers install resolution, security verdicts and archive downloads, offers 1.1.0 for every skill, and logs each request.s1's archive download. Ctrl+C is sent 0.2 s after the hold, and the download is released 300 ms later.main53368c0ef6dein a clean checkout. The After build is from an earlier commit of this branch whose production code and docs equal this head; later commits changed only tests.Before (base
main53368c0ef6de),...marks omitted lines (banner, ClawHub audit boxes, stand-in request log):After (this PR), same omissions:
Observed result:
s2ands3; the stand-in logged their requests after Ctrl+C.s3's install. That lefts3's files at 1.1.0 and its lock entry at 1.0.0. How far it gets before the kill depends on timing: an earlier base run reacheds4.s1finishes and the CLI exits 130. The stand-in sees no request fors2..s5, and they stay at 1.0.0 in the lock and on disk.skills update --allwith the same build updates all five skills and exits 0.Full captures:
Checks:
src/skills/lifecycle/clawhub.remote.test-support.ts, run bysrc/skills/lifecycle/clawhub.test.ts): with an already-aborted signal,update --allstarts no skill and fetches no install resolution. It fails with the loop check removed and passes at the head.--maxWorkers=1:clawhub.test.ts67 tests in 10.57 s wall (Vitest 6.02 s; the new test 190 ms);skills-cli.commands.test.ts34 tests in 6.79 s wall (Vitest 4.63 s). CI seconds come from this PR's CI.src/skills/lifecycle/clawhub.test.ts,src/cli/skills-cli.commands.test.ts,src/cli/skills-cli.test.ts,src/gateway/server-methods/skills.clawhub.test.ts,src/gateway/server-methods/skills.update.normalizes-api-key.test.ts,src/cli/skills-cli.clawhub-install.e2e.test.ts.pnpm check:changed: passed (format, lint, typecheck and the repository guards for the changed files).Local review: autoreview (Codex gpt-6.1-sol, high), base
53368c0ef6deto this PR's head, priority P0–P1, with the cancellation scope, the ClawHub update owner and the skills CLI as context: scoped-clean, no findings.Not covered:
skills.updatemethod is unchanged.openclaw plugins update --all(and its deprecated aliasopenclaw hooks update --all) loops over plugins and hook packs the same way and passes no cancellation signal (src/cli/plugins-update-command.ts,src/plugins/update-installed.ts,src/hooks/update.ts). It is left for a separate change.src/cli/skills-cli.tsforskills verify. The two changes touch different commands.