fix(doctor): prune stale bundled plugin load paths#85038
Conversation
|
Codex review: needs real behavior proof before merge. Latest ClawSweeper review: 2026-05-24 01:40 UTC / May 23, 2026, 9:40 PM ET. Workflow note: Future ClawSweeper reviews update this same comment in place. How this review workflow works
PR Surface View PR surface stats
Summary Reproducibility: yes. by source inspection. Current main only recognizes active bundled aliases and same-package legacy aliases, so a removed old-version OpenClaw package path falls through discovery and becomes a PR rating Rank-up moves:
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. Real behavior proof Risk before merge
Maintainer options:
Next step before merge Security Review detailsBest possible solution: Land the doctor-only repair after real Do we have a high-confidence way to reproduce the issue? Yes, by source inspection. Current main only recognizes active bundled aliases and same-package legacy aliases, so a removed old-version OpenClaw package path falls through discovery and becomes a Is this the best way to solve the issue? Yes, the doctor-only repair is the narrow maintainable fix for the linked upgrade bug. The remaining blockers are real CLI proof and maintainer acceptance of the compatibility boundary, not a different code direction. Label justifications:
What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 6c210668eded. |
|
ClawSweeper PR egg 🎁 Pass real behavior proof to wake the egg and unlock a hatchable treat. Where did the egg go?
|
63195f3 to
a61096d
Compare
|
@clawsweeper re-review I updated the PR body with isolated WSL |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
a61096d to
9507540
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
9507540 to
cce85fd
Compare
|
@clawsweeper re-review Rebased onto current upstream/main and resolved the changelog conflict. Re-ran focused doctor/config tests, oxfmt, git diff check, and autoreview clean on the rebased signed commit. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
cce85fd to
425fb15
Compare
* fix(doctor): prune stale bundled plugin paths (openclaw#85038) * fix: honor OPENCLAW_HOME defaults (openclaw#85802) * fix: honor OPENCLAW_HOME defaults * fix(install): preserve openclaw home upgrade defaults * fix(install): satisfy shellcheck tilde patterns * fix(config): do not suppress recovery retry after failed backup restore (openclaw#85787) maybeRecoverSuspiciousConfigRead unconditionally recorded lastObservedSuspiciousSignature in health state even when restoredFromBackup was false (copyFile failed). The guard at resolveConfigReadRecoveryContext then prevented the same signature from ever being retried, permanently accepting the suspicious config on every subsequent launch. Only record the dedup signature when the backup restore actually succeeded. * fix(docker): restore config parent ownership * fix(pi-runner): flush blocks after compaction retry (openclaw#85288) (thanks @spacegeologist) Behavior addressed: Embedded PI compaction retry now drains block replies again after the retry wait resolves, so retry-generated replies are not left behind while preserving aggregate-timeout fallback behavior. Real environment tested: local OpenClaw focused Pi runner test shard plus contributor local live-output proof in the PR body. Exact steps or command run after this patch: pnpm test src/agents/pi-embedded-runner/run/attempt.spawn-workspace.context-engine.test.ts src/agents/pi-embedded-runner/run/compaction-retry-aggregate-timeout.test.ts; .agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main Evidence after fix: 2 test files passed, 55 tests passed; final autoreview clean with no accepted/actionable findings. Observed result after fix: the runner flushes before the compaction wait, waits for compaction retry, then performs a second idempotent flush when the wait resolves without timing out. What was not tested: fresh external-channel live retry by this agent; PR retains contributor live-output proof for the delayed channel adapter path. Thanks @spacegeologist. Co-authored-by: zhengzuo0-ai <zheng.zuo0@gmail.com> * feat(gateway): forward OpenAI sampling params (openclaw#84094) Forward OpenAI-compatible frequency_penalty, presence_penalty, and seed params through the gateway/chat-completions path while keeping Responses untouched. Verification: - pnpm test src/gateway/openai-http.test.ts src/agents/pi-embedded-runner/extra-params.sampling.test.ts src/agents/openai-transport-stream.test.ts - CI passed on head 9abb946 after rerunning cancelled jobs: preflight, critical quality network-runtime-boundary, security high, checks, docs, Real behavior proof. Co-authored-by: lellansin <lellansin@gmail.com> * fix: correct build errors from cherry-pick merges - Add missing topP field to AgentStreamParams in shared-types.ts - Replace missing resolveAliasedParamValueFromKeys with existing resolveAliasedParamValue in extra-params.ts - Fix onBlockReplyFlush bare variable reference to params.onBlockReplyFlush in attempt.ts * fix: add missing topP to BaseStreamOptions * fix: add missing openai-http helpers (resolveResponseFormat, resolveErrorMessage, validateOpenAiSamplingParams) * fix(tests): revert context-engine test to origin/main state (ported tests need upstream infrastructure) * fix(tests): restore local import paths broken by upstream cherry-picks * fix(tests): fix remaining cherry-pick compat issues for gemmaclaw - openai-http.ts: add FailoverError import, pass streamParams through buildAgentCommandInput, add integer check for seed param, handle FailoverError format reason as 400 in catch block - openai-http.test.ts: add missing FailoverError import - dockerfile.test.ts: use gemmaclaw stage name base-\${OPENCLAW_VARIANT} instead of upstream base-runtime - test/scripts/install-sh.test.ts: remove test file added by cherry-pick 762ae06; it tests apt_get wrapper, npm freshness, macOS Homebrew, and duplicate-install detection from unported companion commits; file was never on gemmaclaw main --------- Co-authored-by: Gio Della-Libera <giodl73@gmail.com> Co-authored-by: Sebastien Tardif <SebTardif@ncf.ca> Co-authored-by: sallyom <somalley@redhat.com> Co-authored-by: Zee Zheng <zheng.zuo0@gmail.com> Co-authored-by: Lellansin Huang <Lellansin@gmail.com>
Summary
plugins.load.pathsentries from old versionednode_modules/openclawpackage roots as bundled-plugin aliases during doctor detection and repair.extensions/<plugin>roots while keeping arbitrary custom plugin paths untouched.Fixes #58626.
Verification
2026-05-23 update after rebasing onto
origin/main(1a60c19743), head425fb15c7d:node scripts/run-vitest.mjs src/commands/doctor/shared/bundled-plugin-load-paths.test.ts --reporter=verbose(1 file, 12 tests passed)./node_modules/.bin/oxfmt --check --threads=1 CHANGELOG.md src/commands/doctor/shared/bundled-plugin-load-paths.ts src/commands/doctor/shared/bundled-plugin-load-paths.test.ts src/plugins/bundled-load-path-aliases.ts./node_modules/.bin/oxlint src/commands/doctor/shared/bundled-plugin-load-paths.ts src/commands/doctor/shared/bundled-plugin-load-paths.test.ts src/plugins/bundled-load-path-aliases.tsgit diff --check origin/main...HEADEarlier verification before the rebase:
CI=true pnpm installgit diff --check upstream/main...HEADpnpm exec oxfmt --check --threads=1 src/commands/doctor/shared/bundled-plugin-load-paths.ts src/commands/doctor/shared/bundled-plugin-load-paths.test.ts src/commands/doctor/shared/preview-warnings.ts src/commands/doctor/shared/preview-warnings.test.ts src/commands/doctor/repair-sequencing.ts CHANGELOG.mdOPENCLAW_VITEST_MAX_WORKERS=1 node scripts/run-vitest.mjs src/commands/doctor/shared/bundled-plugin-load-paths.test.ts src/commands/doctor/shared/preview-warnings.test.ts src/commands/doctor/repair-sequencing.test.ts src/cli/plugins-install-config.test.ts --reporter=verbose(59 tests passed).agents/skills/autoreview/scripts/autoreview --mode branch(clean: no accepted/actionable findings)Real behavior proof
Behavior addressed: stale bundled plugin load paths from old versioned OpenClaw package roots are removed by doctor repair instead of remaining as
plugins.load.pathsconfig errors after upgrade.Real environment tested: WSL Ubuntu-24.04 checkout at
/root/src/openclaw-85038, Node/Vitest via repo wrapper.Exact steps or command run after this patch:
node scripts/run-vitest.mjs src/commands/doctor/shared/bundled-plugin-load-paths.test.ts --reporter=verboseEvidence after fix: The focused tests cover old-version packaged path repair, old-version legacy path repair, current packaged path repair, and preserving unrelated custom paths with similar
dist/extensions/<plugin>layouts.Observed result after fix: old
.../node_modules/openclaw/dist/extensions/<plugin>and old.../node_modules/openclaw/extensions/<plugin>entries are pruned when they match a current bundled plugin leaf, while unrelatedelsewhere/dist/extensions/<plugin>paths are preserved. The focused suite passed 12 tests; static checks were clean.What was not tested: I did not rerun the broader 59-test doctor/config group after this rebase; the focused behavior and touched-file static checks passed.