Repository navigation
fix(plugin-sdk): installed llama providers fail to load after upgrade - #124041
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 15, 2026, 1:54 AM ET / 05:54 UTC. ClawSweeper reviewWhat this changesAdds a load-only SDK compatibility bridge for pre-managed llama.cpp provider packages and regression coverage for loading that legacy import through the installed-plugin loader. Regression provenancePossible regression — probable (reproduction; reviewed change). No predecessor PR is attributed. Merge readinessKeep open. The PR restores a removed named SDK export required for legacy installed provider evaluation, while preserving the managed llama-server runtime and giving an explicit repair path; no blocking patch defect was found. Priority: P2 Review scores
Verification
How this fits togetherInstalled provider packages import OpenClaw Plugin SDK subpaths before the plugin loader can register them. The change restores evaluation compatibility at that boundary, then directs any retired embedding invocation to the managed-provider repair path. flowchart LR
A[Installed legacy provider] --> B[Plugin loader]
B --> C[Plugin SDK subpath]
C --> D[Load-only compatibility bridge]
D --> E[Explicit update repair guidance]
B --> F[Managed llama-server provider]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +14, Tests +83. Total +97 across 4 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land the narrowly rejecting bridge, retain the managed llama-server path as the sole runtime, and remove the bridge only after the published upgrade window is demonstrably closed. Do we have a high-confidence way to reproduce the issue? Yes—source proves that current main lacks the named export while the added ESM fixture reproduces the installed-package import shape through the real loader boundary. Is this the best way to solve the issue? Yes. Restoring only the missing evaluation-time symbol at the existing SDK subpath is narrower than reviving the deleted native runtime or adding a second provider path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against f24bd8a2a299. 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
|
|
Land-ready evidence for
ClawSweeper rank-up/merge-risk disposition: exact-head checks are complete. I accept the recommended bounded compatibility window; the bridge is deprecated, always rejects instead of restoring node-llama-cpp, and its code comment requires managed Production LOC: +14/-0; tests: +83/-0. Proof gap: no live fleet deployment was run, by design; the deterministic installed-package/loader boundary was exercised with exact registry artifacts in isolation. |
|
Merged via squash.
|
…r upgrade (#124086) * fix(plugin-sdk): keep published pre-split plugin imports loading after 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. * test(plugin-sdk): cover the repair bridge in the runtime-doctor facade surface lock
…openclaw#124041) * fix(plugin-sdk): let installed llama providers load after upgrade * test(tooling): include new memory race importer
…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
Related: #123105
AI-assisted: Codex investigated, implemented, and validated this change under maintainer direction. No agent transcript is attached.
What Problem This Solves
Fixes an issue where users upgrading OpenClaw across the managed llama-server cutover could have a previously installed @openclaw/llama-cpp-provider abort during ESM evaluation. The released provider imports createLocalEmbeddingProvider from the public plugin SDK, but that named export was removed before installed packages had converged, so plugin loading failed before registration or supported update repair could run.
Why This Change Was Made
This restores only a deprecated, load-only binding at the existing public SDK subpath. It always rejects with retirement and
openclaw update repairguidance; it does not restore DEFAULT_LOCAL_MODEL, node-llama-cpp, its worker, or any in-process native runtime. The current provider remains exclusively backed by the separately managed llama-server CLI.The regression coverage loads the exact released named-import shape through the real plugin loader/SDK alias boundary. An adjacent provider test proves invoking the bridge fails closed without model or server activity, while the existing current-provider tests continue to cover managed llama-server behavior.
The first exact-head CI run also exposed a current-main tooling regression from #124024: its new memory race test was missing from the test-project importer expectation. This PR includes the one-line expectation repair required to restore green main CI.
User Impact
An older installed llama.cpp provider can evaluate and register far enough for the supported update-repair flow to replace it. Until replacement, any attempt to invoke the retired in-process embedding path fails explicitly with the recovery command. After the managed provider is installed, repeated clean starts continue through llama-server without using this bridge.
Evidence
SyntaxError: ... does not provide an export named 'createLocalEmbeddingProvider'; current managed 2026.8.1-beta.2 loaded.node scripts/run-vitest.mjs extensions/llama-cpp/index.test.ts src/plugins/loader.native-module-loader.test.ts— 2 files, 9 tests passed.tbx_01m01w78ct6kcf7z6vepa1gqsz:check:changedpassed SDK export/surface checks, typechecks, type-aware lint, plugin boundaries, dead-code, schema, sidecar, and import-cycle guards (exit 0, 15m41s). Local/Testbox SHA-256 values matched for all changed files and the newly changed lint-control files.pnpm buildpassed on the retained Testbox, including all 145 public plugin SDK subpaths.node scripts/run-vitest.mjs src/scripts/test-projects.test.ts— 84 tests passed after adding the missing fix(memory): retain transcript updates during active sync #124024 importer expectation.