Repository navigation
fix(cli): let interrupted ID status checks exit promptly - #197747
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 interrupted ID status reads and suppresses late reports and cancellation errors. Example: Send SIGINT while
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this PR fixes a verified current-main cancellation defect with a focused patch and sufficient real-behavior proof; no introduced bugs were found. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe ID CLI reads Gateway status and owner-link details through the shared RPC client, then formats text or JSON; the command work scope supplies cancellation. flowchart TD
A[CLI command scope] --> B[ID status action]
B --> C[Gateway RPC client]
C --> D[Gateway status]
C --> E[Gateway people]
D --> F[Status formatter]
E --> F
A --> G[Interrupt cleanup]
Technical reviewBest possible solution: Land the focused signal propagation and quiet cancellation handling while preserving committed rebind reporting. Do we have a high-confidence way to reproduce the issue? Current-main source omits cancellation at both RPC calls, matching the supplied red CLI receipts and collaborator reproduction; no target code was executed during this review. Is this the best way to solve the issue? This is the smallest complete repair using the existing command scope and transport cancellation owner, with output suppression covering asynchronous formatting. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 5d6a026e4375. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +15. Total +15 across 1 file. 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. Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. 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 (1 earlier review cycle)
Reviewed November 12, 2026, 9:51 AM ET / 14:51 UTC (Revision 2). |
|
Proof on the built CLI ( Main: through the default launcher, the CLI never stops itself; the launcher force-kills it and the command ends with 137. Without the launcher ( Round 2 (SIGTERM plain, SIGINT Candidate: every run, both rounds, both paths: exits within 1 s with 130 (SIGINT) or 143 (SIGTERM). The only output is the existing "Command interrupted by …" line; nothing prints late. Controls, same output on main and the candidate (diff is empty): an uninterrupted Candidate checks: |
|
ClawSweeper status: applying reviewed decision. I am applying the reviewed decision for this pull request: fix(cli): let interrupted ID status checks exit promptly This is item 1/1 in the current shard. Shard 1/1. This transient lease prevents a newer review from overlapping label, comment, or close mutations. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Thanks @obviyus for testing both launcher paths and preserving the rebind behavior while landing this! |
…7747) fix(cli): stop id status Gateway requests when interrupted openclaw id status noticed Ctrl-C or SIGTERM but kept its Gateway status and people-link requests open. Under the normal launcher the command never stopped on its own and was killed with exit 137; without respawn it waited for the reply and could print the full report after the interrupt. Both requests now take the command's abort signal, and an abort after interrupt ends quietly with the existing interrupt exit code. Uninterrupted status, Gateway errors and rebind are unchanged. No new text. Evidence: the built CLI in a secretless node:24.22.1 container against a stand-in Gateway that holds the status reply for 30 s, plain and --json, SIGINT and SIGTERM, main twice and candidate twice. On main the launcher killed the command after 2-4 s with exit 137, and with OPENCLAW_NO_RESPAWN=1 it waited about 30 s and printed the report late in three of four runs. With this change every run exits within 1 s with 130 or 143 and prints only the existing interrupt line. Uninterrupted status in text and JSON, a key rotation through id rebind and a Gateway error are identical on both. Net test lines 0. Details: openclaw#197747 (comment). Thanks @Alix-007. Co-authored-by: Ayaan Zaidi <[email protected]>
What Problem This Solves
Fixes:
openclaw id statusacknowledges an interrupt while waiting for Gateway status or identity details, but keeps the request alive until the launcher forcibly kills the command.User Impact
User impact: interrupted ID status checks close their connection and exit with the normal SIGINT/SIGTERM status, without printing a late report or command-failed banner. Key rotation and publication settlement retain their existing behavior.
Why This Change Was Made
Forward the existing command signal to both read stages, and keep interruption quiet at the status action and final formatter. The shared people reader opts in only for status; its post-commit publication caller remains separate.
Evidence
Product HEAD:
a7a5630312e519d55bb56e0d986b26109d3bf134; acceptance-red BASE:b48d16bf6e98f0b9c1e110548fc46b3b35f2becd.qaRuntimebuilds runnode openclaw.mjs id statusin a controlling PTY against a real isolated Gateway. A transparent proxy holds a successful realopenclawId.statusoropenclawId.peopleresponse. The owner link is created through the canonical ID authority and persisted in SQLite.pnpm test src/cli/id-cli.commands.test.ts src/cli/id-cli-rebind.test.ts --maxWorkers=1. Types, typed lint and formatting pass. Clean exact-HEAD QA build: 279.448 s. Independent adversarial review: PASS, no findings.Reproduce with the unchanged collector:
python3 id-read-proof-v3.py CHECKOUT FRESH_OUTPUT NODE26 EXPECTATION. Environment, commands and observations, BASE receipt, HEAD receipt, actual terminal/RPC output, and independent review.Production +22/−7 lines; tests +27/−0 lines, two files. Uses the existing RPC cancellation owner; no new configuration, protocol/schema, permission, dependency or migration requirement. Upstream CI is checked after publication.
Not tested: external Discovery/issuer or account sign-in, a live production recovery/key rotation, Windows/macOS or production load. This is local Gateway/SQLite/Linux PTY proof; rebind has the existing focused regression controls.