feat(cli/logs): announce --follow gateway reconnect and add JSON notice parity#75372
feat(cli/logs): announce --follow gateway reconnect and add JSON notice parity#75372
Conversation
|
Codex review: needs maintainer review before merge. Summary Reproducibility: not applicable. as a feature/parity PR. Source inspection on current main confirms the retry path has only a text disconnect warning and no reconnect/JSON notice parity, while the PR diff adds those signals. Next step before merge Security Review detailsBest possible solution: Land this narrow notice-parity layer after normal changed-gate/build and optional live gateway-restart smoke validation, while keeping the larger Do we have a high-confidence way to reproduce the issue? Not applicable as a feature/parity PR. Source inspection on current main confirms the retry path has only a text disconnect warning and no reconnect/JSON notice parity, while the PR diff adds those signals. Is this the best way to solve the issue? Yes. The diff keeps #75059's classifier/backoff boundary intact and only adds user-facing notices plus focused docs/tests, which is the narrowest maintainable fix for the remaining parity gap. What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 85e4ec1fb1ac. |
|
Reframing this PR after a closer look at what's already on The reporter's exact scenario in #74583 (implicit local-loopback What this PR covers is the remaining gap that
So the framing is now |
ce5f125 to
7269c9f
Compare
|
@clawsweeper can you review this again |
|
🦞🦞 I asked ClawSweeper to answer this maintainer mention in the next review comment. Tiny claws, bounded scope: this is a read-only assist pass unless it produces one of the existing structured safe-action markers. Request: can you review this again |
#75372 added `[logs] gateway reconnected` notice and JSON `notice` records as a follow-up to #75059 and landed today, but its changelog entry was placed under `## 2026.4.29` (already released). Move it next to the related #75059 entry under `## Unreleased ### Fixes` so the released section stays frozen and the credited contributor lands in the right release window. Thanks @RomneyDa.
openclaw#75372 added `[logs] gateway reconnected` notice and JSON `notice` records as a follow-up to openclaw#75059 and landed today, but its changelog entry was placed under `## 2026.4.29` (already released). Move it next to the related openclaw#75059 entry under `## Unreleased ### Fixes` so the released section stays frozen and the credited contributor lands in the right release window. Thanks @RomneyDa.
openclaw#75372 added `[logs] gateway reconnected` notice and JSON `notice` records as a follow-up to openclaw#75059 and landed today, but its changelog entry was placed under `## 2026.4.29` (already released). Move it next to the related openclaw#75059 entry under `## Unreleased ### Fixes` so the released section stays frozen and the credited contributor lands in the right release window. Thanks @RomneyDa.

Summary
Follow-up to #75059 (which shipped the
--followretry loop, error classification, and bounded backoff). This PR layers on the recovery signal and JSON-mode parity that #75059 left out:[logs] gateway reconnectednotice on the success-after-outage transition. fix(cli): auto-reconnect logs --follow on transient gateway disconnect #74782 #75059 silently resumes after a successful retry; this surfaces the recovery so users tailing the stream can tell the loop is back on the live RPC.[logs] gateway disconnected, reconnecting in Xs...warning was stderr-text only —--jsonconsumers got no signal during outages. Both the existing retry warning and the new reconnect notice now emit{"type":"notice"}records on stderr in--jsonmode, mirroring the pattern used elsewhere in this CLI.Error classification, retry budget, backoff math, and the loopback-fallback short-circuit are unchanged — all owned by #75059.
Issues
Carries forward #75059. Refs #74782, #74583, #56475.
Test plan
pnpm test src/cli/logs-cli.test.ts(22 passed; +1--follow --jsonnotice-parity test, plus agateway reconnectedassertion added to the existing explicit---urlretry test).pnpm exec oxfmt --check --threads=1 src/cli/logs-cli.ts src/cli/logs-cli.test.ts docs/cli/logs.md CHANGELOG.mdclean.pnpm check:changed(Testbox per AGENTS.md) andpnpm buildbefore merge.openclaw logs --follow --url ws://127.0.0.1:18789against a loopback gateway, force a brief gateway restart, confirm both notices appear (text + JSON modes).Notes
mainafter fix(cli): auto-reconnect logs --follow on transient gateway disconnect #74782 #75059 landed.logs.subscribework remains deferred to fix(cli): reuse websocket forlogs --follow#56475.