Skip to content

Expose disk space doctor lint findings#98391

Merged
giodl73-repo merged 2 commits into
openclaw:mainfrom
giodl73-repo:doctor-disk-space-lint-findings
Jul 2, 2026
Merged

Expose disk space doctor lint findings#98391
giodl73-repo merged 2 commits into
openclaw:mainfrom
giodl73-repo:doctor-disk-space-lint-findings

Conversation

@giodl73-repo

@giodl73-repo giodl73-repo commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a default-disabled core/doctor/disk-space structured health check for low free space around OPENCLAW_STATE_DIR
  • reuse the existing Doctor disk-space warning builder so legacy doctor note output and structured lint findings share thresholds/messages
  • keep real behavior read-only: no config, plugin, SDK, or persisted data contract changes

Real behavior proof

  • Source CLI with isolated OPENCLAW_CONFIG_PATH and OPENCLAW_STATE_DIR:
    • node scripts/run-node.mjs doctor --lint --json ran broad default lint with disk=0, proving default lint skips the new default-disabled check
    • node scripts/run-node.mjs doctor --lint --json --only core/doctor/disk-space ran checksRun=1, checksSkipped=36, disk=0, exit 0 on a healthy temp state partition
  • Focused source harness proves positive low/critical findings by injecting disk-space snapshots for 300 MB and 50 MB free.

Validation

  • Rebased onto current main after Doctor: expose tool result cap findings #97500 merged and fixed the CI check-test-types failure by typing the disk-space health-finding mock.
  • node scripts/run-vitest.mjs src/commands/doctor-disk-space.test.ts src/flows/doctor-health-contributions.test.ts
  • ./node_modules/.bin/oxfmt --check src/commands/doctor-disk-space.test.ts src/commands/doctor-disk-space.ts src/flows/doctor-health-contributions.test.ts src/flows/doctor-health-contributions.ts
  • ./node_modules/.bin/oxlint src/commands/doctor-disk-space.test.ts src/commands/doctor-disk-space.ts src/flows/doctor-health-contributions.test.ts src/flows/doctor-health-contributions.ts
  • pnpm tsgo:core:test
  • pnpm tsgo:core
  • node scripts/plugin-sdk-surface-report.mjs --check
  • git diff --check origin/main...HEAD

@openclaw-barnacle openclaw-barnacle Bot added commands Command implementations size: M maintainer Maintainer-authored PR labels Jul 1, 2026
@giodl73-repo

Copy link
Copy Markdown
Contributor Author

@clawsweeper review

@clawsweeper

clawsweeper Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@clawsweeper

clawsweeper Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 2, 2026, 12:55 PM ET / 16:55 UTC.

Summary
The branch adds a default-disabled core/doctor/disk-space structured Doctor lint check, reuses the existing disk-space warning builder, and extends focused tests.

PR surface: Source +61, Tests +113. Total +174 across 4 files.

Reproducibility: not applicable. This PR adds a structured Doctor lint surface rather than reporting broken existing behavior. The relevant verification is code-path review plus the PR body's source CLI proof and focused tests.

Review metrics: 1 noteworthy metric.

  • Doctor lint check surface: 1 added, default-disabled. The PR expands the structured Doctor lint inventory for --only and --all without changing the default lint selection.

Stored data model
Persistent data-model change detected: migration/backfill/repair: src/commands/doctor-disk-space.test.ts, migration/backfill/repair: src/commands/doctor-disk-space.ts, migration/backfill/repair: src/flows/doctor-health-contributions.test.ts, migration/backfill/repair: src/flows/doctor-health-contributions.ts, unknown-data-model-change: src/commands/doctor-disk-space.test.ts, unknown-data-model-change: src/commands/doctor-disk-space.ts, and 1 more. Confirm migration or upgrade compatibility proof before merge.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🐚 platinum hermit
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • none.

Next step before merge

  • No ClawSweeper repair lane is needed; the remaining action is maintainer review/merge handling for a protected-label PR with no concrete patch defect.

Security
Cleared: The diff only changes Doctor command code and tests, adds no dependencies, workflows, permissions, network execution, package metadata, or secret-handling surface.

Review details

Best possible solution:

Land the default-disabled disk-space lint exposure after maintainer review and required checks, keeping default doctor --lint behavior unchanged.

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

Not applicable; this PR adds a structured Doctor lint surface rather than reporting broken existing behavior. The relevant verification is code-path review plus the PR body's source CLI proof and focused tests.

Is this the best way to solve the issue?

Yes; the narrow owner-boundary solution is to register disk-space as a default-disabled health check on the existing Doctor contribution and reuse the existing warning builder.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 019603d33602.

Label changes

Label justifications:

  • P3: This is a low-risk diagnostic ergonomics improvement to Doctor lint, not an urgent runtime regression.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body reports after-fix source CLI runs for default and explicit disk-space lint selection plus focused injected low/critical findings, which is sufficient for this non-visual CLI diagnostic change.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body reports after-fix source CLI runs for default and explicit disk-space lint selection plus focused injected low/critical findings, which is sufficient for this non-visual CLI diagnostic change.
Evidence reviewed

PR surface:

Source +61, Tests +113. Total +174 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 2 80 19 +61
Tests 2 115 2 +113
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 195 21 +174

What I checked:

Likely related people:

  • giodl73-repo: They authored and merged recent structured Doctor lint PRs for memory search, workspace status, and tool-result cap in the same registry and test surfaces. (role: recent doctor lint contributor; confidence: high; commits: 816038e97a5d, 4ac5cf863673, b2c507c5f04c; files: src/flows/doctor-health-contributions.ts, src/flows/doctor-health-contributions.test.ts, src/flows/doctor-tool-result-cap-advice.ts)
  • alkor2000: Merged PR metadata for feat(doctor): add disk space health check for state directory #59196 shows they added doctor:disk-space, its command module, and tests that this PR extends. (role: introduced disk-space Doctor behavior; confidence: high; commits: 6c6aae411ba6, 6c835cf57acd, c307fc2d1d74; files: src/commands/doctor-disk-space.ts, src/commands/doctor-disk-space.test.ts, src/flows/doctor-health-contributions.ts)
  • steipete: GitHub PR metadata shows they merged the PR that introduced the disk-space Doctor contribution now being extended. (role: merger of original disk-space contribution; confidence: medium; commits: 9d97e683d419; files: src/commands/doctor-disk-space.ts, src/flows/doctor-health-contributions.ts)
  • OfflynAI: Local blame currently points the whole disk-space file snapshot at commit 133ce01, but the commit title is broad and the more specific behavior provenance is the earlier merged disk-space PR. (role: current-main snapshot author; confidence: low; commits: 133ce01e4ae9; files: src/commands/doctor-disk-space.ts, src/flows/doctor-health-contributions.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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.

How this review workflow works
  • 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.

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. 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. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Jul 1, 2026
@giodl73-repo
giodl73-repo marked this pull request as ready for review July 1, 2026 16:32
@giodl73-repo
giodl73-repo force-pushed the doctor-disk-space-lint-findings branch from 73df622 to 31b866c Compare July 2, 2026 05:07
@giodl73-repo

Copy link
Copy Markdown
Contributor Author

@clawsweeper review

@clawsweeper

clawsweeper Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@giodl73-repo
giodl73-repo force-pushed the doctor-disk-space-lint-findings branch from 31b866c to b0f5233 Compare July 2, 2026 16:45
@giodl73-repo
giodl73-repo merged commit 285c629 into openclaw:main Jul 2, 2026
98 checks passed
@giodl73-repo

Copy link
Copy Markdown
Contributor Author

Merged via squash.

@giodl73-repo
giodl73-repo deleted the doctor-disk-space-lint-findings branch July 2, 2026 16:56
LeonidasLux pushed a commit to LeonidasLux/openclaw that referenced this pull request Jul 3, 2026
* Expose disk space doctor lint findings

* test(doctor): type disk-space health finding mock
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 3, 2026
* Expose disk space doctor lint findings

* test(doctor): type disk-space health finding mock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands Command implementations maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M 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