Skip to content

Doctor: expose configured plugin install findings#96171

Merged
giodl73-repo merged 2 commits into
openclaw:mainfrom
giodl73-repo:doctor-configured-plugin-installs-structured-repairs
Jun 27, 2026
Merged

Doctor: expose configured plugin install findings#96171
giodl73-repo merged 2 commits into
openclaw:mainfrom
giodl73-repo:doctor-configured-plugin-installs-structured-repairs

Conversation

@giodl73-repo

@giodl73-repo giodl73-repo commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add structured core/doctor/configured-plugin-installs findings for configured plugins that are missing install records, missing package payloads, deferred during package update, stale version-bound runtime packages, or repairable package metadata
  • expose dry-run package repair effects for those findings
  • keep real package install/update mutation in the existing legacy configured plugin install repair path
  • register the check as lint-only and default-disabled so it only runs when explicitly selected
  • add exhaustive mapper fallbacks after the rebase so lint has a concrete return path for every configured-plugin install issue mapper

Contract

  • No public SDK, plugin, or config contract changes.
  • No default Doctor behavior change: core/doctor/configured-plugin-installs has defaultEnabled: false and is reached through explicit lint selection, e.g. doctor --lint --only core/doctor/configured-plugin-installs or doctor --lint --all.
  • This is split from Doctor: expose plugin registry findings #96169 so plugin registry findings and configured package install findings can be reviewed independently.

Validation

  • Head: 582502d0fd90a98a6320605beb95fc4ed1243649
  • node scripts/run-vitest.mjs run src/commands/doctor/shared/missing-configured-plugin-install.test.ts src/flows/doctor-health-contributions.test.ts --reporter=dot (132 passed)
  • pnpm exec oxfmt --check src/commands/doctor/shared/missing-configured-plugin-install.ts src/commands/doctor/shared/missing-configured-plugin-install.test.ts src/flows/doctor-health-contributions.ts src/flows/doctor-health-contributions.test.ts
  • pnpm exec oxlint src/commands/doctor/shared/missing-configured-plugin-install.ts src/commands/doctor/shared/missing-configured-plugin-install.test.ts src/flows/doctor-health-contributions.ts src/flows/doctor-health-contributions.test.ts
  • pnpm tsgo:core
  • node scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.test.src.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/test-src.tsbuildinfo
  • node scripts/plugin-sdk-surface-report.mjs --check
  • git diff --check origin/main...HEAD

Source Proof

  • Focused detector coverage asserts the missing install record, deferred package repair, and missing package payload cases without invoking package install/update mutation.
  • Contribution coverage asserts the lint check id is registered as defaultEnabled: false and does not enter the default Doctor set.
  • A post-rebase isolated CLI sanity run of doctor --lint --json --only core/doctor/configured-plugin-installs completed with ok: true, checksRun: 1, and no findings; current bundled/default state did not recreate the missing external package scenario, so the branch relies on the focused source tests for the failing cases.

No dry-run preview consumer is included in this slice; real package install/update mutation remains in the existing configured plugin install repair path.

Copy link
Copy Markdown
Contributor Author

@clawsweeper review

Please review PR #96171 at head 0a7f3e95d4fa7074f1f6e1330f067c75bad2691c. Focus: structured Doctor configured plugin install findings/effects only; real package install/update mutation remains in the existing legacy configured plugin install repair path. No public SDK/plugin/config contract changes intended.

@clawsweeper

clawsweeper Bot commented Jun 23, 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.

@openclaw-barnacle openclaw-barnacle Bot added commands Command implementations size: L maintainer Maintainer-authored PR labels Jun 23, 2026
@clawsweeper

clawsweeper Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed June 27, 2026, 4:44 PM ET / 20:44 UTC.

Summary
The PR adds a default-disabled core/doctor/configured-plugin-installs Doctor lint check that maps configured plugin install issues to structured findings and package repair effects while leaving real package mutation in the existing repair path.

PR surface: Source +485, Tests +162. Total +647 across 4 files.

Reproducibility: not applicable. as a bug reproduction; this is a feature/diagnostic PR. Source inspection, focused tests, and terminal-style CLI proof cover the new opt-in lint path rather than a failing current-main behavior.

Review metrics: 1 noteworthy metric.

  • Doctor lint surface: 1 default-disabled health check added. Default lint remains stable, but explicit --all and --only Doctor lint output and exit behavior can change.

Stored data model
Persistent data-model change detected: migration/backfill/repair: src/commands/doctor/shared/missing-configured-plugin-install.test.ts, migration/backfill/repair: src/commands/doctor/shared/missing-configured-plugin-install.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/shared/missing-configured-plugin-install.test.ts, unknown-data-model-change: src/commands/doctor/shared/missing-configured-plugin-install.ts. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster
Relationship: canonical
Canonical: #96171
Summary: This PR is the active configured-plugin install findings slice; the merged plugin-registry PR is an adjacent structured Doctor slice, not a replacement.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

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.

Risk before merge

  • [P1] Explicit doctor --lint --all or --only core/doctor/configured-plugin-installs users can now receive configured-plugin install warnings and exit code 1 for broken install state.
  • [P1] The check id, warning severity, and package repair-effect policy are compatibility-sensitive Doctor behavior and need maintainer acceptance before merge.

Maintainer options:

  1. Accept The Opt-In Lint Surface (recommended)
    Approve that explicit Doctor lint selection may report configured-plugin install warnings and nonzero lint status while default lint remains unchanged.
  2. Adjust Diagnostic Policy First
    Ask for a different check id, severity, message, or repair-effect mapping if maintainers want this package state exposed differently.
  3. Pause If This Should Stay Legacy-Only
    Keep or close the PR if configured plugin package state should remain visible only through the legacy Doctor repair flow for now.

Next step before merge

  • [P2] Manual review is the right next action because the protected maintainer label and compatibility-sensitive opt-in lint behavior require acceptance, not an automated code repair.

Security
Cleared: No concrete security or supply-chain concern was found; the diff is Doctor TypeScript/tests and does not change dependencies, lockfiles, workflows, secrets, or package source resolution.

Review details

Best possible solution:

Keep the check default-disabled and non-mutating, then merge only after a maintainer accepts the explicit lint behavior and repair-effect policy.

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

Not applicable as a bug reproduction; this is a feature/diagnostic PR. Source inspection, focused tests, and terminal-style CLI proof cover the new opt-in lint path rather than a failing current-main behavior.

Is this the best way to solve the issue?

Yes, for this slice: the PR follows the merged structured Doctor pattern while preserving the existing configured-plugin repair owner for package mutation. The remaining question is maintainer acceptance of the opt-in lint surface, not a narrower code repair.

AGENTS.md: found and applied where relevant.

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

Label changes

Label justifications:

  • P2: This is a bounded Doctor diagnostic improvement with limited blast radius, but it affects compatibility-sensitive explicit lint behavior.
  • merge-risk: 🚨 compatibility: Explicit Doctor lint consumers using --all or the new --only id can see new warning findings and exit code 1 for configured plugin install state.
  • 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 (terminal): The PR body/comments provide terminal-style after-change proof for explicit Doctor lint selection plus focused source tests for repairable finding cases, which is adequate for this non-visual CLI diagnostic surface.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body/comments provide terminal-style after-change proof for explicit Doctor lint selection plus focused source tests for repairable finding cases, which is adequate for this non-visual CLI diagnostic surface.
Evidence reviewed

PR surface:

Source +485, Tests +162. Total +647 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 2 485 0 +485
Tests 2 162 0 +162
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 647 0 +647

What I checked:

Likely related people:

  • giodl73-repo: Authored the merged structured Doctor plugin-registry and state-integrity finding patterns that this PR follows, so they have the strongest recent main-history context for this diagnostic shape. (role: recent adjacent contributor; confidence: high; commits: 1bdde6695030, cb4244fe15e3; files: src/flows/doctor-health-contributions.ts, src/commands/doctor-plugin-registry.ts, src/commands/doctor-state-integrity.ts)
  • mushuiyu886: Current-main blame/log show the existing configured-plugin repair contribution and helper file baseline in the local history at commit 65fec9d, though the commit appears broad so ownership confidence is limited. (role: current baseline contributor; confidence: medium; commits: 65fec9d787e3; files: src/commands/doctor/shared/missing-configured-plugin-install.ts, src/flows/doctor-health-contributions.ts)
  • galiniliev: Live PR metadata shows current assignment and a substantive human review on this Doctor surface, making them a practical routing candidate for the remaining acceptance decision. (role: reviewer; confidence: medium; files: src/commands/doctor/shared/missing-configured-plugin-install.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 rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. labels Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Current head 0a7f3e95d4fa7074f1f6e1330f067c75bad2691c has the PR body updated with redacted source CLI proof for core/doctor/configured-plugin-installs using isolated temp state/config and a seeded missing configured plugin payload. No code changes; real package install/update mutation remains in the existing configured plugin install repair path.

@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. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jun 24, 2026
@giodl73-repo
giodl73-repo force-pushed the doctor-configured-plugin-installs-structured-repairs branch from 0a7f3e9 to 312da11 Compare June 26, 2026 20:38
@giodl73-repo

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Refreshed after rebase onto current main.

Changes since prior sweep:

  • added defaultEnabled: false for core/doctor/configured-plugin-installs, matching the explicit lint-only behavior used by the other new Doctor rules
  • fixed Windows-portable path expectations in the focused detector tests
  • reran focused detector/contribution tests, format/lint, SDK surface report, diff check, and core/test tsgo
  • updated the PR body to remove stale pre-rebase CLI proof and describe the current proof honestly

@clawsweeper

clawsweeper Bot commented Jun 26, 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.

@galiniliev galiniliev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR adds a default-disabled structured Doctor lint check for configured plugin install state. It matters because doctor --lint --all and explicit --only core/doctor/configured-plugin-installs can now report missing install records, missing package payloads, deferred package repairs, stale runtime packages, and repairable metadata while leaving actual package mutation in the legacy Doctor repair path.

No blocking findings.

LOC: +639/-0 (4 files)

By: Gio Della-Libera (@giodl73-repo, acct 2025-09-30) | OpenClaw: 187 PRs, 14 issues, 138 commits/12mo | GitHub: 54 repos, 6437 commits, 221 PRs, 29 issues, 17 reviews/12mo

Bug/behavior: no current-main bug fix; this exposes an opt-in structured diagnostic/dry-run-effect surface for the existing configured-plugin install repair owner.
Affected surface: src/commands/doctor/shared/missing-configured-plugin-install.ts:1408 and src/flows/doctor-health-contributions.ts:1260.
Provenance: N/A; feature/diagnostic slice split from #96169.

Best-fix verdict: best. The PR keeps package install/update mutation in the existing legacy configured-plugin repair path and registers only a read-only, default-disabled structured check, which is the right owner boundary for a lint/dry-run preview slice.

Alternatives considered:

  • Put package mutation in the structured repair() path: rejected because runReleaseConfiguredPluginInstallsHealth and repairMissingConfiguredPluginInstalls already own the package repair ordering and update-phase behavior.
  • Add only a generic finding without dry-run effects: rejected because the existing health repair contract already carries package effects, and the PR maps each repairable issue to that contract.
  • Enable it by default in lint: rejected because configured plugin package state can affect automation exit codes; defaultEnabled: false keeps the default lint gate stable.

Evidence map:

  • Changed surface: structured issue detection/mapping in src/commands/doctor/shared/missing-configured-plugin-install.ts:1408, health-check registration in src/flows/doctor-health-contributions.ts:1263.
  • Runtime entry point: openclaw doctor --lint --only core/doctor/configured-plugin-installs via src/commands/doctor-lint.ts:84 and src/flows/doctor-lint-flow.ts:38.
  • Owner boundary: package mutation remains in repairMissingConfiguredPluginInstalls / repairMissingPluginInstalls at src/commands/doctor/shared/missing-configured-plugin-install.ts:1781 and src/commands/doctor/shared/missing-configured-plugin-install.ts:1840.
  • Caller/callee: contribution registration calls detectConfiguredPluginInstallHealthIssues; the detector reuses the same catalog, records, bundled plugin, update-channel, and deferred-repair helpers used by the legacy repair path.
  • Sibling checks: compared against the adjacent structured session transcript/snapshot/config-audit patterns in src/flows/doctor-health-contributions.ts:1336, src/flows/doctor-health-contributions.ts:1368, and src/flows/doctor-health-contributions.ts:1406.
  • Current main behavior: current origin/main has the legacy doctor:release-configured-plugin-installs contribution but no core/doctor/configured-plugin-installs structured check.
  • Dependency/Codex contracts: no dependency or Codex runtime contract is changed by this PR; no upstream API/default claim is needed for the verdict.

Validation run locally:

  • pnpm install --frozen-lockfile (needed because node_modules was missing before focused test proof)
  • node scripts/run-vitest.mjs run src/commands/doctor/shared/missing-configured-plugin-install.test.ts src/flows/doctor-health-contributions.test.ts --reporter=verbose (130 passed)
  • git diff --check origin/main...HEAD

Live PR checks seen at head 312da117138d03c93c7ba4b0d816eb5a53cf3b88: Real behavior proof success, runner-admission success, workflow sanity actionlint/no-tabs success; broader matrix jobs are mostly skipped for this slice.

Remaining uncertainty: I did not rerun a packaged/update E2E lane with a real broken plugin install tree. The focused source tests and PR-posted CLI proof cover the changed structured-check behavior; maintainer acceptance is still needed because the PR is draft and has the protected maintainer label.

@galiniliev galiniliev assigned galiniliev and unassigned steipete Jun 26, 2026
@clawsweeper clawsweeper Bot added status: 🔁 re-review loop A fresh ClawSweeper review was explicitly requested after the latest review. and removed status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Jun 27, 2026
@giodl73-repo
giodl73-repo force-pushed the doctor-configured-plugin-installs-structured-repairs branch from 312da11 to 582502d Compare June 27, 2026 18:08
@giodl73-repo

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Current head 582502d0fd90a98a6320605beb95fc4ed1243649 rebases #96171 onto current main after #96169 merged and proactively fixes the CI check-lint typescript(consistent-return) risk by adding exhaustive fallbacks for the configured-plugin finding/effect mappers.

Contract remains unchanged: core/doctor/configured-plugin-installs is still opt-in via defaultEnabled: false; default doctor --lint remains unchanged, while --all and --only core/doctor/configured-plugin-installs include it. No SDK/plugin/config contract change.

Validation refreshed:

  • node scripts/run-vitest.mjs run src/commands/doctor/shared/missing-configured-plugin-install.test.ts src/flows/doctor-health-contributions.test.ts --reporter=dot (132 passed)
  • pnpm exec oxfmt --check src/commands/doctor/shared/missing-configured-plugin-install.ts src/commands/doctor/shared/missing-configured-plugin-install.test.ts src/flows/doctor-health-contributions.ts src/flows/doctor-health-contributions.test.ts
  • pnpm exec oxlint src/commands/doctor/shared/missing-configured-plugin-install.ts src/commands/doctor/shared/missing-configured-plugin-install.test.ts src/flows/doctor-health-contributions.ts src/flows/doctor-health-contributions.test.ts
  • pnpm tsgo:core
  • node scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.test.src.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/test-src.tsbuildinfo
  • node scripts/plugin-sdk-surface-report.mjs --check
  • git diff --check origin/main...HEAD

@clawsweeper

clawsweeper Bot commented Jun 27, 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 added status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed status: 🔁 re-review loop A fresh ClawSweeper review was explicitly requested after the latest review. labels Jun 27, 2026
@giodl73-repo
giodl73-repo marked this pull request as ready for review June 27, 2026 18:27
@giodl73-repo
giodl73-repo merged commit 3672201 into openclaw:main Jun 27, 2026
158 of 160 checks passed
@giodl73-repo

Copy link
Copy Markdown
Contributor Author

Merged via squash.

@giodl73-repo
giodl73-repo deleted the doctor-configured-plugin-installs-structured-repairs branch June 27, 2026 21:19
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jun 28, 2026
* feat(doctor): expose configured plugin install findings

* fix(doctor): satisfy configured plugin mapper lint
QiuYuang pushed a commit to QiuYuang/openclaw that referenced this pull request Jul 1, 2026
* feat(doctor): expose configured plugin install findings

* fix(doctor): satisfy configured plugin mapper lint
chenyangjun-xy pushed a commit to chenyangjun-xy/openclaw that referenced this pull request Jul 1, 2026
* feat(doctor): expose configured plugin install findings

* fix(doctor): satisfy configured plugin mapper lint
chenyangjun-xy pushed a commit to chenyangjun-xy/openclaw that referenced this pull request Jul 3, 2026
* feat(doctor): expose configured plugin install findings

* fix(doctor): satisfy configured plugin mapper lint
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 merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: L 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.

3 participants