feat(memory): add multi-slot memory role architecture#86210
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed May 30, 2026, 7:48 PM ET / 23:48 UTC. Summary Reproducibility: not applicable. this is a feature/config architecture PR rather than a bug report. Current main source shows only the legacy memory/contextEngine slot contract, while the PR proposes the new role-slot behavior. Review metrics: 2 noteworthy metrics.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Land a narrower rebased branch only after maintainers accept the memory role-slot config/API contract, dependency graph changes are removed or security-authorized, and exact-head upgrade/session proof passes. Do we have a high-confidence way to reproduce the issue? Not applicable: this is a feature/config architecture PR rather than a bug report. Current main source shows only the legacy memory/contextEngine slot contract, while the PR proposes the new role-slot behavior. Is this the best way to solve the issue? Unclear: role slots are a plausible maintainable solution to the linked memory-composition request, but the current branch bundles blocked dependency graph changes and needs maintainer API/security signoff before it is the best landing shape. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against 6270d5326f9f. Label changesLabel changes:
Label justifications:
Evidence reviewedSecurity concerns:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
ClawSweeper PR egg: 🔥 warming; proof passed, review follow-up or readiness checks remain. Hatch with Rules and detailsHatchability:
About:
|
Dependency GuardThis PR changes dependency-related files. Maintainers should confirm these changes are intentional. Changed files:
Maintainer follow-up:
|
Dependency graph changes are blockedOpenClaw does not accept dependency graph changes through PRs unless security explicitly authorizes the current head SHA. Dependency updates are generated internally by maintainers so external PRs cannot change the resolved graph. Detected dependency graph changes:
Auto-scrub was not attempted because this PR changes package manifest dependency graph fields:
Dependency graph changes must be reviewed by security or handled by maintainers internally. Please remove lockfile changes manually if they are not needed. To remove lockfile changes, restore them from the target branch: git fetch origin
git checkout 'origin/main' -- 'extensions/feishu/npm-shrinkwrap.json' 'npm-shrinkwrap.json' 'pnpm-lock.yaml'
git commit -m 'chore: remove dependency lockfile change'
git pushIf this PR intentionally needs a dependency graph change, ask a member of The action will approve the current head SHA ( |
Closing this stale release-base PR. The branch is being kept in the fork for local release-line testing, and any upstream work will be reopened later as a fresh, clean PR.New PR: #88504 |
Summary
This PR adds a purpose-specific memory role-slot contract so memory plugins can compose instead of replacing each other through one global
plugins.slots.memoryselector.What changes:
memory.recall,memory.compaction,memory.capture,memory.dreaming, andmemory.userModel.plugins.slots.memoryas a backward-compatible recall shorthand during an extended migration window.agents.list[*].plugins.slots, limited to memory roles plus legacymemory.plugins.slots.contextEnginepath for LosslessClaw and other context-engine plugins.agents.list[*].plugins.slots.contextEngineoverrides, because agent-scoped context-engine semantics are out of scope for this PR.Why this matters:
Intended outcome:
memory-corecan remain the factual recall owner while other plugins own capture, compaction, dreaming, or user-model roles.plugins.slots.memorycontinue to work.openclaw doctor --fixcopies non-conflicting legacyplugins.slots.memoryvalues intoplugins.slots["memory.recall"]but keeps the legacy key in place for plugin compatibility.Out of scope:
plugins.slots.contextEngine; LosslessClaw and other context engines continue to use the existing globalcontextEngineslot.contextEnginesemantics.plugins.slots.<slot>.owner#70823.Linked context
Closes #60572.
Directly related memory-composition requests and prior proposals:
Dreaming and memory-role separation context:
memory-corememory plugins. This PR adds thememory.dreamingslot contract but does not implement that full protocol.Runtime/diagnostic slot handling context:
plugins.slots.*references could leave config unrecoverable until doctor cleanup was broadened.Context-engine compatibility context:
legacycontext engine not registered in CLI compaction lifecycle worker — dreaming diary subagent fails silently (follow-up to #76576) #81843: context-engine registration and LosslessClaw-adjacent failures shaped the compatibility review for preserving the existing globalplugins.slots.contextEnginebehavior while rejecting unsupported per-agentcontextEngineconfig.Future API/RFC context:
plugins.slots.<slot>.owner#70823: future machine-readable slot ownership/provenance. This PR intentionally keeps scalar plugin IDs and solves the memory role composition layer first.Real behavior proof
23a29722524c982f9ed410610395e1db0363857e, covering the multi-slot memory role contract, the latest recall-default cleanup, Hermes migration regression coverage forplugins.slots["memory.recall"], legacyplugins.slots.memorydoctor compatibility, per-agent memory role routing coverage, context-engine slot compatibility, and exact-head CI signal.[REDACTED], checkout[REDACTED], Nodev22.22.2, pnpm11.2.2, OpenClaw2026.5.28 (23a2972), artifact[REDACTED]/proof-refresh-23a2972252-20260528T172630Z.kklouzal:feat/multi-slot-memory-architecture, detached the proof checkout to23a29722524c982f9ed410610395e1db0363857e, then rancorepack pnpm install --frozen-lockfile,corepack pnpm build:strict-smoke, focused memory/config/Hermes regression suites, agentic shard, plugin memory tests, command/config memory tests, extension memory tests,corepack pnpm tsgo:prod,git diff --check origin/main...HEAD, a legacy-memorydoctor --fixupgrade harness, aplugins.slots.contextEngine = "lossless-claw"config-compatibility harness,openclaw models status --probe --json, GitHub Copilot live-auth probes, and Honcho availability probes.extensions/migrate-hermes/provider.test.tsincluded in the 10-file focused suite. The upgrade harness confirmsdoctor --fixcopiesplugins.slots.memory = "memory-core"intoplugins.slots["memory.recall"] = "memory-core"while retaining the legacy key for third-party compatibility. The role-slot deterministic gates, agentic shard, type gate, and diff check all passed at the current pushed head.github-copilot/gpt-5.4-minidirect inference failed withNo API key found for provider "github-copilot"; the live-model harness reportedno API keys found; skipping;lossless-clawconfig validation passed but the plugin was not installed in the derived registry; local Honcho health did not respond. The stalebb771dlive output has therefore been removed rather than reused.github-copilot, Honcho, or LosslessClaw auth/runtime state. This PR-body refresh is exact-head proof for the config/default/migration changes and accurately records the unavailable live lanes.Implementation notes
src/plugins/slot-resolution.tsas the shared role-slot helper layer for canonical memory role keys, defaults, normalization, effective per-agent resolution, and configured selection collection.PluginSlotsConfig.contextEnginefor global plugin slots, and adds an agent-slot type/schema that omitscontextEngine.doctor --fixcanonicalizes tomemory.recallwhile retaining legacymemoryduring the compatibility window.memory-corefallback with a user-selected plugin under restrictive allowlists.memory.recallowner.memory.compactionoverrides in both normal session runs and manual/queued compaction paths.Compatibility and risk
Backward compatibility preserved:
plugins.slots.memoryconfigs continue to resolve as recall selection.doctor --fixnow keeps the legacyplugins.slots.memorykey in place after copying tomemory.recall, so third-party plugins that still read only the legacy key do not hit an immediate flag day.memory-coreunless explicitly disabled or overridden.plugins.enabled = false, denylist behavior, and explicitplugins.entries.<id>.enabled = falseremain respected.plugins.slots.contextEngineremains separate from memory roles and continues to select context engines such as LosslessClaw.Compatibility changes reviewers should inspect:
memory.recall,memory.compaction,memory.capture,memory.dreaming, andmemory.userModelbecome durable public config keys after merge.agents.list[*].plugins.slots.contextEngineis intentionally rejected until a future PR defines and implements agent-scoped context-engine semantics.plugins.slots.memoryis still deprecated as a canonical authoring target even though it remains supported and retained for compatibility.Primary risks:
memory.recall, but the retained legacy key avoids forcing that ecosystem update immediately.Verification
Current pushed head:
23a29722524c982f9ed410610395e1db0363857e(fix(memory): polish recall slot defaults)Exact-head proof-host artifact:
[REDACTED]/proof-refresh-23a2972252-20260528T172630Z[REDACTED], Nodev22.22.2, pnpm11.2.2, OpenClaw2026.5.28 (23a2972).command-summary.json:deterministicOk=true,deterministicFailures=[].Exact-head local proof gates:
corepack pnpm install --frozen-lockfile: passed.corepack pnpm build:strict-smoke: passed.corepack pnpm tsgo:prod: passed.git diff --check origin/main...HEAD: passed.doctor --fixcopiedmemorytomemory.recalland retained the legacy key as designed.plugins.slots.contextEngine = "lossless-claw"; installed runtime execution was unavailable because the plugin was not installed on the proof host.node openclaw.mjs models status --probe --json: completed and documented the host's current missing live auth state.Current GitHub Actions signal for pushed head
23a29722524c982f9ed410610395e1db0363857eat body refresh time:Real behavior proof: passed.check-lint: passed.check-prod-types: passed.check-docs: passed.Security High (network-ssrf-boundary): passed.Security High (core-auth-secrets): passed.gh pr checksare green exceptCritical Quality (core-auth-secrets), which GitHub reports as failed/cancelled after 25m5s with no failed-step log or assertion output ingh run view.Live proof limitation:
bb771d08911d361241d402bf684ca41645623f02. Those excerpts are no longer claimed as current-head proof.github-copilotauth was missing for the main agent, the GitHub Copilot live harness skipped due to no API keys,lossless-clawwas not installed in the plugin registry, and local Honcho health did not respond.