Skip to content

fix(status): keep unreadable logs visible in diagnostic reports - #177316

Merged
steipete merged 2 commits into
mainfrom
deslop/z20-120-status-log-errors-20261015
Oct 19, 2026
Merged

steipete merged 2 commits into
mainfrom
deslop/z20-120-status-log-errors-20261015

Conversation

@steipete

@steipete steipete commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

openclaw status --all silently omits Gateway and restart logs when reading them fails, making inaccessible logs indistinguishable from logs that do not exist yet.

User Impact

Unreadable logs remain visible in the pasteable report with guidance to check their path and permissions. Missing logs before the first service start remain quiet, and the rest of the report stays available.

Why This Change Was Made

Let the log-tail reader own read-failure presentation and remove the duplicate caller catches. Non-missing failures produce a static unavailable message, never raw filesystem-error content. Normal tail bounds, summarization, redaction, Darwin stdout-only behavior, and the read-only command contract are unchanged.

Best-effort tradeoffs accepted

The caller no longer adds a second silent recovery layer around an already-handled log read. Unexpected programming failures may surface rather than masquerading as an empty log. The original January status helper (1eb50ffac47) already swallowed read failures; no human incident or speculative race-removal claim is made. Missing files remain an intentional non-outcome, while other native read failures remain nonfatal and visible. Static guidance intentionally omits the raw error payload.

Evidence

Production: +7 net lines; tests: +37; docs: +2. This is a silent-diagnostics bug fix, not deletion credit.

  • Historical pre-conflict baseline through the actual tail reader and diagnosis renderer: ENOENT passed; EACCES failed because the log section disappeared. Only native file-open I/O is faulted. Vitest 384.56 seconds / wrapper 409.77 seconds; final generation verification completed.
  • Conflict repair preserves main's refactor(runtime): fold private status and channel owner surfaces #177290 consolidation: the private diagnosis module stays deleted, three caller catch removals now live in status-all.ts, and the regression runs through the actual statusAllCommand harness. Existing main tests and fixtures remain unchanged.
  • Post-conflict gateway/diagnosis/report-data suites: all 53 passed, including absent versus inaccessible logs and existing Darwin/summary/redaction behavior (316.43 seconds Vitest, 92% transformation). Mandatory suppression guard: all 14 passed (38.86 seconds Vitest), with no suppression or allowlist changes. Final wrapper generation verification completed successfully; no whole-graph proof claim.
  • Post-conflict targeted four-root native types, canonical three-file type-aware lint, and four-file formatting/whitespace passed. The formatting-only correction preserves semantic test/review inputs. Original docs inventory passed and the two-line docs change is unchanged.
  • Fresh independent P0–P2 review of the migrated candidate: scoped-clean, confidence 0.96, no accepted/actionable findings; final source verification passed.
  • The only new internal import edge points to the existing errno owner, which imports external fs-safe/path and cannot create an internal cycle. Hosted exact-head CI remains the broad proof; no whole-graph local build/typecheck, live Gateway, or operator-state probe is claimed.

Release-note context: status --all now reports unreadable Gateway logs instead of silently omitting them.

@clawsweeper

clawsweeper Bot commented Oct 19, 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 commands Command implementations size: S labels Oct 19, 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. labels Oct 19, 2026
@steipete
steipete force-pushed the deslop/z20-120-status-log-errors-20261015 branch from e8730e7 to 4bddbc1 Compare October 19, 2026 12:38
@steipete
steipete marked this pull request as ready for review October 19, 2026 12:38
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-19T12:41:22.347981Z 4bddbc1 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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 Oct 19, 2026
@clawsweeper

clawsweeper Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR distinguishes missing logs from unreadable logs in status --all reports and removes redundant caller-side recovery.

Example: Reading /synthetic-status-logs/gateway.log fails with EACCES during openclaw status --all.

  • Before: The report silently omits the unreadable log.
  • After: The report includes the log path and guidance to check its path and permissions, while completing the remaining diagnostics.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A focused, useful patch with meaningful command-boundary regression coverage and successful exact-head CI; supplied behavioral validation remains harness-based.
Proof confidence 🦐 gold shrimp (3/6) The supplied evidence reports actual tail-reader and statusAllCommand harness execution with native file-open failures injected; it does not demonstrate the shipped CLI, and maintainer authorship exempts this PR from the ordinary contributor proof gate.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Operators cannot distinguish inaccessible Gateway or restart logs from logs that do not exist because both disappear from the diagnostic report.
Reason: The maintainer-directed change makes a real diagnostic failure visible with actionable guidance while preserving intentional missing-file behavior.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it fixes a current diagnostic omission with a focused, maintainer-directed change; no actionable correctness or security defect was found, and exact-head CI passed.

Priority: P2
Reviewed head: 4bddbc14add09f681a3fb58b907a4a26adc65371

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: No shipped-CLI run showing an unreadable log is supplied; this maintainer-authored PR is outside the ordinary contributor proof gate.
Agent review details

How this fits together

The status command collects local and Gateway diagnostics, reads bounded log tails, and produces a summarized, redacted text report.

flowchart TD
  A[Status CLI] --> B[Status report owner]
  B --> C[Log tail reader]
  D[Gateway and restart log files] --> C
  C --> E[Lines or unavailable guidance]
  E --> F[Summarization and redaction]
  F --> G[Pasteable diagnostic report]
Loading

Technical review

Best possible solution:

Keep failure presentation in the existing tail reader, preserving quiet missing files, bounded reads, redaction, and complete diagnostic reports.

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

Current-main source shows that EACCES becomes an empty tail and therefore suppresses its report section; the PR reports a failing historical baseline and passing repaired command-harness cases, which were inspected but not rerun during this read-only review.

Is this the best way to solve the issue?

The patch is the smallest complete fix using the existing reader and renderer: it distinguishes ENOENT, supplies static guidance for other failures, and removes duplicate catches without adding state or another owner.

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 1eb50ff adds src/commands/status-all/gateway.ts:10 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 1eb50ffac476; files: src/commands/status-all/gateway.ts)
  • sunlit-deng: Raw commit a9051b4 adds src/commands/status-all/gateway.ts:6 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: a9051b45cf37; files: src/commands/status-all/gateway.ts)

PR surface

Source +7, Tests +37, Docs +2. Total +46 across 4 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 2 12 5 +7
Tests 1 38 1 +37
Docs 1 2 0 +2
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 52 6 +46

Labels

Label changes:

  • add P2: Unreadable logs currently disappear from diagnostic reports, reducing troubleshooting accuracy without disrupting the running Gateway.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: Unreadable logs currently disappear from diagnostic reports, reducing troubleshooting accuracy without disrupting the running Gateway.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

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.

Reviewed October 19, 2026, 8:54 AM ET / 12:54 UTC.

@steipete
steipete merged commit 49c8d04 into main Oct 19, 2026
200 of 204 checks passed
@steipete
steipete deleted the deslop/z20-120-status-log-errors-20261015 branch October 19, 2026 13:14
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 20, 2026
…claw#177316)

* fix(status): keep unreadable logs visible in diagnostic reports

* style(commands): format status log regression
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands Command implementations docs Improvements or additions to documentation P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: S 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.

1 participant