Doctor: expose shell completion health findings#85566
Conversation
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: needs real behavior proof before merge. Reviewed May 25, 2026, 11:18 AM ET / 15:18 UTC. Summary PR surface: Source +99, Tests +150. Total +249 across 6 files. Reproducibility: yes. for the blocking regression from source: the PR adds info findings, while the CLI default severity threshold is also Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance: Risk before merge
Maintainer options:
Next step before merge Security Review findings
Review detailsBest possible solution: Keep the structured detector, but land it only after default lint compatibility is preserved and proven through the actual CLI path. Do we have a high-confidence way to reproduce the issue? Yes for the blocking regression from source: the PR adds info findings, while the CLI default severity threshold is also Is this the best way to solve the issue? No. The structured check shape is reasonable, but the compatibility fix must be proven against Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against 8da8bc4aadfc. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +99, Tests +150. Total +249 across 6 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
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 PR egg 🎁 Pass real behavior proof to wake the egg and unlock a hatchable treat. Where did the egg go?
|
c23c553 to
d64ff36
Compare
|
@clawsweeper re-review Updated PR2 onto current #83753 (d139d39) and refreshed the proof/body. The branch now keeps run(ctx) internal to the core runner path and leaves the public plugin health contract as split detect(ctx, scope?) plus optional repair(ctx, findings). |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
9c35ac5 to
d139d39
Compare
d64ff36 to
6a4e5ad
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review Updated this PR on current What changed:
Validation run locally in WSL from
No merge performed. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review Updated #85566 to follow the latest ClawSweeper asks:
No merge performed. |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@clawsweeper re-review Rebased #85566 onto current ClawSweeper asks remain addressed on the new head:
No merge performed. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Summary
Adds structured doctor visibility for shell-completion health without changing public doctor/plugin SDK contracts:
core/doctor/shell-completionfindingsdoctor --lintcompatibility is preserveddoctorShellCompletionpath, outside the broad structured repair passThis is the small repeatable doctor pattern: expose structured findings first, add effects where honest, and avoid rewriting legacy repair behavior.
Real behavior proof
Behavior or issue addressed:
Doctor lint and structured repair preview plumbing can now see shell-completion issues as
core/doctor/shell-completionfindings/effects while normaldoctor --fixstill uses the existing shell-completion repair flow. The ClawSweeper compatibility ask is addressed by making these findings informational, so default lint does not newly fail for existing slow or missing-cache shell-completion profiles.Real environment tested:
WSL Ubuntu 24.04 worktree
/root/src/openclaw-doctor-shell-main, branchdoctor-core-run-contract-migration, source harness on head1344b6d3c1, Node 24.15.0, pnpm workspace dependencies installed. The terminal proof uses redacted synthetic shell-completion status values and imports the real branch code paths.Exact steps or command run after this patch:
git diff --check origin/main...HEADnode_modules/.bin/oxfmt --check --threads=1 src/commands/doctor-completion.ts src/commands/doctor-completion.test.ts src/flows/doctor-lint-flow.test.ts src/flows/doctor-core-checks.ts src/flows/doctor-health-contributions.ts src/flows/doctor-health-contributions.test.tsnode_modules/.bin/oxlint --tsconfig config/tsconfig/oxlint.core.json src/commands/doctor-completion.ts src/commands/doctor-completion.test.ts src/flows/doctor-lint-flow.test.ts src/flows/doctor-core-checks.ts src/flows/doctor-health-contributions.ts src/flows/doctor-health-contributions.test.tsnode scripts/run-vitest.mjs src/commands/doctor-completion.test.ts src/flows/doctor-lint-flow.test.ts src/flows/doctor-core-checks.test.ts src/flows/doctor-health-contributions.test.ts --reporter=dotnode scripts/run-tsgo.mjs -p tsconfig.core.json --noEmit --incremental false --pretty falsenode scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.core.test.json --noEmit --incremental false --pretty falsenode --import tsx /tmp/85566-proof.mjsbash /mnt/c/src/claws-hapi/.agents/skills/autoreview/scripts/autoreview --mode branch --base origin/mainEvidence after fix:
Focused validation passed:
Terminal source-harness output from the changed shell-completion mapping and lint exit-code path:
{ "name": "slowDynamic", "findings": [ { "checkId": "core/doctor/shell-completion", "severity": "info", "message": "Your zsh profile uses slow dynamic completion (source <(...)).", "path": "shellCompletion.zsh", "fixHint": "Run `openclaw doctor --fix` to upgrade to cached completion." } ], "defaultLintExitCode": 0, "effects": [ { "kind": "state", "action": "would-generate-completion-cache", "target": "/redacted/home/.cache/openclaw/completion.zsh", "dryRunSafe": true }, { "kind": "file", "action": "would-upgrade-shell-profile-completion", "target": "zsh", "dryRunSafe": false } ] } { "name": "missingCache", "findings": [ { "checkId": "core/doctor/shell-completion", "severity": "info", "message": "Shell completion is configured in your zsh profile but the cache is missing.", "path": "shellCompletion.zsh", "fixHint": "Run `openclaw completion --write-state` or `openclaw doctor --fix` to regenerate /redacted/home/.cache/openclaw/completion.zsh." } ], "defaultLintExitCode": 0, "effects": [ { "kind": "state", "action": "would-regenerate-completion-cache", "target": "/redacted/home/.cache/openclaw/completion.zsh", "dryRunSafe": true } ] }Observed result after fix:
Both slow dynamic completion and missing cache states produce structured shell-completion findings and dry-run effects, but the findings are
infoandexitCodeFromFindings(findings)returns0, preserving default lint compatibility. Real mutation remains delegated to the existing positionaldoctorShellCompletionrepair path.What was not tested:
No live shell startup file was modified in this proof. The proof uses a source harness with redacted synthetic shell-completion statuses to exercise the real mapping/effect/exit-code functions; existing shell profile mutation remains covered by the legacy
doctorShellCompletionpath and focused unit coverage.Validation
1344b6d3c1Doctor stack