Repository navigation
fix(doctor): doctor no longer hangs when TUI process sampling stalls - #109243
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 16, 2026, 1:40 PM ET / 17:40 UTC. Summary PR surface: Source +2, Tests +5. Total +7 across 2 files. Reproducibility: yes. Put a test Review metrics: none identified. Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Next step before merge
Security Review detailsBest possible solution: Land the bounded Do we have a high-confidence way to reproduce the issue? Yes. Put a test Is this the best way to solve the issue? Yes. Selecting the uncatchable signal for this best-effort, read-only child probe is the narrowest fix and directly addresses the documented synchronous-child timeout behavior without adding configuration or changing doctor policy. (nodejs.org) AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against cb84dc76fc05. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +2, Tests +5. Total +7 across 2 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
Merged via squash.
|
…#109731) * fix(infra): gateway pid probe no longer hangs when ps sampling stalls readGatewayProcessArgsSync probes ps to verify gateway argv before signaling or reporting listener PIDs. The darwin branch already passed timeout: 1000, but spawnSync defaults killSignal to SIGTERM, which an unresponsive or hung ps child can ignore and keep the gateway process blocked past the timeout. Force killSignal: SIGKILL (matching the doctor probe fix in #109243) so a stalled ps probe is reaped at the deadline instead of hanging gateway signal verification and listener PID discovery. Extract GATEWAY_PS_PROBE_TIMEOUT_MS for the named timeout and assert the full spawnSync options (encoding / killSignal / timeout) in the darwin test. * refactor: centralize bounded ps probes Co-authored-by: 琚耀辉0668001366 <[email protected]> * refactor: leave doctor ps hardening to main --------- Co-authored-by: Peter Steinberger <[email protected]>
…openclaw#109731) * fix(infra): gateway pid probe no longer hangs when ps sampling stalls readGatewayProcessArgsSync probes ps to verify gateway argv before signaling or reporting listener PIDs. The darwin branch already passed timeout: 1000, but spawnSync defaults killSignal to SIGTERM, which an unresponsive or hung ps child can ignore and keep the gateway process blocked past the timeout. Force killSignal: SIGKILL (matching the doctor probe fix in openclaw#109243) so a stalled ps probe is reaped at the deadline instead of hanging gateway signal verification and listener PID discovery. Extract GATEWAY_PS_PROBE_TIMEOUT_MS for the named timeout and assert the full spawnSync options (encoding / killSignal / timeout) in the darwin test. * refactor: centralize bounded ps probes Co-authored-by: 琚耀辉0668001366 <[email protected]> * refactor: leave doctor ps hardening to main --------- Co-authored-by: Peter Steinberger <[email protected]>
…openclaw#109731) * fix(infra): gateway pid probe no longer hangs when ps sampling stalls readGatewayProcessArgsSync probes ps to verify gateway argv before signaling or reporting listener PIDs. The darwin branch already passed timeout: 1000, but spawnSync defaults killSignal to SIGTERM, which an unresponsive or hung ps child can ignore and keep the gateway process blocked past the timeout. Force killSignal: SIGKILL (matching the doctor probe fix in openclaw#109243) so a stalled ps probe is reaped at the deadline instead of hanging gateway signal verification and listener PID discovery. Extract GATEWAY_PS_PROBE_TIMEOUT_MS for the named timeout and assert the full spawnSync options (encoding / killSignal / timeout) in the darwin test. * refactor: centralize bounded ps probes Co-authored-by: 琚耀辉0668001366 <[email protected]> * refactor: leave doctor ps hardening to main --------- Co-authored-by: Peter Steinberger <[email protected]>
What Problem This Solves
Fixes an issue where
openclaw doctorcould remain blocked after its existing one-second deadline while checking for local TUI processes if thepsexecutable ignored the default termination signal.Why This Change Was Made
The best-effort TUI process probe now force-stops
psat the existing deadline. Process matching, warning behavior, repair behavior, and the Windows no-probe path are unchanged.User Impact
Doctor runs with WhatsApp enabled no longer hang indefinitely while sampling local TUI processes. Healthy
psoutput continues to produce the same responsiveness warning and repair guidance.Evidence
5562e6b267:src/commands/doctor-whatsapp-responsiveness.test.tspassed 6/6.419c61a590: the Doctor WhatsApp contribution with a testpsexecutable that ignoredSIGTERMwas still blocked when an 8-second external watchdog stopped it. The exact patched head force-stopped the same probe and returned in 1.005 seconds.unicorn-magicpackage-export error.oxfmt, targetedoxlint, andgit diff --checkpassed for the changed files.codex review --base origin/mainfound no confirmed regression.