Repository navigation
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 changesCancel interrupted node inventory requests and suppress their results and cancellation errors. Example: Press Ctrl-C while
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR fixes a demonstrated cancellation bug, and the committed regression resolves the previous finding; no actionable defects remain. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherNode inventory commands use the CLI work scope and shared Gateway RPC transport to read pairing and connection information and render tables or JSON. flowchart LR
A[Node inventory command] --> B[Read command wrapper]
C[CLI work scope] --> B
B --> D[Node RPC helpers]
C --> D
D --> E[Shared Gateway transport]
E --> F[Gateway inventory RPC]
Technical reviewBest possible solution: Land the focused read-cancellation change with its regression once required CI passes. Do we have a high-confidence way to reproduce the issue? Current-main source omits cancellation propagation, and supplied paired main/candidate PTY traces demonstrate the failure; no target code was executed during this read-only review. Is this the best way to solve the issue? The patch uses the existing work scope and transport, preserves mutation receipts, and adds one focused regression without introducing another lifecycle owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 93e4800f6df9. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +32, Tests -2. Total +30 across 5 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:
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 11, 2026, 8:16 AM ET / 13:16 UTC (Revision 4). |
…ry-read-cancellation-20261111
…ry-read-cancellation-20261111
|
Proof for head 881bcd1: main merged in, plus one commit on top of the contributor commit. The proof binaries were built from 83988c0, which has the same production code; the only later change is a main merge. What changed on top of the contributor commit:
Setup:
On this PR, nothing prints after the interrupt notice. Controls, same on main and this PR:
Run logs |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
🦞👀 Re-review progress:
|
|
Added the regression the review asked for, keeping test lines net negative (+12/-14 in
No production change since the last proof (head 0218bf8); main is merged. @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Thanks @obviyus for adding the late-settlement regression and keeping the test footprint down! |
fix(nodes): stop pending nodes reads promptly on Ctrl+C Pressing Ctrl+C during openclaw nodes status, list, pending or describe did not reach the Gateway request, so the CLI kept the socket open until the launcher force-killed it about 2 seconds later. These four read commands now pass the command's existing abort signal and print nothing once aborted, including a reply that settles after the abort. Node changes, approve, reject, remove, rename and invoke, media and push calls are unchanged. No text changes. Evidence: a real Gateway with a real paired headless node host, a WebSocket proxy holding the read responses and Ctrl+C sent in a real PTY with --json. On main all four commands were force-killed about 2.1 s after Ctrl+C with the socket closing only then; with this change each exits 130 within 0.03-0.15 s with a normal close and nothing printed after the interrupt notice, and SIGTERM exits 143. Uninterrupted reads, nodes approve, re-approving an accepted request and the older-Gateway fallback behave the same on both. One compact regression for a reply settling after Ctrl+C fails without the check, at -2 net test lines. Details: openclaw#197185 (comment) and openclaw#197185 (comment). Thanks @Alix-007. Co-authored-by: Ayaan Zaidi <[email protected]>
fix(cli): stop nodes camera list and location get on Ctrl-C and SIGTERM `openclaw nodes camera list` and `nodes location get` called node.invoke through the wrapper that ignores the CLI's abort signal, so a Ctrl-C or SIGTERM while the node was still answering left the CLI waiting until the cleanup watchdog force-killed it. Both read-only commands now use the existing runNodesReadCommand wrapper that passes the signal, as the other node reads do since #197185. Commands that change node state (invoke, snap, clip, run) are unchanged. No new text. Evidence: dist-nodts in a secretless Linux container with a real Gateway (token auth) and a real paired Linux headless node whose location.get waits for a GeoClue fix (`nodes location get` naturally took about 18 s before LOCATION_TIMEOUT); no proxy or held replies. SIGINT and SIGTERM about 1 s in: base was force-killed after about 2 s and the socket dropped (1006); this change exits 130 and 143 within 54 ms with a clean close (1005) and nothing printed after the interrupt notice. Uninterrupted output, `nodes invoke` and `camera snap` behave the same on both. Vitest-source: the cancellation cases fail on base and 76 nodes-cli tests pass here; full build and packed smoke pass. Net -3 test lines; two stale mock-baseline entries for the removed mocks are deleted. Receipts: #199388 (comment). Thanks @wangmiao0668000666. Co-authored-by: Ayaan Zaidi <[email protected]>
…aw#199388) fix(cli): stop nodes camera list and location get on Ctrl-C and SIGTERM `openclaw nodes camera list` and `nodes location get` called node.invoke through the wrapper that ignores the CLI's abort signal, so a Ctrl-C or SIGTERM while the node was still answering left the CLI waiting until the cleanup watchdog force-killed it. Both read-only commands now use the existing runNodesReadCommand wrapper that passes the signal, as the other node reads do since openclaw#197185. Commands that change node state (invoke, snap, clip, run) are unchanged. No new text. Evidence: dist-nodts in a secretless Linux container with a real Gateway (token auth) and a real paired Linux headless node whose location.get waits for a GeoClue fix (`nodes location get` naturally took about 18 s before LOCATION_TIMEOUT); no proxy or held replies. SIGINT and SIGTERM about 1 s in: base was force-killed after about 2 s and the socket dropped (1006); this change exits 130 and 143 within 54 ms with a clean close (1005) and nothing printed after the interrupt notice. Uninterrupted output, `nodes invoke` and `camera snap` behave the same on both. Vitest-source: the cancellation cases fail on base and 76 nodes-cli tests pass here; full build and packed smoke pass. Net -3 test lines; two stale mock-baseline entries for the removed mocks are deleted. Receipts: openclaw#199388 (comment). Thanks @wangmiao0668000666. Co-authored-by: Ayaan Zaidi <[email protected]>
What Problem This Solves
Fixes:
nodes status,list,pendinganddescribeacknowledge Ctrl-C while their Gateway inventory request stays pending until the CLI launcher uses SIGKILL.User Impact
User impact: inventory reads close their pending connection and exit 130/143 quietly after SIGINT/SIGTERM. Normal results and admitted node operations retain their receipts, including interruption during a mutation's preparatory lookup.
Why This Change Was Made
Pass the read owner's signal explicitly through RPC authentication and exact older-Gateway resolver fallback. Let cancellation escape optional list enrichment, then settle it before generic error output. Shared RPC/resolver defaults, mutation preparation, node.invoke/media/push, SDK/Canvas and approval custody remain unchanged.
Evidence
HEAD
3a52fcc1cc1e07b96986b9224922f202250a3174; acceptance-red BASE83872e599d5720c0bc97d313283a2bc245046699. Identical frozen V3 runs the normal built CLI with a controlling PTY and loopback WebSocket recorder: 30/30 expected outcomes per version. BASE's 18 interrupted reads require launcher SIGKILL; HEAD naturally exits 130/143 in 98.79–159.68ms and closes the held connection in 28.99–41.96ms, with no result/error JSON or failure banner. Ten ordinary controls return their results; two interrupted mutation controls retain the receipt and exit130 in 697.10/672.68ms. Config bytes stay unchanged; no watchdog or owned process/connection remains before recorder cleanup.133 tests across nine files, 19.876s; scoped types/lint/format, ratchet/line-cap, changed-source mock audit and clean cliStartup build(268.128s) pass. Independent exact-head fallback review:PASS, no verified P0–P3 findings. Production +91/-40; tests +109/-0(net 109 LF, exact 109-line grant). Earlier source-equivalent gate receipts retain their original bindings; broad CI remains pending.
Immutable collectors, paired receipts/raw streams, held-connection records, checked gates and review. Evidence is outside the product branch.
Use clean normally built BASE/HEAD checkouts, fresh outputs and red/green expectations. The compatible recorder proves native CLI transport lifecycle; it does not claim real Gateway storage or paired-node effects. Isolated synthetic HOME/config/state/workspace only. Not tested: real Gateway storage effects, real paired nodes or provider behavior, external services, Windows/macOS and broad repository CI.