Skip to content

fix(doctor): ignore channel metadata during plugin repair - #120891

Merged
steipete merged 2 commits into
mainfrom
steipete/doctor-shared-helper-deduplication-092173
Aug 9, 2026
Merged

steipete merged 2 commits into
mainfrom
steipete/doctor-shared-helper-deduplication-092173

Conversation

@steipete

@steipete steipete commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where Doctor flows could treat channels.modelByChannel and blank channel keys as configured channel/plugin IDs. That could trigger incorrect plugin discovery, migration, warning, or repair behavior, while duplicated helper forks continued to drift across Doctor paths.

Why This Change Was Made

Centralizes channel-ID policy behind one options-based Doctor helper while preserving each caller's activation rules, reuses the canonical lexical path-containment predicate, collapses the three legacy web-tool migrations into one plan-driven owner, and shares runtime model-policy normalization. Obsolete duplicate implementations and tests are removed instead of retained as compatibility shims.

User Impact

Doctor and release-repair flows no longer mistake channel metadata for a plugin. Existing disabled-channel, environment-presence, migration, path-safety, and runtime-policy behavior remains covered, with substantially less duplicate production code.

Evidence

  • Full focused run: 16 files across 6 Vitest shards, 669 tests passed.
  • Channel metadata correction run: 10 files across 4 Vitest shards, 369 tests passed.
  • Final fixture run: 4 files across 4 Vitest shards, 204 tests passed.
  • Post-rebase focused run: 16 files across 6 Vitest shards, 669 tests passed.
  • SDK API contract: node --max-old-space-size=8192 --import tsx scripts/generate-plugin-sdk-api-baseline.ts --check passed with the baseline unchanged.
  • Core production typecheck passed in delegated check:changed proof. Core-test typecheck passed after three fixture typing corrections with node scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.core.test.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/core-test.tsbuildinfo.
  • The full check:changed run originally exposed the SDK-boundary and test-type issues; those findings were fixed, and the exact failed lanes then passed.
  • Formatting, git diff --check, dead-export scan, deprecated API checks, plugin boundary checks, and package patch checks passed.
  • Codex autoreview on the full content-removal bundle was clean with no accepted/actionable findings; patch correctness confidence was 0.96.
  • Production LOC: +608/-823 (net -215). Tests: +396/-457 (net -61). Overall: net -276.

AI-assisted: implementation and review used coding agents; the maintainer verified the diff and proof.

@openclaw-barnacle openclaw-barnacle Bot added commands Command implementations size: XL maintainer Maintainer-authored PR labels Aug 9, 2026
@steipete
steipete marked this pull request as ready for review August 9, 2026 04:46
@steipete

steipete commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

Land-ready proof for 2efff2a64ef27358b9da87e297f8e89272d3e243:

  • 669 focused tests plus 14 lint-fix tests passed.
  • Exact-head CI run 31296017892 is green.
  • SDK API baseline stayed unchanged; core/core-test types, lint, formatting, dead-export, deprecated API, plugin-boundary, package-patch, and diff gates passed.
  • Codex autoreview was clean at 0.99 and 0.96 correctness confidence, with no accepted/actionable findings.
  • Production LOC is net -215; the functional content-removal test bundle is net -61.

Only gap: no live operator run. That is unnecessary for this internal deterministic Doctor refactor; it changes no external API and has focused migration coverage plus exact-head CI.

@steipete
steipete merged commit 562129d into main Aug 9, 2026
120 checks passed
@steipete
steipete deleted the steipete/doctor-shared-helper-deduplication-092173 branch August 9, 2026 05:38
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 10, 2026
…20891)

* fix(doctor): ignore channel metadata during plugin repair

* test(doctor): avoid unsafe optional chain
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 size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant