Repository navigation
fix(cli): show live probe failures in health output - #117410
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 1, 2026, 9:04 AM ET / 13:04 UTC. ClawSweeper reviewWhat this changesThis PR changes the shared health-output formatter so live channel probe successes and failures appear before passive healthy, configured, or linked status fallbacks. Merge readinessKeep this active PR for human merge review: current Priority: P2 Review scores
Verification
How this fits togetherGateway health collection preserves channel account facts and probe results in one snapshot, and the CLI formatter turns that snapshot into operator-facing health and deep-status lines. The formatter is used by both flowchart LR
A[Channel runtime facts] --> C[Gateway health snapshot]
B[Fresh account probes] --> C
C --> D[Health text formatter]
D --> E[Verbose health command]
D --> F[Deep status report]
E --> G[Operator diagnosis]
F --> G
Before merge
Agent review detailsSecurityNone. PR surfaceSource 0, Tests +101. Total +101 across 3 files. View PR surface stats
Review metricsNone. Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the repair in the shared formatter, retain the precedence matrix and built-CLI proof, then refresh the branch against current Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: a snapshot containing an affirmative passive field and Is this the best way to solve the issue? Yes. The shared formatter is the narrow owner because raw Gateway snapshots already preserve both probe and lifecycle facts, and both reported CLI surfaces consume this formatter. Changing collectors or channel plugins would duplicate presentation policy and risk changing unrelated health behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against fb9c8e74e619. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Land-ready proof is complete for head
ClawSweeper's remaining merge-risk move is satisfied without a branch rewrite: GitHub reports the head cleanly mergeable, exact-head CI is green, and repository-native prepare will verify the current three-way merge. Behind-main drift is advisory under the maintainer workflow. The explicit maintainer decision is to land this low-risk text-projection fix; raw snapshots, probe execution, protocol, config, persistence, and Plugin SDK remain unchanged. |
|
Merged via squash.
|
Closes #117409
AI-assisted: yes.
What Problem This Solves
Fixes an issue where operators running
openclaw health --verboseoropenclaw status --deepcould see a channel reported as healthy, configured, or linked even though the fresh active probe in the same Gateway snapshot failed. The same precedence bug hid a failed sibling account behind the selected account's passive healthy state.Matrix exposes the regression directly: its sync monitor records
healthState: "healthy"independently from its account probe. SMS and Zalouser exposed the older sibling cases throughstatusState: "configured"andlinked: true.Why This Change Was Made
The shared health-text formatter now orders facts by meaning instead of field position:
Raw health JSON still records lifecycle and probe facts independently. This does not change probe execution, caching, protocol, configuration, persistence, or Plugin SDK contracts. Formatter tests moved into a dedicated module, shrinking the broader health-command test file from 743 to 648 lines.
User Impact
Verbose health and deep status now show the actionable live probe result instead of a stale/passive success label. Channel-specific failure states such as
blocked,logged-out,conflict, andauth stabilizingremain visible, and ordinary non-probed output remains unchanged.Evidence
Current-main reproduction: 7 new precedence cases failed while 32 controls passed. Observed examples were
Matrix: healthy,SMS: configured, andZalo User: linkedinstead of their distinct fresh probe errors.Focused and sibling tests: 65/65 passed locally and 65/65 passed on Blacksmith Testbox
tbx_01kyynm65xf29bsg18s28xmm03(run 30700284352).Scoped changed gate: fully green on the same Testbox, including core production/test types, changed-file lint/format, import cycles, dead-code scans, API/boundary/dependency guards, and database-first checks.
Full
pnpm build: green on the same Testbox.Built CLI black-box proof:
dist/entry.js health --verbosesent{"probe":true}, exited 0 with empty stderr, and rendered five fixture-sensitive outcomes:Source-blind behavior validation: all five contract clauses and the varied-fixture anti-cheat check passed.
Fresh Codex autoreview: clean, no P0/P1 findings, overall patch-correct confidence 0.96.
Production delta: line-neutral (
+36/-36); total PR delta+232/-131across three files.Regression provenance: #117300 added the unconditional
healthStateearly return while preserving authored lifecycle facts. This repair keeps that ownership decision and corrects only the text projection precedence.