fix(doctor): discover load-path plugin contracts#77477
Conversation
|
Codex review: needs changes before merge. Summary Reproducibility: yes. at source level. Current main omits active config when resolving plugin doctor contracts while manifest discovery depends on config.plugins.load.paths, so a load-path-only plugin can be runtime-visible but doctor-invisible. Real behavior proof Next step before merge Security Review findings
Review detailsBest possible solution: Keep the active-config pass-through, but compute plugin fallback ids from unresolved channels plus configured non-channel plugin entries and cover a handled bundled channel plus non-channel plugin regression. Do we have a high-confidence way to reproduce the issue? Yes, at source level. Current main omits active config when resolving plugin doctor contracts while manifest discovery depends on config.plugins.load.paths, so a load-path-only plugin can be runtime-visible but doctor-invisible. Is this the best way to solve the issue? No for the current PR head. Passing active config through doctor discovery is the narrow maintainable fix, but fallback id selection should exclude bundled channels already handled by channel doctor normalizers. Full review comments:
Overall correctness: patch is incorrect Acceptance criteria:
What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against aed96bb60c7c. |
|
This was opened with the wrong base. Fixing. |
7c3a220 to
3b6f973
Compare
c9d09b9 to
fd55fe6
Compare
fd55fe6 to
c1cc146
Compare
409bbaf to
244a138
Compare
244a138 to
542bfd6
Compare
542bfd6 to
d428fd4
Compare
|
Merged via squash.
Thanks @jalehman! |
Summary
Fixes OpenClaw doctor so plugin doctor contract sidecars are discovered for explicit filesystem plugins loaded via
plugins.load.paths.This matters for plugins like Lossless Claw during local/checkout-based development: the runtime can load the plugin successfully, but
openclaw doctorpreviously built its doctor-contract registry from the installed/persisted plugin registry without the active config, so load-path plugins were invisible to doctor.What changed
plugins.load.pathsplugins are included.doctor --fixcompatibility migration collection so configured plugin entries, not just channel ids, can contribute plugin doctor normalizers.Validation
Manual combined-branch validation with Lossless PR #600:
pnpm openclaw doctornow shows Lossless warnings forsummaryModelandfallbackProvidersrequiringplugins.entries.lossless-claw.llm.allowModelOverride/allowedModels.doctor --fixrun addsallowModelOverride: trueand the configuredallowedModels, without addingallowAgentIdOverride.Real behavior proof
Behavior or issue addressed:
openclaw doctor/openclaw doctor --fixnow discovers doctor contract sidecars from explicitplugins.load.pathsplugins. This lets load-path plugins such aslossless-clawsurface legacy config warnings and letsdoctor --fixapply plugin-owned normalizers before validation, instead of only considering unresolved channel ids.Real environment tested: Josh’s local OpenClaw checkout on macOS, using the real OpenClaw CLI and real configured Lossless plugin entry. The destructive fix path was tested against a copied temp config so Josh’s real config was not modified.
Exact steps or command run after this patch:
Evidence after fix:
Observed result after fix: The load-path Lossless doctor contract was discovered from the configured plugin entry, read-only doctor showed the expected Lossless warnings, and
doctor --fix --non-interactiveupdated the copied config with the expected Losslessllmpolicy.What was not tested: The fix path was intentionally run against a copied temp config, not Josh’s real live config. Full local
pnpm testlater failed becausevitest.unit-fast.config.tshit the no-output watchdog twice; focused tests,pnpm build, andpnpm checkpassed.