Skip to content

fix(users): stop interrupted profile list requests - #197322

Merged
obviyus merged 4 commits into
openclaw:mainfrom
Alix-007:alix/fix-users-read-cancel-20261112
Nov 11, 2026
Merged

obviyus merged 4 commits into
openclaw:mainfrom
Alix-007:alix/fix-users-read-cancel-20261112

Conversation

@Alix-007

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes: interrupting openclaw users list leaves the pending Gateway request alive until the launcher forcibly kills the CLI about two seconds later.

User Impact

Profile-list queries now stop promptly on Ctrl-C/SIGTERM and exit 130/143 without a late result or error. Email-link and profile-merge operations still report their admitted write receipts.

Why This Change Was Made

Connect the existing command cancellation signal to the existing profile-list transport and guard its result/error publication. This follows accepted read cancellation in #197185 and preserves the read/admin scopes and both writer paths. No configuration, protocol/schema, permission-policy or upgrade changes.

Evidence

Product head: 1d09cf0e2f370f5d4d82b6ca79c1fecf50449d52.
BASE: c324818cbf86074f34578d07f381b0d2835955a1.
Proof command: python3 users-read-cancel-proof-v2.py CHECKOUT FRESH_OUTPUT NODE26 EXPECTATION, unchanged between BASE and HEAD.

  • Actual CLI before/after evidence and collector: the normal built openclaw.mjs runs in a real PTY against a compatible local WebSocket peer. All six interrupted handshake/read scenarios change from launcher SIGKILL at about 2.05 seconds to natural 130/143 within 207 ms; correlated peer closure takes at most 41 ms.
  • BASE streams / HEAD streams: eight ordinary/error/write-receipt controls pass. Seven JSON controls retain byte-identical stdout; the human control retains the exact profile row while allowing its normal startup banner. Zero late read documents, surviving owned CLI groups, unclosed peer connections or collector watchdog kills; 28 isolated config-byte comparisons match.
  • Ten focused tests and scoped checks pass. Independent adversarial final review passes with no findings; this is the authorized fallback, not an official autoreview-tool run.

Production: +17/-7 lines. Tests: +52/-1 lines in the existing test file, with an exact separate 51-LF allocation. Existing transport cancellation was reused after checking the complete list/link/merge owner; no new public options or shared transport policy.

The peer uses synthetic profiles for actual transport/output/lifecycle proof. Not tested: real Gateway profile storage, authority or mutation effects, production users/channels, Windows/macOS or full repository CI. All owned peers were stopped after observation; only isolated fixtures remain.

@clawsweeper

clawsweeper Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation cli CLI command changes size: S labels Nov 11, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 11, 2026
@clawsweeper

clawsweeper Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Connect profile-list requests to command cancellation and suppress results or errors that arrive after interruption.

Example: Press Ctrl-C while openclaw users list --json awaits a Gateway response.

  • Before: The request remains alive until the launcher forcibly kills the CLI.
  • After: The connection closes promptly, no late result prints, and the CLI exits 130.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) Focused, supported by shipped-entry-point evidence, and free of actionable findings; exact-head CI is still running.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (logs): The supplied logs exercise the built CLI in a real PTY against a real Gateway through a response-holding WebSocket proxy, showing prompt SIGINT/SIGTERM cancellation, closed connections, no late output, unchanged ordinary responses, and preserved email-link receipts; the exercised production code is unchanged at the reviewed head.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: An interrupted profile-list command retains its pending connection until forced termination.
Reason: The repair restores expected read cancellation while preserving existing scopes, ordinary output, and admitted write receipts.

Merge readiness

✅ Ready for maintainer review

This PR fixes a current cancellation defect with a focused change; both previous findings are resolved, and no actionable defects remain.

Priority: P2
Reviewed head: 3615683b90a8c68c02e8fd120cdcc2d78896bab1

Before merge

None.

Findings

None.

Agent review details

How this fits together

The users CLI sends scoped profile RPCs through the shared Gateway transport and renders their responses; command lifecycle cancellation now reaches its read operation.

flowchart LR
  A[CLI command lifecycle] --> B[Async work signal]
  B --> C[Users list action]
  C --> D[Shared Gateway RPC transport]
  D --> E[Gateway profile service]
  E --> F[Result publication]
  B --> F
Loading

Technical review

Best possible solution:

Retain this focused repair using the existing command signal and transport teardown owner.

Do we have a high-confidence way to reproduce the issue?

Current-main source shows the missing cancellation signal, and supplied paired real-CLI logs demonstrate the failure and recovery; no target code was executed during this review.

Is this the best way to solve the issue?

This is the smallest complete fix: forward the existing read cancellation signal and prevent late publication without changing shared transport policy or write settlement.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against ea4879279abb.

Provenance checked

  • Profile-list RPC and result publication keeps the original intent (a8b7290: Durable profile support introduced the scoped users.list CLI operation; later outcome reporting preserved its visible results.)
  • CLI regression coverage keeps the original intent (8e9341e: Prior cleanup consolidated low-value tests while retaining meaningful contracts; this change adds an observable cancellation regression without test growth.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

  • Focused cancellation repair: The introduced diff forwards the existing signal only for users.list and suppresses publication after cancellation; link-email and merge remain unchanged. (src/cli/users-cli.ts:51, 3615683b90a8)
  • Current main still needs the fix: Current main calls users.list without a signal and publishes its result unconditionally. (src/cli/users-cli.ts:50, ea4879279abb)
  • Existing transport owns teardown: The transport already rejects aborted requests, closes the client, and forwards cancellation to the pending request. (src/gateway/call.ts:672, 3615683b90a8)
  • Previous findings resolved: The latest commit adds an observable no-late-output regression and qualifies the exit-status documentation; production code is identical to the previously exercised head. (src/cli/users-cli.test.ts:77, 3615683b90a8)
  • Real CLI and Gateway evidence: obviyus supplied paired logs from a built CLI in a PTY against a real token-authenticated Gateway behind a response-holding proxy: interrupted JSON reads exit 130/143, connections close, ordinary output matches, and an admitted email-link receipt still prints. fix(users): stop interrupted profile list requests #197322 (comment). (7d9b38217f79)
  • Feature history and original intent: History traces the users CLI to durable-profile support, subsequent outcome reporting, and explicit profile merging; these contracts remain intact. (src/cli/users-cli.ts:54, a8b7290f346c)

PR surface

Source +10, Tests -1, Docs +4. Total +13 across 3 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 17 7 +10
Tests 1 12 13 -1
Docs 1 4 0 +4
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 33 20 +13

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Review metrics

Metric Value Why it matters
Production versus test LOC Production +17/-7; tests +12/-13 Necessary signal forwarding and publication guards reuse existing owners; the regression fits within the existing test budget.

Labels

Label changes:

  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🦞 diamond lobster, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: Interrupting a pending administrative read leaves unnecessary work alive, with limited impact confined to this CLI operation.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (2 earlier review cycles)
  • reviewed 2026-11-11T18:36:10.247Z sha 1d09cf0 :: needs maintainer review before merge. :: none
  • reviewed 2026-11-11T19:35:08.473Z sha 7d9b382 :: needs changes before merge. :: [P2] Retain a focused regression for interrupted list publication | [P3] Qualify the exit-status guarantee for JSON output

Reviewed November 11, 2026, 2:53 PM ET / 19:53 UTC (Revision 3).

@obviyus

obviyus commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 11, 2026
@obviyus

obviyus commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator

Proof for head 7d9b382: main merged in, plus one commit on top of the contributor commit.

What changed on top of the contributor commit:

  • Production is now +17/-7 in src/cli/users-cli.ts: users list passes the command's existing abort signal to its users.list call and prints nothing once aborted, including a reply or failure that settles after Ctrl-C. The extra pre-call check is gone. link-email and merge are unchanged. No new text.
  • The docs note is two lines and only says what the proof shows (list stops, no late result, exit 130/143). The unproven sentence about mutations is gone.
  • Tests are back to main (net 0) and the allocation file is removed. In the container, src/cli/users-cli.test.ts passes (5 tests); oxlint and oxfmt are clean.

Setup: node:24.22.1 container with no secrets. Main (850ddae) and this PR were each built with pnpm build and each run twice.

  • A real openclaw.mjs gateway run with token auth.
  • A personal profile, created before the run by one loopback trusted-proxy sign-in with a made-up header ([email protected], no identity provider), so link-email has a valid target.
  • A stand-in WebSocket proxy in front of the Gateway that withholds the users.list reply, or holds the users.linkEmail reply for 1 s.
  • The CLI runs in a real PTY (Python pty.fork). Ctrl-C is written to the PTY about 1 s after the reply is withheld.
While the reply is pending main run 1 / run 2 this PR run 1 / run 2
Ctrl-C, users list --json not exited; force-killed (SIGKILL) 2.05 / 2.03 s later, socket closed only then (1006) exit 130 in 0.03 / 0.04 s, socket closed normally (1005)
SIGTERM, users list --json same: force-killed 2.13 / 2.01 s later (1006) exit 143 in 0.03 / 0.05 s (1005)
Ctrl-C, users list (plain) the spinner cancels it: exit 0 in 0.01 s same, 0.01 / 0.02 s

On this PR nothing prints after the interrupt notice.

Controls, same on main and this PR:

  • Uninterrupted users list and users list --json give identical output on both (after replacing random profile IDs and timestamps).
  • users link-email [email protected] --to <profile> --json, Ctrl-C 0.2 s after the Gateway accepted it: on both, the confirmation JSON still prints with the new alias, exit 130 (0.73 / 0.66 s on main, 0.81 / 0.84 s here).
Run logs
[main-1] seed sign-in http=200
[main-1] profiles before: exit=0 [('gateway-owner', []), ('dac838a2-29eb-4592-97c6-6de86e1bdb67', ['[email protected]'])] stderr=''
[main-1] list-ctrl-c: ctrl-c sent at 2.30s while the hold response is pending
[main-1] list-ctrl-c: exit=0 0.01s after ctrl-c
[main-1] list-ctrl-c: proxy: client connected | holding response for users.list | gateway answered users.list ok=true; withheld | client socket closed code=1006
[main-1] list-json-ctrl-c: ctrl-c sent at 2.21s while the hold response is pending
[main-1] list-json-ctrl-c: exit=-9 2.05s after ctrl-c
[main-1] list-json-ctrl-c: output after ctrl-c: '^CCommand interrupted by SIGINT. Waiting for cleanup before exiting.'
[main-1] list-json-ctrl-c: proxy: client connected | holding response for users.list | gateway answered users.list ok=true; withheld | client socket closed code=1006
[main-1] list-json-sigterm: sigterm sent at 2.29s while the hold response is pending
[main-1] list-json-sigterm: exit=-9 2.13s after sigterm
[main-1] list-json-sigterm: output after sigterm: 'Command interrupted by SIGTERM. Waiting for cleanup before exiting.'
[main-1] list-json-sigterm: proxy: client connected | holding response for users.list | gateway answered users.list ok=true; withheld | client socket closed code=1006
[main-1] link-email-json-ctrl-c: ctrl-c sent at 1.61s while the delay response is pending
[main-1] link-email-json-ctrl-c: exit=130 0.73s after ctrl-c
[main-1] link-email-json-ctrl-c: output after ctrl-c: '^CCommand interrupted by SIGINT. Waiting for cleanup before exiting.\n{\n  "profile": {\n    "id": "dac838a2-29eb-4592-97c6-6de86e1bdb67",\n    "displayName": "person",\n    "avatarMime": null,\n    "mergedInto": null,\n    "createdAt": 1794425150842,\n    "updatedAt": 1794425184986,\n    "emails": [\n      "[email protected]",\n      "[email protected]"\n    ],\n    "githubIdentity": null,\n    "hasAvatar": false\n  }\n}'
[main-1] link-email-json-ctrl-c: proxy: client connected | holding response for users.linkEmail | gateway answered users.linkEmail ok=true; forwarding in 1 s | forwarding users.linkEmail response; client open=true | client socket closed code=1005
[main-1] control users list: exit=0 bytes=101 stderr=''
[main-1] control users list --json: exit=0 bytes=709 stderr=''
[main-1] leftover users CLI processes: 0
[main-2] seed sign-in http=200
[main-2] profiles before: exit=0 [('gateway-owner', []), ('8a366230-25d7-4191-b495-107edfed9258', ['[email protected]'])] stderr=''
[main-2] list-ctrl-c: ctrl-c sent at 2.38s while the hold response is pending
[main-2] list-ctrl-c: exit=0 0.01s after ctrl-c
[main-2] list-ctrl-c: proxy: client connected | holding response for users.list | gateway answered users.list ok=true; withheld | client socket closed code=1006
[main-2] list-json-ctrl-c: ctrl-c sent at 2.43s while the hold response is pending
[main-2] list-json-ctrl-c: exit=-9 2.03s after ctrl-c
[main-2] list-json-ctrl-c: output after ctrl-c: '^CCommand interrupted by SIGINT. Waiting for cleanup before exiting.'
[main-2] list-json-ctrl-c: proxy: client connected | holding response for users.list | gateway answered users.list ok=true; withheld | client socket closed code=1006
[main-2] list-json-sigterm: sigterm sent at 2.44s while the hold response is pending
[main-2] list-json-sigterm: exit=-9 2.01s after sigterm
[main-2] list-json-sigterm: output after sigterm: 'Command interrupted by SIGTERM. Waiting for cleanup before exiting.'
[main-2] list-json-sigterm: proxy: client connected | holding response for users.list | gateway answered users.list ok=true; withheld | client socket closed code=1006
[main-2] link-email-json-ctrl-c: ctrl-c sent at 1.61s while the delay response is pending
[main-2] link-email-json-ctrl-c: exit=130 0.66s after ctrl-c
[main-2] link-email-json-ctrl-c: output after ctrl-c: '^CCommand interrupted by SIGINT. Waiting for cleanup before exiting.\n{\n  "profile": {\n    "id": "8a366230-25d7-4191-b495-107edfed9258",\n    "displayName": "person",\n    "avatarMime": null,\n    "mergedInto": null,\n    "createdAt": 1794425202311,\n    "updatedAt": 1794425237839,\n    "emails": [\n      "[email protected]",\n      "[email protected]"\n    ],\n    "githubIdentity": null,\n    "hasAvatar": false\n  }\n}'
[main-2] link-email-json-ctrl-c: proxy: client connected | holding response for users.linkEmail | gateway answered users.linkEmail ok=true; forwarding in 1 s | forwarding users.linkEmail response; client open=true | client socket closed code=1005
[main-2] control users list: exit=0 bytes=101 stderr=''
[main-2] control users list --json: exit=0 bytes=709 stderr=''
[main-2] leftover users CLI processes: 0
[cand-1] seed sign-in http=200
[cand-1] profiles before: exit=0 [('gateway-owner', []), ('5c0d8e40-734e-489d-9909-50137f92518d', ['[email protected]'])] stderr=''
[cand-1] list-ctrl-c: ctrl-c sent at 2.48s while the hold response is pending
[cand-1] list-ctrl-c: exit=0 0.01s after ctrl-c
[cand-1] list-ctrl-c: proxy: client connected | holding response for users.list | gateway answered users.list ok=true; withheld | client socket closed code=1006
[cand-1] list-json-ctrl-c: ctrl-c sent at 2.31s while the hold response is pending
[cand-1] list-json-ctrl-c: exit=130 0.03s after ctrl-c
[cand-1] list-json-ctrl-c: output after ctrl-c: '^CCommand interrupted by SIGINT. Waiting for cleanup before exiting.'
[cand-1] list-json-ctrl-c: proxy: client connected | holding response for users.list | gateway answered users.list ok=true; withheld | client socket closed code=1005
[cand-1] list-json-sigterm: sigterm sent at 2.29s while the hold response is pending
[cand-1] list-json-sigterm: exit=143 0.03s after sigterm
[cand-1] list-json-sigterm: output after sigterm: 'Command interrupted by SIGTERM. Waiting for cleanup before exiting.'
[cand-1] list-json-sigterm: proxy: client connected | holding response for users.list | gateway answered users.list ok=true; withheld | client socket closed code=1005
[cand-1] link-email-json-ctrl-c: ctrl-c sent at 1.41s while the delay response is pending
[cand-1] link-email-json-ctrl-c: exit=130 0.81s after ctrl-c
[cand-1] link-email-json-ctrl-c: output after ctrl-c: '^CCommand interrupted by SIGINT. Waiting for cleanup before exiting.\n{\n  "profile": {\n    "id": "5c0d8e40-734e-489d-9909-50137f92518d",\n    "displayName": "person",\n    "avatarMime": null,\n    "mergedInto": null,\n    "createdAt": 1794425031106,\n    "updatedAt": 1794425061547,\n    "emails": [\n      "[email protected]",\n      "[email protected]"\n    ],\n    "githubIdentity": null,\n    "hasAvatar": false\n  }\n}'
[cand-1] link-email-json-ctrl-c: proxy: client connected | holding response for users.linkEmail | gateway answered users.linkEmail ok=true; forwarding in 1 s | forwarding users.linkEmail response; client open=true | client socket closed code=1005
[cand-1] control users list: exit=0 bytes=101 stderr=''
[cand-1] control users list --json: exit=0 bytes=709 stderr=''
[cand-1] leftover users CLI processes: 0
[cand-2] seed sign-in http=200
[cand-2] profiles before: exit=0 [('gateway-owner', []), ('4f364c67-335e-4962-a28d-4f9ee1665a0c', ['[email protected]'])] stderr=''
[cand-2] list-ctrl-c: ctrl-c sent at 2.42s while the hold response is pending
[cand-2] list-ctrl-c: exit=0 0.02s after ctrl-c
[cand-2] list-ctrl-c: proxy: client connected | holding response for users.list | gateway answered users.list ok=true; withheld | client socket closed code=1006
[cand-2] list-json-ctrl-c: ctrl-c sent at 2.33s while the hold response is pending
[cand-2] list-json-ctrl-c: exit=130 0.04s after ctrl-c
[cand-2] list-json-ctrl-c: output after ctrl-c: '^CCommand interrupted by SIGINT. Waiting for cleanup before exiting.'
[cand-2] list-json-ctrl-c: proxy: client connected | holding response for users.list | gateway answered users.list ok=true; withheld | client socket closed code=1005
[cand-2] list-json-sigterm: sigterm sent at 2.30s while the hold response is pending
[cand-2] list-json-sigterm: exit=143 0.05s after sigterm
[cand-2] list-json-sigterm: output after sigterm: 'Command interrupted by SIGTERM. Waiting for cleanup before exiting.'
[cand-2] list-json-sigterm: proxy: client connected | holding response for users.list | gateway answered users.list ok=true; withheld | client socket closed code=1005
[cand-2] link-email-json-ctrl-c: ctrl-c sent at 1.77s while the delay response is pending
[cand-2] link-email-json-ctrl-c: exit=130 0.84s after ctrl-c
[cand-2] link-email-json-ctrl-c: output after ctrl-c: '^CCommand interrupted by SIGINT. Waiting for cleanup before exiting.\n{\n  "profile": {\n    "id": "4f364c67-335e-4962-a28d-4f9ee1665a0c",\n    "displayName": "person",\n    "avatarMime": null,\n    "mergedInto": null,\n    "createdAt": 1794425088487,\n    "updatedAt": 1794425118947,\n    "emails": [\n      "[email protected]",\n      "[email protected]"\n    ],\n    "githubIdentity": null,\n    "hasAvatar": false\n  }\n}'
[cand-2] link-email-json-ctrl-c: proxy: client connected | holding response for users.linkEmail | gateway answered users.linkEmail ok=true; forwarding in 1 s | forwarding users.linkEmail response; client open=true | client socket closed code=1005
[cand-2] control users list: exit=0 bytes=101 stderr=''
[cand-2] control users list --json: exit=0 bytes=709 stderr=''
[cand-2] leftover users CLI processes: 0

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Nov 11, 2026
@clawsweeper clawsweeper Bot removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 11, 2026
@obviyus

obviyus commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@obviyus

obviyus commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator

Head 3615683 addresses the review: one compact regression (users list --json prints nothing when its reply settles after Ctrl-C; it fails with the post-read check removed and passes with it), paid for by folding the two-row JSON table into one merge test, so tests are net -1. The docs now say the 130/143 exits apply to --json, and that without --json Ctrl-C cancels the progress spinner and exits 0, as measured in the proof above. Production code is unchanged from 7d9b382, so the runtime proof still applies. In the container: 5 tests pass, oxlint and oxfmt clean.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 11, 2026
@obviyus
obviyus merged commit ac8b592 into openclaw:main Nov 11, 2026
124 checks passed
@obviyus

obviyus commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator

Landed in ac8b592. Thanks @Alix-007.

@Alix-007

Copy link
Copy Markdown
Contributor Author

Thanks @obviyus for the real-Gateway checks and for trimming the regression test down!

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 12, 2026
fix(users): stop a pending users list promptly on Ctrl+C

Pressing Ctrl+C or sending SIGTERM during openclaw users list did not reach the Gateway users.list request, so the CLI kept the socket open until it was force-killed about 2 seconds later, and a late result could still print. users list now passes the command's existing abort signal and prints nothing once aborted. link-email and merge are unchanged. The docs note the measured exit codes with --json; without --json the spinner already cancels on Ctrl+C. No new user-facing text.

Evidence: the built CLI in a real PTY in a secretless node:24.22.1 container against a real built Gateway behind a WebSocket proxy holding the users.list reply, two runs each. On main, users list --json after Ctrl+C or SIGTERM was force-killed about 2.05-2.1 s later with an abnormal socket close; with this change it exits 130 or 143 within 0.03-0.05 s with a normal close and nothing printed afterwards. Uninterrupted users list output and an interrupted link-email --json whose link was already accepted behave the same on both. One regression for a reply arriving after Ctrl+C fails without the check, at -1 net test lines. Details: openclaw#197322 (comment).

Thanks @Alix-007.

Co-authored-by: Ayaan Zaidi <[email protected]>
obviyus added a commit that referenced this pull request Nov 12, 2026
fix(codex): stop the session catalog request when codex sessions is interrupted

Interrupting openclaw codex sessions left its Gateway catalog request running, so a reply that arrived during interrupt cleanup still printed the catalog after the interrupt notice and the process lingered until the reply or a kill. The catalog call now takes the command's abort signal and stops on interrupt, matching #197322. Uninterrupted listings, continue and archive are unchanged. No new text.

Evidence: a real Gateway behind a stand-in front that answers the catalog 3 s late, with the CLI in a real PTY, main twice and candidate twice. On main, codex sessions --json printed the full catalog about 2 s after Ctrl-C or SIGTERM. With this change it exits 130 or 143 in about 0.05 s and prints nothing. Uninterrupted sessions (plain and --json) and interrupted continue --json and archive --json behave the same on both. The regression fails on main, at net 0 test lines. Details: #197750 (comment).

Thanks @wangmiao0668000666.

Co-authored-by: Ayaan Zaidi <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 13, 2026
fix(codex): stop the session catalog request when codex sessions is interrupted

Interrupting openclaw codex sessions left its Gateway catalog request running, so a reply that arrived during interrupt cleanup still printed the catalog after the interrupt notice and the process lingered until the reply or a kill. The catalog call now takes the command's abort signal and stops on interrupt, matching openclaw#197322. Uninterrupted listings, continue and archive are unchanged. No new text.

Evidence: a real Gateway behind a stand-in front that answers the catalog 3 s late, with the CLI in a real PTY, main twice and candidate twice. On main, codex sessions --json printed the full catalog about 2 s after Ctrl-C or SIGTERM. With this change it exits 130 or 143 in about 0.05 s and prints nothing. Uninterrupted sessions (plain and --json) and interrupted continue --json and archive --json behave the same on both. The regression fails on main, at net 0 test lines. Details: openclaw#197750 (comment).

Thanks @wangmiao0668000666.

Co-authored-by: Ayaan Zaidi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes docs Improvements or additions to documentation P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants