Repository navigation
fix(plugin-sdk): keep published pre-split plugin imports loading after upgrade - #124086
Conversation
…r upgrade Same bug class as #124041: published plugin artifacts import SDK names at module top level, so removing them from the barrel makes the installed plugin fail to load (voice-call/matrix doctor contracts silently never run their migrations; whatsapp and slack channels fail outright) after a core upgrade. Verified against the actual npm tarballs (2026.7.2-beta.7): - openclaw/plugin-sdk/runtime-doctor: voice-call + matrix doctor contracts import repair names (archiveLegacyStateSource, detect/repair state DB schema, plugin install-path repair, removePluginFromConfig, createPluginStateSyncKeyedStore) that moved to doctor-repair-runtime. - openclaw/plugin-sdk/channel-feedback: whatsapp imports shouldAckReactionForWhatsApp (owner policy moved in-plugin by #121257). - openclaw/plugin-sdk/channel-outbound: slack imports resolveChannelProgressDraftRender (render key retired by #122927). Adds deprecated load-only bridges with named removal windows, bumps the SDK surface budgets with comments, and locks behavior with unit tests plus a loader fixture that fails without the bridges.
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: found issues before merge. Reviewed August 15, 2026, 3:47 AM ET / 07:47 UTC. ClawSweeper reviewWhat this changesThe PR restores deprecated Plugin SDK exports so published voice-call, Matrix, WhatsApp, and Slack packages can load after an OpenClaw upgrade. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readinessKeep open: the compatibility bridges address a real upgrade break, but the proposed regression coverage misses the doctor-contract loader where the voice-call and Matrix failure occurs. Priority: P1 Review scores
Verification
How this fits togetherInstalled plugins resolve public Plugin SDK subpaths while their runtime and doctor-contract modules load. Those exports determine whether a plugin can register normally and whether its doctor migrations can be discovered. flowchart LR
A[Published plugin package] --> B[Plugin or doctor-contract loader]
B --> C[Plugin SDK subpath]
C --> D[Compatibility bridge]
D --> E[Current SDK owner]
E --> F[Plugin registration or doctor migration]
Decision needed
Why: The bridge intentionally reverses recent SDK-surface removals for existing installed packages, and its safe removal point depends on the supported-package policy rather than a code-only condition. Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource +79, Tests +171, Other +14. Total +264 across 8 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep narrowly named load-only exports until a recorded official-package reader sweep is clean, and protect the actual doctor-contract loader path with a regression fixture. Do we have a high-confidence way to reproduce the issue? No high-confidence live reproduction was run in this read-only review; source establishes the missing named exports and the dedicated doctor-contract loader boundary, but registry tarballs were not reachable from this environment. Is this the best way to solve the issue? Yes, preserving exact named exports is the source-compatible repair for installed packages, provided the doctor-contract registry path receives the missing regression coverage and the removal condition is made observable. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against f2c721b0acc8. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Merged via squash.
|
…r upgrade (openclaw#124086) * fix(plugin-sdk): keep published pre-split plugin imports loading after upgrade Same bug class as openclaw#124041: published plugin artifacts import SDK names at module top level, so removing them from the barrel makes the installed plugin fail to load (voice-call/matrix doctor contracts silently never run their migrations; whatsapp and slack channels fail outright) after a core upgrade. Verified against the actual npm tarballs (2026.7.2-beta.7): - openclaw/plugin-sdk/runtime-doctor: voice-call + matrix doctor contracts import repair names (archiveLegacyStateSource, detect/repair state DB schema, plugin install-path repair, removePluginFromConfig, createPluginStateSyncKeyedStore) that moved to doctor-repair-runtime. - openclaw/plugin-sdk/channel-feedback: whatsapp imports shouldAckReactionForWhatsApp (owner policy moved in-plugin by openclaw#121257). - openclaw/plugin-sdk/channel-outbound: slack imports resolveChannelProgressDraftRender (render key retired by openclaw#122927). Adds deprecated load-only bridges with named removal windows, bumps the SDK surface budgets with comments, and locks behavior with unit tests plus a loader fixture that fails without the bridges. * test(plugin-sdk): cover the repair bridge in the runtime-doctor facade surface lock
What Problem This Solves
Installed official plugins break after a core upgrade because published npm artifacts import SDK names at module top level that recent refactors removed from the barrels — the same bug class as #124041, verified against the actual published tarballs (
@openclaw/{voice-call,matrix,whatsapp,slack}@2026.7.2-beta.7):archiveLegacyStateSource,detectOpenClawStateDatabaseSchemaMigrations,repairOpenClawStateDatabaseSchema,detectPluginInstallPathIssue,formatPluginInstallPathIssue,removePluginFromConfig, andcreatePluginStateSyncKeyedStorefromopenclaw/plugin-sdk/runtime-doctor— those names moved todoctor-repair-runtime, so the contract module fails to load and the plugin's doctor migrations silently never run (worst bug class: no visible outcome, no recorded reason).shouldAckReactionForWhatsAppfromopenclaw/plugin-sdk/channel-feedback— owner policy moved in-plugin by refactor(channels): move owner policy into plugins #121257, so the installed channel fails to load outright.resolveChannelProgressDraftRenderfromopenclaw/plugin-sdk/channel-outbound— the render key was retired by refactor(config): retire dead streaming.progress.render key #122927, so the installed channel fails to load outright.Why This Change Was Made
Shipped external Plugin SDK API gets compat-first treatment per repo doctrine: deprecated load-only bridges with a named removal window ("once managed releases have replaced the old npm latest/extended-stable packages and their upgrade window has closed"), not silent breakage. Behavior is preserved verbatim from the pre-move owners (whatsapp gate semantics delegate to the shared
shouldAckReactiongate; slack render reads the retired key pre-doctor and defaults to"text"). Current source keeps importing the canonical modules directly — the bridges are load-only.User Impact
Operators upgrading core while running installed (non-bundled) voice-call, matrix, whatsapp, or slack plugins no longer hit plugin load failures or silently-skipped doctor migrations.
Evidence
npm pack @openclaw/<pkg>@2026.7.2-beta.7) and grepping their dist imports.src/plugins/loader.native-module-loader.test.ts) loads a plugin using the published import shapes across all three subpaths — fails without the bridges (verified via stash), passes with them.src/plugin-sdk/shipped-export-bridges.test.ts(whatsapp gate truth table, slack render default/passthrough/junk).src/plugins/contracts/plugin-sdk-subpaths.test.tsupdated: barrel now intentionally mentions the bridged names; owner-file omits assertions kept.scripts/plugin-sdk-surface-report.mts(precedent: fix(plugin-sdk): installed llama providers fail to load after upgrade #124041, refactor(config): retire dead streaming.progress.render key #122927);pnpm plugin-sdk:surface:checkgreen.pnpm tsgo,pnpm check:test-types, focused vitest (loader + bridges + contracts) all green; autoreview clean (0.97).Production LOC: +112 (all deprecated bridge surface with named removal window — shipped-contract capability, not growth in canonical paths); tests +138.