Repository navigation
fix(skills): Ctrl-C leaves verification requests running - #195342
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 changesThis PR cancels pending skill verification and Skill Card reads when the CLI is interrupted and suppresses subsequent output. Example: Press Ctrl-C while
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this PR fixes a current-main cancellation bug with a focused change and no actionable findings. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe skills CLI resolves the requested skill, calls the existing ClawHub HTTP readers, and prints verification JSON or Skill Card Markdown; the invocation scope supplies cancellation. flowchart TD
A[CLI invocation scope] --> B[Skills verify command]
B --> C[Skill target resolver]
C --> D[Verification HTTP reader]
D --> E[Optional card HTTP reader]
D --> F[CLI output]
E --> F
Technical reviewBest possible solution: Retain this focused repair using the existing invocation scope and HTTP cancellation owners. Do we have a high-confidence way to reproduce the issue? Current-main source confirms missing signal forwarding, and supplied paired Linux CLI receipts demonstrate the failure and recovery; no target code was executed during this review. Is this the best way to solve the issue? The patch repairs the command's missing cancellation wiring without introducing another owner, timeout, retry policy, or public option. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against f24c2097d581. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +18, Tests 0, Docs +1, Other -1. Total +18 across 4 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. 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 HistoryReview history (3 earlier review cycles)
Reviewed November 15, 2026, 11:39 AM ET / 16:39 UTC (Revision 4). |
|
Removed the stale workspace-mock baseline entry; the shrinking baseline check now passes. Rebuilt this head and replayed both real PTY cancellation cases and success controls. @clawsweeper re-review |
|
The current head @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Validated merged head Natural user-path proofTier: source, host through The harness recorded the process tree and the real OpenClaw PID owning the Seconds from signal delivery to observed real CLI exit:
Observed main behavior: the interruption notice was followed roughly 95 seconds later by a timeout report, then exit 130/143. This was a late-report result, not an observed watchdog kill. Candidate: nothing was printed after the interruption notice in any interrupted verification run. The remaining 7–10 seconds matches the unchanged search control; its cause was not isolated. Selected normalized transcript, main JSON mode: Candidate, same action: Without interruption, both sides exited 1 with the identical JSON connection-error message above (98.288 / 102.614 seconds total). Search cancellation also retained exit 130 and printed no late result on either side. Focused checks and limits
The natural Full package proof and final scope
Merge danger: reversible code/docs change. Blast radius: cancellation and late output from ClawHub skill verification and card reads. Hosted gates on validated head
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Thanks @obviyus — I appreciate the main integration and the socket-owner timing comparison. The distinction between the CLI and launcher signals is really useful. |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Thanks @obviyus for validating the real pending-connect behavior, preserving the interrupt controls, and landing this! |
…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]>
What Problem This Solves
Fixes
skills verifyneeding a launcher force-kill when Ctrl-C interrupts a pending verification or Skill Card response.User Impact
Operators can cancel both reads promptly while successful verification JSON and card output keep working.
Why This Change Was Made
Forward the existing invocation signal to both already-cancellable HTTP readers, and stop the command before starting another read or publishing a result after interruption. This completes the verification/card read owner in one change, following the accepted search/Trending cancellation behavior.
Evidence
Normal shipped CLI, real controlling Linux PTY and terminal Ctrl-C; passive HTTP connection readback. Product head:
ef29337d9783c4599cbe50d155d9f98b3a61f8aa, clean normalcliStartupbuild. Same frozen collector and scenario on base5fe1403b94d74f8a933ca50a778e6c9bfdfd7b78and this head:Actual HEAD PTY output for each interruption begins:
The normal controls return
"decision": "pass"and# Synthetic verified card completed. The baseline already suppresses late output; the native defect proved here is failure to cancel the pending read cooperatively.Inspectable BASE receipt · HEAD receipt with request, PTY and process observations · exact collector. The evidence is pinned to a separate immutable evidence commit; no proof assets are included in this product branch.
Focused final owner suite: 8 passed, 46.862 s wall (
node scripts/run-vitest.mjs src/cli/skills-cli.verify.test.ts --maxWorkers=1). The unchanged search sibling (4 tests) and large failed-report process-drain control (1 test, 8.023 s test time) passed in the earlier focused run and are reused for those unchanged inputs. Scoped semantic types (27.146 s), ordinary typed lint (33.485 s), formatting (0.501 s), and test-line ratchet (44.239 s) pass. Normal exact-head build: 3m 52.7s. The removed workspace mock is also removed from its shrinking baseline;check-test-mock-exportspasses with 6,360 entries (46.118s). Production, tests and docs remain byte-identical to the independently reviewed initial revision. Hosted CI for this head is pending.Reproduction, scope and limits
node openclaw.mjs skills verify @demo-owner/weather, and the same command with--card. The normal launcher is used, without a no-respawn override.node --import ./scripts/tsx.mjs scripts/build-all.mts cliStartupin each clean checkout. Replay the linked unchanged collector:python3 collector.py "$CHECKOUT" "$NEW_OUTPUT" "$NODE26/bin/node" "$EXPECTATION", withredon base andgreenon head. Collector SHA-256:9f3273fd18577cea11b0b803105b67d2a890a26d0974d9d05cc0b871a0061b45.Maintainer validation
Merged current main without rebasing; both contributor commits are retained. Validated
5874c85013a574f74a83500e5eafe014ace6b84e: single-PID PTY receipts, twice-per-side verification/card modes, controls, regression, full build and packed smoke. Main printed late timeout reports about 95 seconds after interruption; the candidate printed nothing after the notice and exited in 7–10 seconds, matching the existing search control.Merge danger: reversible code/docs change. Blast radius: ClawHub verification/card cancellation and late output.
Stale-landing refresh
Current head:
79555c49e8eb82161963c310bd0b9b5430162c49, after merging current main without rebasing. The cancellation owner did not conflict. The PR still removes exactly one mock allowance and adds exactly one docs line; the mock-exports ratchet, 8 verification tests and matching test typecheck passed again. Refresh receipt and retained runtime/full proof.