fix(cli): keep logs follow on live gateway state#85380
Conversation
|
Codex review: found issues before merge. Latest ClawSweeper review: 2026-05-22 17:33 UTC / May 22, 2026, 1:33 PM ET. Workflow note: Future ClawSweeper reviews update this same comment in place. How this review workflow works
Summary Reproducibility: yes. at source level: current main uses the normal CLI identity and configured-file fallback for implicit local RPC failures, while the PR diff adds passive backend identity and disables fallback in PR rating Rank-up moves:
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. Real behavior proof Risk before merge
Maintainer options:
Next step before merge Security Review findings
Review detailsBest possible solution: Keep the passive backend identity for implicit local log reads, but either add an active service-aware live source with provenance for follow-mode failures or explicitly split the narrower paired-device fix from the broader stale-log issue before landing. Do we have a high-confidence way to reproduce the issue? Yes at source level: current main uses the normal CLI identity and configured-file fallback for implicit local RPC failures, while the PR diff adds passive backend identity and disables fallback in Is this the best way to solve the issue? No, not as a complete fix for both linked issues. The passive backend identity is a good fit for the paired-device side effect, but unconditional fail-closed follow behavior does not satisfy the active journal/provenance request and needs maintainer acceptance or a replacement live source. Label justifications:
Full review comments:
Overall correctness: patch is incorrect Acceptance criteria:
What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 7fc691a426cb. |
|
ClawSweeper PR egg 🔥 Warming up: real-behavior proof passed; findings, security review, or rank-up moves are still in progress. Hatch commandComment Hatchability rules:
What is this egg doing here?
|
3f8a0f4 to
dc7505a
Compare
dc7505a to
b597e31
Compare
b597e31 to
05aac4e
Compare
|
Proof after maintainer rewrite:
The branch is rebased on |
Summary
openclaw logsreads so log viewing does not register or rewrite a paired device.--urltargets on the existing CLI identity path.--follow, avoid stale configured-file fallbacks; on Linux, use the active user-systemd Gateway journal by unit and PID when implicit local RPC is unavailable.Verification
Behavior addressed:
openclaw logs --followno longer mutates paired-device state for implicit local reads and no longer follows stale configured-file fallback logs after live local RPC failures.Real environment tested: AWS Crabbox Linux c7a.8xlarge.
Exact steps or command run after this patch:
git diff --check;AUTOREVIEW_AUTO_TESTS=0 AUTOREVIEW_OPENCLAW_MAINTAINER_VALIDATION=1 .agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main;node scripts/crabbox-wrapper.mjs run --no-hydrate --shell -- "pnpm test:serial src/cli/logs-cli.test.ts";node scripts/crabbox-wrapper.mjs run --fresh-pr openclaw/openclaw#85380 --no-hydrate --shell -- "pnpm check:changed".Evidence after fix: autoreview clean; focused AWS run
run_691721a0d6ca/ leasecbx_9161e75595d8passedsrc/cli/logs-cli.test.tswith 25 tests; fresh-PR AWS runrun_0121df014dbf/ leasecbx_8f88323c0809passedpnpm check:changed.Observed result after fix: implicit local logs use the passive backend client without a device identity; follow-mode local RPC failures use the bounded/redacted active systemd journal path when available and do not tail configured files.
What was not tested: a live side-by-side cutover host with a real managed Gateway service producing systemd journal entries.
Fixes #83656
Fixes #66841