Skip to content

fix(doctor): replace unavailable TUI cleanup advice - #140074

Merged
steipete merged 2 commits into
mainfrom
codex/doctor-responsiveness-advice-20260906
Sep 6, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/doctor-responsiveness-advice-20260906

Conversation

@steipete

@steipete steipete commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

Related: #134031

What Problem This Solves

Fixes an issue where operators following WhatsApp responsiveness advice were told that doctor --fix would stop TUI clients, although current repair mode enters maintenance and never performs that cleanup. The warning also attributed Gateway pressure to detected clients without evidence connecting them.

Why This Change Was Made

The note now renders the same factual observation and diagnostic guidance as the opt-in finding. This removes the unreachable termination branch, its repair-only argument and its private test export. Maintenance, readiness and CPU thresholds are unchanged. The diagnostics docs also describe the existing persistent-degradation warning exception for idle Gateways.

The historical cleanup was reachable in v2026.8.1; v2026.8.2 and v2026.9.2 already suppress Gateway status collection during repair. This retires obsolete internal code and advice, rather than changing current repair authorization. No published SDK export or external caller depends on these helpers.

Compatibility

The automated data-model classification does not apply: this changes advisory text and removes an unreachable local process-termination helper, not database repair logic. No schema, stored representation, migration, persistence reader/writer, configuration or SDK export changes. No data migration is required. Maintained-release compatibility is checked at the existing maintenance/status boundary; historical v2026.8.1 cleanup is explicitly distinguished above.

User Impact

Doctor distinguishes observed pressure from its unknown cause and directs operators to diagnostics before deciding whether to close a client. The existing lint check ID, opt-in selection and PID observations remain available.

Evidence

  • Two managed P2 reviews are clean, including the contribution-flow integration test.
  • Exact baseline/candidate helper execution with synthetic process boundaries confirms the old unsupported advice and the new factual, shared finding/note output. No real process inventory or signals are used.
  • New integration coverage runs the actual Gateway-health and responsiveness contributions in order, including the real advice renderer and prompter: CPU-only inspection emits factual advice; maintenance skips status and inventory. This is contribution-flow coverage, not a full CLI or live-Gateway claim.
  • Clean Linux proof on d57cc2c1bc3457353bcc67b009ebbed7596e68e6 passed 336 tests across five files with Node 24.19.0, pnpm 12.3.4 and frozen current dependencies: advice owner, real contribution bridge, contributions/opt-in lint, maintenance owner and real CLI parser. The wrapper verified the public source/tree against the executed source capsule. Testbox workflow (native command exit 0; lease lifecycle is separate).
  • The initial obsolete assertion-baseline entry and shadowed test binding were corrected mechanically. The complete canonical changed gate passed all 30 steps, and exact-head CI passed. Both owned Testbox leases are closed. The earlier stale shared dependency graph failure is retained and excluded from passing evidence.

@clawsweeper

clawsweeper Bot commented Sep 6, 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 gateway Gateway runtime commands Command implementations size: L maintainer Maintainer-authored PR labels Sep 6, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 6, 2026
@clawsweeper

clawsweeper Bot commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 6, 2026, 7:58 AM ET / 11:58 UTC.

ClawSweeper review

What this changes

Doctor replaces unsupported TUI cleanup advice with factual Gateway-pressure observations and diagnostic guidance, removes unreachable termination code, and updates documentation and regression coverage.

Merge readiness

⛔ Blocked before merge - 1 item remains

This PR remains useful: current main and v2026.9.2 still contain the misleading cleanup advice. No actionable patch defect was found. The previous migration-proof blocker does not apply because the introduced changes do not modify persistence or repair authorization.

Priority: P2
Reviewed head: d57cc2c1bc3457353bcc67b009ebbed7596e68e6

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, maintainable correction with useful boundary coverage and no supported correctness or security blocker.
Proof confidence 🌊 off-meta tidepool Not applicable: The supplied repository state identifies a MEMBER-authored PR, so the external-contributor proof gate does not apply. Tests exercise the actual advisory owner through mocked Gateway and process boundaries; they are supplemental contribution-flow evidence, not a live Gateway run. No material authority change requires additional final-effect proof.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The supplied repository state identifies a MEMBER-authored PR, so the external-contributor proof gate does not apply. Tests exercise the actual advisory owner through mocked Gateway and process boundaries; they are supplemental contribution-flow evidence, not a live Gateway run. No material authority change requires additional final-effect proof.
Evidence reviewed 9 items Current main still needs the correction: The current-main owner still attributes pressure to TUI clients and recommends doctor --fix. Its blob matches v2026.9.2, so the central advice correction is not already shipped.
Latest-release advice inspected: The v2026.9.2 source retains both the unsupported fix hint and the old termination helper; the advice owner has blob d337797923109ec59e09421ca545abacba3bc2ca in both the release and fetched main.
Existing maintenance boundary makes cleanup unreachable: Explicit repair enters maintenance before constructing the health context. runGatewayHealthChecks returns before assigning gatewayStatus during maintenance; the old termination branch requires both repair mode and degraded status. These lifecycle files are unchanged between the reviewed head and fetched main.
Findings None None.
Security None None.

How this fits together

Doctor combines Gateway health with local terminal-client observations to guide operators troubleshooting WhatsApp responsiveness. Its repair mode already skips Gateway health collection during maintenance.

flowchart TD
  A[Doctor invocation] --> B{Repair maintenance active?}
  B -->|Yes| C[Skip Gateway health collection]
  B -->|No| D[Read Gateway pressure]
  D --> E[Observe local terminal clients]
  E --> F[Render factual advice]
  F --> G[Operator inspects diagnostics]
Loading

Before merge

  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

Source -101, Tests -48, Docs +2, Other -1. Total -148 across 10 files.

View PR surface stats
Area Files Added Removed Net
Source 3 21 122 -101
Tests 3 167 215 -48
Docs 3 8 6 +2
Config 0 0 0 0
Generated 0 0 0 0
Other 1 0 1 -1
Total 10 196 344 -148

Review metrics

None.

Stored data model

Persistent data-model change detected: migration/backfill/repair: config/assertion-safety-baseline.txt, migration/backfill/repair: src/commands/doctor-whatsapp-responsiveness.ts, migration/backfill/repair: src/flows/doctor-health-contribution-runners.gateway.ts, migration/backfill/repair: src/flows/doctor-health-contributions-final.ts, unknown-data-model-change: src/commands/doctor-whatsapp-responsiveness.ts. Confirm migration or upgrade compatibility proof before merge.

Technical review

Best possible solution:

Keep one shared advisory renderer that reports observed pressure, preserves the opt-in check, and directs operators to existing diagnostics without inferring causation.

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

Yes, from source: inspection with WhatsApp enabled, degraded Gateway status, and detected TUI clients recommends cleanup that repair-mode maintenance cannot perform. No runtime reproduction was executed here.

Is this the best way to solve the issue?

Yes. Reusing the structured finding for the note corrects both misleading outputs while preserving existing maintenance behavior; a database migration is unrelated to this repair.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: Corrects misleading operational advice in an existing troubleshooting flow with limited blast radius.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The supplied repository state identifies a MEMBER-authored PR, so the external-contributor proof gate does not apply. Tests exercise the actual advisory owner through mocked Gateway and process boundaries; they are supplemental contribution-flow evidence, not a live Gateway run. No material authority change requires additional final-effect proof.

Evidence

What I checked:

  • Current main still needs the correction: The current-main owner still attributes pressure to TUI clients and recommends doctor --fix. Its blob matches v2026.9.2, so the central advice correction is not already shipped. (src/commands/doctor-whatsapp-responsiveness.ts:127, 9b043a18cbb5)
  • Latest-release advice inspected: The v2026.9.2 source retains both the unsupported fix hint and the old termination helper; the advice owner has blob d337797923109ec59e09421ca545abacba3bc2ca in both the release and fetched main. (src/commands/doctor-whatsapp-responsiveness.ts:132, 3928bad9badf)
  • Existing maintenance boundary makes cleanup unreachable: Explicit repair enters maintenance before constructing the health context. runGatewayHealthChecks returns before assigning gatewayStatus during maintenance; the old termination branch requires both repair mode and degraded status. These lifecycle files are unchanged between the reviewed head and fetched main. (src/flows/doctor-health-contributions.ts:425, d57cc2c1bc34)
  • Prior migration concern resolved by introduced scope: The verified merge-base-to-head production delta changes advisory rendering and internal callers while deleting termination code and its private test export. No schema, persisted representation, migration, config option, SDK export, or maintenance authorization changes are introduced. Endpoint-only base changes were excluded. (src/commands/doctor-whatsapp-responsiveness.ts:132, d57cc2c1bc34)
  • Existing diagnostics path reused: The recommended gateway diagnostics export command already has a registered CLI implementation. The diagnostic logger already escalates persistent degradation, and the Gateway sampler exposes that condition after 60 seconds, supporting the documentation correction. (src/cli/gateway-cli/register.ts:759, d57cc2c1bc34)
  • Focused contribution-flow coverage: The new integration cases run the actual health and responsiveness contributions in order, checking observational CPU-pressure advice during inspection and skipped status/inventory during maintenance. Gateway and process boundaries are mocked. The supplied PR body reports 336 passing tests on the reviewed head; this review did not execute tests or independently inspect the linked workflow logs. (src/flows/doctor-whatsapp-responsiveness.flow.test.ts:36, d57cc2c1bc34)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Gio Della-Libera: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (2 earlier review cycles)
  • reviewed 2026-09-06T11:39:43.464Z sha b3854e7 :: blocked before merge. :: none
  • reviewed 2026-09-06T11:51:06.288Z sha d57cc2c :: blocked before merge. :: none

@steipete
steipete merged commit 565f1d0 into main Sep 6, 2026
185 of 186 checks passed
@steipete
steipete deleted the codex/doctor-responsiveness-advice-20260906 branch September 6, 2026 12:17
@steipete

steipete commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc pushed a commit to gaoanze888/openclaw that referenced this pull request Sep 6, 2026
* commit '3ed964c8ca6206d26ecc0b6567ccd1389d9948fc': (36 commits)
  refactor(plugins): unify install config snapshot preparation (openclaw#140081)
  fix: cloud provisioning stays failed after temporary storage recovers (openclaw#140021)
  fix(ci): preflight job outputs exceed 1 MiB on full-plan pull requests (openclaw#140018)
  refactor: consolidate command and provider helpers (openclaw#140072)
  fix(doctor): replace unavailable TUI cleanup advice (openclaw#140074)
  fix(plugins): avoid scoped pack failures and missing runtime entries (openclaw#140016)
  fix: clarify background command timeouts (openclaw#140022)
  fix(workboard): refresh board navigation while retaining drafts (openclaw#139952)
  fix: preserve newer chat drafts when rewind completes (openclaw#140066)
  feat(transcripts): browse and export saved meeting archives (openclaw#139875)
  fix(cron): complete timeout test observation phase (openclaw#140076)
  fix(macos): show the full automation count (openclaw#139692)
  fix: native worker turns fail to load WebSocket transport (openclaw#140071)
  fix(cli): complete quoted Bash option values (openclaw#140034)
  fix(chat): show command instructions while pending (openclaw#140041)
  refactor(cli): use canonical resume result schema (openclaw#140056)
  fix: restore package acceptance across install runtimes (openclaw#140062)
  refactor(auto-reply): keep model-selection fixtures in tests (openclaw#140069)
  fix(plugins): remove owned aliases before uninstalling files (openclaw#140065)
  fix: completed replies hang when context-engine cleanup stalls (openclaw#140023)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 7, 2026
* fix(doctor): replace unavailable TUI cleanup advice

* chore: align Doctor cleanup with validation guards
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 gateway Gateway runtime maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: L 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