fix(memory): respect selected slot in dreaming config#62275
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 09d76e12cf
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| export function resolveMemoryDreamingPluginConfig( | ||
| cfg: OpenClawConfig | Record<string, unknown> | undefined, | ||
| ): Record<string, unknown> | undefined { |
There was a problem hiding this comment.
Re-export resolveMemoryCorePluginConfig for compatibility
This change removes the resolveMemoryCorePluginConfig export from the host dreaming module by renaming it to resolveMemoryDreamingPluginConfig, but existing callers still import the old symbol (for example via src/plugin-sdk/memory-core.ts and extension imports from openclaw/plugin-sdk/memory-core-host-status). That makes the commit break type-check/build (and can produce missing-export module load failures) for current consumers. Keep a backward-compatible export alias for the old function name before migrating all call sites.
Useful? React with 👍 / 👎.
Greptile SummaryThis PR correctly makes dreaming config and UI toggle slot-aware by reading
Confidence Score: 4/5Safe to merge after correcting the incorrect The slot-aware logic is correct and well-exercised by the new regression tests. A single wrong assertion in the smoke test ( src/gateway/server-methods/doctor.test.ts line 121
|
09d76e1 to
c13c73b
Compare
c13c73b to
f7fd52f
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f7fd52fe16
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| return DEFAULT_MEMORY_DREAMING_PLUGIN_ID; | ||
| } | ||
|
|
||
| export function resolveMemoryDreamingPluginConfig( |
There was a problem hiding this comment.
Re-export resolveMemoryCorePluginConfig alias
Renaming resolveMemoryCorePluginConfig to resolveMemoryDreamingPluginConfig here removes a previously exported symbol and breaks existing imports that still consume the old API (for example src/plugin-sdk/memory-core.ts re-exports resolveMemoryCorePluginConfig, and extension code imports it). That introduces a compile/runtime compatibility break for current plugin-sdk consumers; keep a backward-compatible alias export so downstream modules continue to load while call sites migrate.
Useful? React with 👍 / 👎.
f7fd52f to
84a54e8
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 84a54e8561
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| } | ||
|
|
||
| // Keep the legacy helper name exported until downstream memory plugins migrate. | ||
| export const resolveMemoryCorePluginConfig = resolveMemoryDreamingPluginConfig; |
There was a problem hiding this comment.
Preserve memory-core semantics on legacy config helper
resolveMemoryCorePluginConfig previously read only plugins.entries["memory-core"].config, but this alias now points to the slot-aware resolver, so the legacy name silently changes behavior based on plugins.slots.memory. Existing consumers that intentionally target memory-core (for example extensions/memory-wiki/src/bridge.ts when bridge.readMemoryCore is enabled) will now read whichever plugin is selected in the slot and can run memory-core-specific paths against the wrong plugin config. Keep the old export name bound to the memory-core entry and use the new slot-aware helper only where that behavior is intended.
Useful? React with 👍 / 👎.
f8d411d to
9e68ce1
Compare
|
Landed via temp rebase onto latest origin/main. Targeted gate run:
Land commit: 9e68ce1 Thanks @SnowSky1! |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9e68ce1260
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const { pluginId } = resolveConfiguredDreaming(asRecord(state.configSnapshot?.config) ?? null); | ||
| const ok = await writeDreamingPatch(state, { | ||
| plugins: { | ||
| entries: { | ||
| "memory-core": { | ||
| [pluginId]: { |
There was a problem hiding this comment.
Skip dreaming patch for unsupported memory slot plugins
updateDreamingEnabled now writes plugins.entries[slotPluginId].config.dreaming.enabled for whichever plugin owns plugins.slots.memory, but not all built-in memory plugins accept a dreaming block (for example extensions/memory-lancedb/openclaw.plugin.json has additionalProperties: false and requires an embedding object). In that valid configuration, toggling Dreams from Control UI sends an invalid patch and config.patch fails validation, so the toggle becomes a persistent runtime error for users on non-dreaming memory providers.
Useful? React with 👍 / 👎.
Summary
memory-coreplugins.slots.memorywhen presentRelated #62098