Skip to content

fix: setup diagnostics can repair state without approval - #171960

Merged
roboclaw-bot merged 2 commits into
mainfrom
openclaw/doctor-readonly-diagnostic-20261014
Oct 14, 2026
Merged

roboclaw-bot merged 2 commits into
mainfrom
openclaw/doctor-readonly-diagnostic-20261014

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Fixes: requesting a setup diagnostic can repair or migrate local state without repair approval.

User Impact

The setup assistant's doctor action reports health findings without changing operator config or state. Findings retain lint's nonzero health status. Repairs still require the separate openclaw doctor --fix flow; no migration or operator action is required for this fix.

Why This Change Was Made

Non-interactive Doctor suppresses prompts, not writes. The hosted diagnostic worker now calls the existing read-only lint owner instead of the ordinary repair-capable Doctor flow. It keeps the existing subprocess boundary and cancellation/resource-settlement behavior. Truncated reports direct operators to the read-only command too.

Ordinary CLI Doctor, explicit repairs, and update-time Doctor are unchanged; the hosted diagnostic worker has only the setup-operation caller.

Evidence

  • Reproduced through the real system-agent operation and Doctor worker using synthetic isolated HOME/config/state: before the fix, the action created state/openclaw.sqlite during diagnosis. No live Doctor run, Gateway restart, or operator-state repair was performed.
  • Regression invokes that same process boundary, checks a real gateway.mode is unset finding, and compares the isolated tree's paths, file hashes, and file modification times.
  • pnpm test src/system-agent/operations.doctor.process.test.ts --maxWorkers=1: 2 passed; 47.06 s wall time including cold compiled-worker preparation; 7.013 s local test execution (single worker). The seconds-long regression protects real process/readonly-state composition, not a mocked dispatch decision. CI: 28.50 s file invocation (16.858 s test callbacks).
  • pnpm test src/system-agent/operations.doctor.test.ts --maxWorkers=1: 3 passed; 44.09 s wall including worker preparation; 0.032 s local test execution. This retains cancellation/output-failure settlement, bounded UTF-8 output, and safe follow-up guidance. CI: 10.66 s file invocation (0.069 s test callbacks).
  • Existing doctor-lint.sqlite-preservation.test.ts: all 3 cases passed, covering older SQLite schemas and WAL artifacts; combined sibling command took 59.27 s wall.
  • Core and system-agent test-lane typechecks, targeted lint, format, docs inventory, and git diff --check passed.
  • Fresh independent autoreview: scoped clean at P0–P2; no actionable findings.
  • Exact-head CI run 38534626310: successful, including the enforced CI gate; both changed test files passed in checks-node-changed-2.
  • The real compiled-worker regression provides the relevant runtime build proof. A broad local pnpm build was intentionally stopped during unrelated package declarations; full build and broad-suite proof are left to PR CI, not claimed complete locally.

Worked on by

Work sessions


View the OpenClaw team session

roboclaw-bot and others added 2 commits October 14, 2026 08:20
Run hosted Doctor through the existing read-only lint owner while retaining subprocess isolation and cleanup settlement.

Co-authored-by: vincentkoc <[email protected]>
Worked on by:
- @vincentkoc

Co-authored-by: vincentkoc <[email protected]>
OpenClaw-Publication: 21c0e433-c511-4f49-9a96-5a05b809a9bb
@roboclaw-bot
roboclaw-bot marked this pull request as ready for review October 14, 2026 08:22
@clawsweeper

clawsweeper Bot commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper reviews are opt-in for maintainers. If a review is required, finish the work and validation first, then comment @clawsweeper review. Please avoid repeated requests while a review is queued or running; agents should not request reviews automatically.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation commands Command implementations size: S labels Oct 14, 2026
@roboclaw-bot
roboclaw-bot enabled auto-merge (squash) October 14, 2026 08:29
@roboclaw-bot
roboclaw-bot merged commit 0512f3c into main Oct 14, 2026
195 of 196 checks passed
@roboclaw-bot
roboclaw-bot deleted the openclaw/doctor-readonly-diagnostic-20261014 branch October 14, 2026 08:35
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Merged via squash auto-merge.

vincentkoc added a commit that referenced this pull request Oct 14, 2026
…/plugin-memory-addon-presentation-20261014

* commit 'a8da8c92e3dbb21dd1441a30eb842fcd942e82b6': (52 commits)
  test(ui): await terminal reconnect fixture readiness (#171945)
  perf(gateway): retain only the requested ordered session page (#171968)
  test(gateway): cover automation run-alias placement lifecycle (#139313)
  fix(ci): retry FRV job listings with smaller pages after GitHub 5xx (#171952)
  fix(process): prevent false cleanup failures after CLI stdin closes (#171969)
  test(doctor): cover released updater advisory warnings (#157086)
  fix(ci): skip Testbox builds for known prose files (#171946)
  perf(sessions): remove redundant snapshot walks (#171964)
  fix(ci): skip plugin scaffold build for SDK instructions (#171944)
  fix(infra): preserve scheduler scope abort state after retirement
  fix: setup diagnostics can repair state without approval (#171960)
  perf(usage): avoid per-session admission churn during inventory (#171868)
  fix(ci): exclude documentation from extension lint scope (#171909)
  test(gateway): keep runtime-only compat flags out of live gateway config (#171953)
  docs: document ClawHub install telemetry opt-out (#114376)
  fix: recover completed chat replies after missed publication (#171766)
  refactor(ui): decouple session controller types from Lit (#171559)
  fix(gateway): settle worker reconciliation during busy shutdowns (#171843)
  fix(ci): ignore protocol prose in bundled check selection (#171908)
  fix(ui): align replacement lines and highlight inline diff edits (#171935)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 15, 2026
…1960)

* fix: setup diagnostics can repair state without approval

Run hosted Doctor through the existing read-only lint owner while retaining subprocess isolation and cleanup settlement.

Co-authored-by: vincentkoc <[email protected]>

* fix: setup diagnostics can repair state without approval

Worked on by:
- @vincentkoc

Co-authored-by: vincentkoc <[email protected]>
OpenClaw-Publication: 21c0e433-c511-4f49-9a96-5a05b809a9bb

---------

Co-authored-by: vincentkoc <[email protected]>
RomneyDa pushed a commit that referenced this pull request Oct 16, 2026
* fix: setup diagnostics can repair state without approval

Run hosted Doctor through the existing read-only lint owner while retaining subprocess isolation and cleanup settlement.

Co-authored-by: vincentkoc <[email protected]>

* fix: setup diagnostics can repair state without approval

Worked on by:
- @vincentkoc

Co-authored-by: vincentkoc <[email protected]>
OpenClaw-Publication: 21c0e433-c511-4f49-9a96-5a05b809a9bb

---------

Co-authored-by: vincentkoc <[email protected]>
(cherry picked from commit 0512f3c)
wheakerd pushed a commit to wheakerd/clawdbot that referenced this pull request Oct 22, 2026
…1960)

* fix: setup diagnostics can repair state without approval

Run hosted Doctor through the existing read-only lint owner while retaining subprocess isolation and cleanup settlement.

Co-authored-by: vincentkoc <[email protected]>

* fix: setup diagnostics can repair state without approval

Worked on by:
- @vincentkoc

Co-authored-by: vincentkoc <[email protected]>
OpenClaw-Publication: 21c0e433-c511-4f49-9a96-5a05b809a9bb

---------

Co-authored-by: vincentkoc <[email protected]>
(cherry picked from commit 0512f3c)
(cherry picked from commit 6618b39)
Co-authored-by: RomneyDa <[email protected]>
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 size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant