Skip to content

Doctor: expose channel plugin blocker findings#97496

Merged
giodl73-repo merged 3 commits into
openclaw:mainfrom
giodl73-repo:doctor-startup-channel-lint-findings
Jul 1, 2026
Merged

Doctor: expose channel plugin blocker findings#97496
giodl73-repo merged 3 commits into
openclaw:mainfrom
giodl73-repo:doctor-startup-channel-lint-findings

Conversation

@giodl73-repo

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

Copy link
Copy Markdown
Contributor

Summary

  • expose configured channel plugin activation blockers as structured core/doctor/channel-plugin-blockers findings
  • keep the check default-disabled so broad doctor --lint behavior is unchanged unless operators use --all or explicit --only
  • leave startup channel maintenance repair behavior in the legacy doctor --fix run path

Public 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.ts
  • PNPM_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.ts
  • PNPM_CONFIG_VERIFY_DEPS_BEFORE_RUN=false pnpm tsgo:core
  • PNPM_CONFIG_VERIFY_DEPS_BEFORE_RUN=false pnpm plugin-sdk:surface:check
  • PNPM_CONFIG_VERIFY_DEPS_BEFORE_RUN=false pnpm plugin-sdk:check-exports
  • git diff --check origin/main...HEAD

Real behavior proof

Behavior or issue addressed:
Expose configured channel plugin activation blockers through explicit structured Doctor lint selection without changing broad doctor --lint defaults or moving startup-channel repair behavior out of the legacy doctor --fix run path.

Real environment tested:
Ubuntu 24.04 WSL root, source checkout at b774fe2c659c0963826ecf53956acb93112d5bfb, isolated temp OPENCLAW_CONFIG_PATH and OPENCLAW_STATE_DIR, no live channel plugin process required for the quiet-path lint proof.

Exact steps or command run after this patch:

  1. 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-blockers
  2. OPENCLAW_CONFIG_PATH=<temp>/openclaw.json OPENCLAW_STATE_DIR=<temp>/state PNPM_CONFIG_VERIFY_DEPS_BEFORE_RUN=false pnpm openclaw doctor --lint --json

Evidence after fix:

{
  "onlyExit": 0,
  "onlyChecksRun": 1,
  "onlyChecksSkipped": 36,
  "onlyChannelPluginBlockerFindings": 0,
  "defaultExit": 1,
  "defaultChannelPluginBlockerFindings": 0
}

Observed result after fix:
Explicit --only core/doctor/channel-plugin-blockers runs the new structured check and exits cleanly against isolated quiet state. Broad default lint still emits no core/doctor/channel-plugin-blockers findings, 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.

@openclaw-barnacle openclaw-barnacle Bot added commands Command implementations size: S labels Jun 28, 2026
@giodl73-repo

Copy link
Copy Markdown
Contributor Author

@clawsweeper review

@openclaw-barnacle openclaw-barnacle Bot added the maintainer Maintainer-authored PR label Jun 28, 2026
@clawsweeper

clawsweeper Bot commented Jun 28, 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 commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 1, 2026, 6:50 PM ET / 22:50 UTC.

Summary
The PR adds a default-disabled structured core/doctor/channel-plugin-blockers lint check that exposes existing configured-channel plugin activation blockers while preserving default lint and legacy startup-channel maintenance behavior.

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 resolveDoctorContributionHealthChecks and runDoctorLintChecks, and the PR body includes terminal CLI proof for explicit selection and unchanged default lint.

Review metrics: 1 noteworthy metric.

  • Doctor lint checks: 1 added, default-disabled. Maintainers should notice because explicit --only and --all runs can now report channel-plugin blockers.

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

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] Existing automation that intentionally runs openclaw doctor --lint --all can observe the new warning and a non-zero exit when configured channel plugin blockers exist, even though broad default lint remains unchanged.

Maintainer options:

  1. Accept opt-in lint expansion (recommended)
    Land as-is if maintainers agree that doctor --lint --all may grow with new default-disabled checks that warn on real configured channel blockers.
  2. Hold for rollout policy
    Pause if maintainers want a stricter rollout rule or warning downgrade for checks that can change existing --all automation exit status.

Next step before merge

  • [P2] The protected maintainer label and doctor --lint --all compatibility impact call for maintainer judgment rather than automated repair.

Security
Cleared: The diff only changes TypeScript Doctor diagnostics and tests; it adds no dependencies, workflows, package metadata, secrets handling, auth, or code-execution surface.

Review details

Best 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 resolveDoctorContributionHealthChecks and runDoctorLintChecks, and the PR body includes terminal CLI proof for explicit selection and unchanged default lint.

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 changes

Label justifications:

  • P3: This is a low-risk Doctor diagnostics improvement with focused scope and no evidence of an urgent runtime regression.
  • merge-risk: 🚨 compatibility: The new opt-in check can make existing doctor --lint --all automation report a warning and non-zero exit for configured channel plugin blockers.
  • 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 includes after-change terminal CLI proof that explicit --only core/doctor/channel-plugin-blockers runs and broad default lint stays quiet for this check.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes after-change terminal CLI proof that explicit --only core/doctor/channel-plugin-blockers runs and broad default lint stays quiet for this check.
Evidence reviewed

PR surface:

Source +34, Tests +72. Total +106 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 2 35 1 +34
Tests 2 73 1 +72
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 108 2 +106

What I checked:

  • Repository policy read: Read the full root AGENTS.md and applied its OpenClaw PR review, protected-label, Doctor, and compatibility guidance. (AGENTS.md:1, 55d31beeef00)
  • No matching maintainer notes: Checked maintainer notes; only Telegram notes were present, so no Doctor/commands-specific note applied to this review.
  • Current main behavior: On current main, doctor:startup-channel-maintenance has only the legacy run path and no structured channel-plugin-blocker health check. (src/flows/doctor-health-contributions.ts:1638, 55d31beeef00)
  • PR implementation: PR head registers core/doctor/channel-plugin-blockers as a default-disabled health check on the existing startup-channel-maintenance contribution and maps scanner hits to findings. (src/flows/doctor-health-contributions.ts:1641, d1ec48278da3)
  • Finding mapper: PR head converts a channel-plugin blocker hit into a warning HealthFinding with check id, message, path, target, requirement, and fix hint. (src/commands/doctor/shared/channel-plugin-blockers.ts:369, d1ec48278da3)
  • Lint selection contract: Current lint selection skips defaultEnabled: false checks unless explicit --only or --all selection includes them, matching the PR's default-off behavior. (src/flows/doctor-lint-flow.ts:38, 55d31beeef00)

Likely related people:

  • brokemac79: Authored the merged commit that introduced the configured channel plugin blocker scanner this PR exposes through structured lint. (role: original channel blocker diagnostics contributor; confidence: high; commits: 7190fc4de830; files: src/commands/doctor/shared/channel-plugin-blockers.ts, src/commands/doctor/shared/channel-plugin-blockers.test.ts)
  • giodl73-repo: Current-main history shows this account authored several adjacent default-disabled structured Doctor finding surfaces used as the pattern for this PR. (role: recent structured Doctor health contributor; confidence: high; commits: a1cddbdb5787, 4ac5cf863673, 816038e97a5d; files: src/flows/doctor-health-contributions.ts, src/flows/doctor-health-contributions.test.ts)
  • vincentkoc: Recent history on the channel blocker scanner and plugin activation policy makes this account relevant to the trust and allowlist behavior surfaced by the new check. (role: adjacent plugin activation policy contributor; confidence: medium; commits: f559b7591822, 1169dd703962, f911bbc35329; files: src/commands/doctor/shared/channel-plugin-blockers.ts, src/plugins/channel-plugin-ids.ts)
  • galiniliev: Live PR metadata shows this account is assigned and already posted a no-blocking-findings review on the affected Doctor lint surface. (role: assigned reviewer; confidence: medium; files: src/commands/doctor/shared/channel-plugin-blockers.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 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. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Jun 28, 2026
@galiniliev galiniliev self-assigned this Jun 29, 2026

@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 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.

@giodl73-repo
giodl73-repo force-pushed the doctor-startup-channel-lint-findings branch from 1b1ccc3 to b774fe2 Compare July 1, 2026 03:42
@giodl73-repo

Copy link
Copy Markdown
Contributor Author

@galiniliev thanks for the earlier review. Refreshed this after #97358 and #97366 landed and rebased onto current main at b774fe2c659c0963826ecf53956acb93112d5bfb.

What changed in the refresh:

  • resolved the contribution-test conflict by preserving the landed workspace-status, memory-search, and device-pairing coverage while adding the channel-plugin-blocker opt-in lint regression
  • refreshed the PR body with current validation and Real behavior proof
  • kept the surface unchanged: no public SDK/plugin/config/CLI/persisted data-model contract change, structured check remains default-disabled/read-only, and startup-channel repair stays in the legacy Doctor run path

Validation passed on the refreshed head: focused channel-plugin-blocker/contribution Vitest (87 tests), changed-file oxfmt, changed-file oxlint, pnpm tsgo:core, plugin SDK surface/export checks, git diff --check, and source CLI proof for explicit --only core/doctor/channel-plugin-blockers plus broad default lint staying quiet for this check.

@giodl73-repo

Copy link
Copy Markdown
Contributor Author

@clawsweeper review

@giodl73-repo
giodl73-repo marked this pull request as ready for review July 1, 2026 03:42
@clawsweeper

clawsweeper Bot commented Jul 1, 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 the merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. label Jul 1, 2026
@giodl73-repo

Copy link
Copy Markdown
Contributor Author

Maintainer note: I accept the ClawSweeper compatibility tradeoff here.

This check remains default-disabled, so default doctor --lint behavior is unchanged. It is acceptable that explicit doctor --lint --all and --only core/doctor/channel-plugin-blockers may now surface configured channel plugin blockers and return non-zero when real blocker state exists. That is the intended contract for opt-in/all lint coverage.

chenyangjun-xy pushed a commit to chenyangjun-xy/openclaw that referenced this pull request Jul 3, 2026
sheyanmin pushed a commit to sheyanmin/openclaw that referenced this pull request Jul 8, 2026
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. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S 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.

2 participants