Doctor: expose channel plugin blocker findings#97496
Conversation
|
@clawsweeper review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Codex review: needs maintainer review before merge. Reviewed July 1, 2026, 6:50 PM ET / 22:50 UTC. Summary PR surface: Source +34, Tests +72. Total +106 across 4 files. Reproducibility: not applicable. as a bug reproduction; this PR adds an opt-in Doctor diagnostic surface. The behavior is source-reviewable through Review metrics: 1 noteworthy metric.
Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the narrow default-disabled structured Doctor check after maintainer review, preserving default lint behavior and the legacy startup-channel repair path. Do we have a high-confidence way to reproduce the issue? Not applicable as a bug reproduction; this PR adds an opt-in Doctor diagnostic surface. The behavior is source-reviewable through Is this the best way to solve the issue? Yes, pending maintainer agreement on the opt-in lint expansion. Registering the check on the existing startup-channel-maintenance contribution reuses the current scanner while preserving default lint and legacy repair behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 55d31beeef00. Label changesLabel justifications:
Evidence reviewedPR surface: Source +34, Tests +72. Total +106 across 4 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
|
galiniliev
left a comment
There was a problem hiding this comment.
This PR exposes the existing channel plugin blocker scanner through an opt-in structured Doctor lint check. That matters because operators can now target core/doctor/channel-plugin-blockers in automation without changing the default doctor --lint profile or the legacy doctor --fix startup-channel maintenance path.
LOC: +108/-1 (4 files)
By: Gio Della-Libera (@giodl73-repo, acct 2025-09-30) | OpenClaw: 194 PRs, 14 issues, 152 commits/12mo | GitHub: 6491 commits, 230 PRs, 29 issues, 17 reviews/12mo
Findings: No blocking findings.
Bug/behavior: adds structured core/doctor/channel-plugin-blockers findings for configured channels whose backing channel plugin cannot activate.
Affected surface: src/commands/doctor/shared/channel-plugin-blockers.ts:369, src/flows/doctor-health-contributions.ts:1555, src/flows/doctor-lint-flow.ts:38.
Current-main behavior: doctor:startup-channel-maintenance only has the legacy run path on origin/main; this structured lint check is not already present.
Shipped/dependency contract: no external dependency contract involved; this reuses the existing scanner and existing Doctor lint selection contract.
Provenance: N/A; feature/diagnostic-surface exposure rather than a regression fix.
Best-fix verdict: best. The check is registered on the existing startup-channel-maintenance contribution, reuses the current scanner and formatter, and is defaultEnabled: false, which preserves the default lint profile while making --all and explicit --only core/doctor/channel-plugin-blockers useful.
Alternatives considered: adding a separate core check in CORE_HEALTH_CHECKS would detach it from the ordered Doctor contribution that already owns startup channel maintenance; wiring it into normal doctor output would change default behavior; duplicating scan logic in doctor-lint-flow would put channel/plugin policy in the wrong layer.
Code read: src/commands/doctor/shared/channel-plugin-blockers.ts, src/commands/doctor/shared/preview-warnings.ts, src/flows/doctor-health-contributions.ts, src/flows/doctor-lint-flow.ts, src/flows/health-check-adapter.ts, src/flows/health-check-registry.ts, src/flows/doctor-repair-flow.ts, adjacent tests, and current origin/main for the changed contribution.
Tests: node scripts/run-vitest.mjs run src/commands/doctor/shared/channel-plugin-blockers.test.ts src/flows/doctor-health-contributions.test.ts --reporter=verbose passed, 82 tests across 2 shards. git diff --check origin/main...HEAD passed.
Remaining uncertainty: I did not rerun a packaged CLI scenario with an installed external channel plugin; the PR body includes source CLI proof, and the covered code path is source-reviewable through resolveDoctorContributionHealthChecks and runDoctorLintChecks.
1b1ccc3 to
b774fe2
Compare
|
@galiniliev thanks for the earlier review. Refreshed this after #97358 and #97366 landed and rebased onto current main at What changed in the refresh:
Validation passed on the refreshed head: focused channel-plugin-blocker/contribution Vitest (87 tests), changed-file |
|
@clawsweeper review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Maintainer note: I accept the ClawSweeper compatibility tradeoff here. This check remains default-disabled, so default |
Summary
core/doctor/channel-plugin-blockersfindingsdoctor --lintbehavior is unchanged unless operators use--allor explicit--onlydoctor --fixrun pathPublic contract
No public SDK, plugin manifest, config schema, CLI flag, or persisted data-model contract changes.
Validation
PNPM_CONFIG_VERIFY_DEPS_BEFORE_RUN=false node scripts/run-vitest.mjs run src/commands/doctor/shared/channel-plugin-blockers.test.ts src/flows/doctor-health-contributions.test.ts --reporter=verbose(87 tests across 2 shards)PNPM_CONFIG_VERIFY_DEPS_BEFORE_RUN=false pnpm exec oxfmt --check --threads=1 src/commands/doctor/shared/channel-plugin-blockers.ts src/commands/doctor/shared/channel-plugin-blockers.test.ts src/flows/doctor-health-contributions.ts src/flows/doctor-health-contributions.test.tsPNPM_CONFIG_VERIFY_DEPS_BEFORE_RUN=false node scripts/run-oxlint.mjs src/commands/doctor/shared/channel-plugin-blockers.ts src/commands/doctor/shared/channel-plugin-blockers.test.ts src/flows/doctor-health-contributions.ts src/flows/doctor-health-contributions.test.tsPNPM_CONFIG_VERIFY_DEPS_BEFORE_RUN=false pnpm tsgo:corePNPM_CONFIG_VERIFY_DEPS_BEFORE_RUN=false pnpm plugin-sdk:surface:checkPNPM_CONFIG_VERIFY_DEPS_BEFORE_RUN=false pnpm plugin-sdk:check-exportsgit diff --check origin/main...HEADReal behavior proof
Behavior or issue addressed:
Expose configured channel plugin activation blockers through explicit structured Doctor lint selection without changing broad
doctor --lintdefaults or moving startup-channel repair behavior out of the legacydoctor --fixrun path.Real environment tested:
Ubuntu 24.04 WSL root, source checkout at
b774fe2c659c0963826ecf53956acb93112d5bfb, isolated tempOPENCLAW_CONFIG_PATHandOPENCLAW_STATE_DIR, no live channel plugin process required for the quiet-path lint proof.Exact steps or command run after this patch:
OPENCLAW_CONFIG_PATH=<temp>/openclaw.json OPENCLAW_STATE_DIR=<temp>/state PNPM_CONFIG_VERIFY_DEPS_BEFORE_RUN=false pnpm openclaw doctor --lint --json --only core/doctor/channel-plugin-blockersOPENCLAW_CONFIG_PATH=<temp>/openclaw.json OPENCLAW_STATE_DIR=<temp>/state PNPM_CONFIG_VERIFY_DEPS_BEFORE_RUN=false pnpm openclaw doctor --lint --jsonEvidence after fix:
{ "onlyExit": 0, "onlyChecksRun": 1, "onlyChecksSkipped": 36, "onlyChannelPluginBlockerFindings": 0, "defaultExit": 1, "defaultChannelPluginBlockerFindings": 0 }Observed result after fix:
Explicit
--only core/doctor/channel-plugin-blockersruns the new structured check and exits cleanly against isolated quiet state. Broad default lint still emits nocore/doctor/channel-plugin-blockersfindings, preserving the default-disabled contract.What was not tested:
No packaged app or live external channel plugin process was exercised in this refresh; existing focused tests cover blocker detection, trust/allowlist behavior, manifest env triggers, structured mapping, and default-disabled lint selection.