fix(config): warn for missing official memory slot#82438
Conversation
|
Codex review: needs changes before merge. Summary Reproducibility: yes. Current-main source shows explicit missing Real behavior proof Next step before merge Security Review findings
Review detailsBest possible solution: Narrow the warning-only path to official external plugins that can own the memory slot, keep wrong slot IDs fatal, and then land the validator/docs fix through normal maintainer review. Do we have a high-confidence way to reproduce the issue? Yes. Current-main source shows explicit missing Is this the best way to solve the issue? No. The intended Full review comments:
Overall correctness: patch is incorrect Acceptance criteria:
What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 4b940f66fda0. |
8540b12 to
a9efe64
Compare
a9efe64 to
e073ea3
Compare
|
Fixed the blocked-memory-slot finding by keeping registry-blocked official external memory slots as hard validation failures while preserving warning-only behavior for genuinely missing uninstalled official memory plugins. Added regression coverage for blocked memory-lancedb diagnostics.\n\nValidation:\n- CI=1 node scripts/run-vitest.mjs src/config/config.plugin-validation.test.ts src/config/recovery-policy.test.ts src/gateway/server-startup-config.recovery.test.ts\n- pnpm exec oxfmt --check --threads=1 src/config/validation.ts src/config/config.plugin-validation.test.ts docs/plugins/memory-lancedb.md src/flows/doctor-health-contributions.test.ts\n- git diff --check\n- pnpm check:changed\n\n@clawsweeper re-review |
4270b77 to
447d511
Compare
447d511 to
1188470
Compare
|
Verification before merge: Behavior addressed: configs that explicitly select the official external memory-lancedb memory slot now validate with a warning instead of blocking Gateway startup. The selected-slot warning says Gateway will run without persistent memory until the plugin is installed, while stale entries/allowlist hints stay generic and non-memory official plugins in the memory slot remain fatal.
|
Co-authored-by: Copilot <[email protected]>
Preserve hard validation failures for official external memory slot plugins that are blocked by registry diagnostics, while keeping missing uninstalled official memory plugins warning-only. Co-authored-by: Copilot <[email protected]>
1188470 to
0a9af33
Compare
|
Rebased verification update: Behavior addressed: same as above, now rebased on latest origin/main.
|
|
Correction to the rebased verification note: rebased PR head is 0a9af33. |
Summary
memory-lancedbdocs to make the npm install step explicit before slot configuration.Fixes #82428.
Tests
CI=1 node scripts/run-vitest.mjs src/flows/doctor-health-contributions.test.ts src/config/config.plugin-validation.test.ts src/config/recovery-policy.test.ts src/gateway/server-startup-config.recovery.test.tspnpm exec oxfmt --check --threads=1 src/config/validation.ts src/config/config.plugin-validation.test.ts docs/plugins/memory-lancedb.md src/flows/doctor-health-contributions.test.tsgit diff --checkpnpm check:changedReal behavior proof
Behavior or issue addressed:
Configuring
plugins.slots.memory = "memory-lancedb"before installing@openclaw/memory-lancedbno longer makes config validation reject the config withplugins.slots.memory: plugin not found: memory-lancedb. It now reports the official external plugin install warning, while unknown missing memory slot IDs still hard-fail.Real environment tested:
Ubuntu 24.04 WSL source checkout at
/root/src/openclaw-branches/baseon branchfix-missing-memory-slot-82428, using a source-level harness that calls the realvalidateConfigObjectWithPlugins()validator with an empty plugin manifest registry to representmemory-lancedbnot installed. The before comparison used a detachedorigin/mainworktree with the same harness and shared local dependencies.Exact steps or command run after this patch:
validateConfigObjectWithPlugins({ agents: { list: [{ id: "pi" }] }, plugins: { slots: { memory: "memory-lancedb" } } }, { pluginMetadataSnapshot: { manifestRegistry: { plugins: [], diagnostics: [] } } })against a detachedorigin/mainworktree.validateConfigObjectWithPlugins()input against this branch.Evidence after fix:
Before (
origin/main) returned:{ "ok": false, "warnings": [], "issues": [ { "path": "plugins.slots.memory", "message": "plugin not found: memory-lancedb" } ] }After this patch returned:
{ "ok": true, "warnings": [ { "path": "plugins.slots.memory", "message": "plugin not installed: memory-lancedb — install the official external plugin with: openclaw plugins install @openclaw/memory-lancedb" } ], "issues": [] }Observed result after fix:
The missing official external memory slot no longer produces an invalid config result, so the gateway startup config validation path can proceed while surfacing the actionable install command. The existing unknown-slot regression coverage still proves
plugins.slots.memory = "missing-slot"fails withplugin not found: missing-slot.What was not tested:
No full Docker restart loop was launched. The proof uses the real config validator source path with a mocked empty plugin registry snapshot rather than starting a gateway container.