Repository navigation
fix(gateway): show last error when status probe fails - #95902
Conversation
da09d6f to
e3bf279
Compare
|
Codex review: needs real behavior proof before merge. Reviewed June 29, 2026, 11:23 PM ET / 03:23 UTC. Summary PR surface: Source +7, Tests +117. Total +124 across 6 files. Reproducibility: yes. source-level: current main only gathers Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Scope the log read/rendering to local managed RPC failures where the listener is relevant, keep Last gateway error rendered once, and add redacted after-fix terminal output for the real Do we have a high-confidence way to reproduce the issue? Yes, source-level: current main only gathers Is this the best way to solve the issue? No. The layer is plausible, but the implementation should be narrowed to local managed probe failures and avoid duplicate rendering before it is the best fix. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 54b09580f61b. Label changesLabel justifications:
Evidence reviewedPR surface: Source +7, Tests +117. Total +124 across 6 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
|
e3bf279 to
b89c2cd
Compare
|
Merged via squash.
|
* fix(gateway): show last error when status probe fails * fix(gateway): scope status log diagnostics --------- Co-authored-by: wAngByg <[email protected]> Co-authored-by: Vincent Koc <[email protected]>
* fix(gateway): show last error when status probe fails * fix(gateway): scope status log diagnostics --------- Co-authored-by: wAngByg <[email protected]> Co-authored-by: Vincent Koc <[email protected]>
What Problem This Solves
openclaw gateway status --deepcan currently show a running gateway service and a busy gateway port while the RPC probe only reports a generic close, for examplegateway closed (1000):. In that state the actionable server-side error is already present in the gateway logs, but the status command does not surface it unless the port is not listening.A real field case had the service active, port 2345 owned by the gateway process, and Feishu running, while
openclaw gateway status --deep --jsonreportedrpc.ok=falsewith onlygateway closed (1000):. The gateway journal showed the actual cause:parse/handle error: Error: ENOSPC: no space left on device, write.Why This Change Was Made
This keeps the existing status diagnostic model and applies it to the missing case:
Last gateway errornext to the failed connectivity/read probeno space left on devicelog lines when selecting the most useful recent gateway errorThis does not change gateway auth, RPC behavior, service lifecycle, or log redaction. It only makes existing diagnostics more actionable.
User Impact
Users who run
openclaw gateway status --deepagainst a listening but internally failing gateway will see the likely root cause immediately instead of needing to know which service logs or journal entries to inspect. Disk-full failures become visible as a direct status hint rather than a misleading generic WebSocket close.Evidence
Field evidence from the affected host:
df -h /: root filesystem was 100% fullopenclaw gateway status --deep --json: service runtime wasrunning, port status wasbusy, listener PID owned/usr/lib/node_modules/openclaw/dist/index.js gateway --port 2345, butrpc.ok=falseandrpc.error="gateway closed (1000): "parse/handle error: Error: ENOSPC: no space left on device, writeLocal validation:
corepack pnpm test src/daemon/diagnostics.test.tscorepack pnpm test src/cli/daemon-cli/status.gather.test.tscorepack pnpm test src/cli/daemon-cli/status.print.test.tscorepack pnpm test:changedcorepack pnpm exec oxfmt --check --threads=1 src/daemon/diagnostics.ts src/daemon/diagnostics.test.ts src/cli/daemon-cli/status.gather.ts src/cli/daemon-cli/status.gather.test.ts src/cli/daemon-cli/status.print.ts src/cli/daemon-cli/status.print.test.tsOPENCLAW_CHECK_CHANGED_REMOTE_CHILD=1 CI=1 corepack pnpm check:changedAI-assisted: investigated and implemented with Codex; changes and evidence were manually reviewed before submission.