Repository navigation
refactor(memory): deduplicate promotion and CLI flows - #115706
Merged
Merged
Conversation
steipete
marked this pull request as ready for review
July 29, 2026 06:52
steipete
force-pushed
the
refactor/loc-memory-promotion-cli
branch
from
July 29, 2026 06:59
2af55e0 to
a4864e6
Compare
Contributor
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jul 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Problem This Solves
The recently expanded memory-core implementation repeated the same command setup and short-term store lifecycle across multiple CLI and promotion paths. That duplication made agent selection, secret diagnostics, manager cleanup, phase-signal pruning, and recall-store write ordering easier to drift independently.
Why This Change Was Made
This AI-assisted refactor adds one existing-module
withMemoryCommandseam for config/secret resolution, single-or-all-agent selection, manager lifecycle, and host leases; one phase-signal updater parameterized by the phase mutation; and one recall-store updater that preserves the existing post-write event ordering. The recall and grounded-candidate provenance calculations and their different event shapes remain separate and explicit.User Impact
No user-visible behavior changes. Memory CLI commands retain their output and diagnostic routing, and dreaming promotion signals retain the same lock, pruning, persistence, provenance, and event semantics.
Evidence
+512/-554(net-42); tests+0/-0. The current-main duplication was smaller than the older lane snapshot, so this does not claim the original-150..-190estimate.OPENCLAW_HEAVY_CHECK_LOCK_SCOPE=worktree node scripts/run-vitest.mjs extensions/memory-core/src/cli.test.ts— 75 tests passed.OPENCLAW_HEAVY_CHECK_LOCK_SCOPE=worktree node scripts/run-vitest.mjs extensions/memory-core/src/short-term-promotion.test.ts extensions/memory-core/src/short-term-promotion-metadata.test.ts— 86 tests passed.node scripts/check-changed.mjs -- <six changed files>— passed on Blacksmith Testbox (run 30429174678), including format, Knip, extension prod/test typecheck, lint, database-first storage, and import cycles.extensions/memory-corerun passed 1,228/1,234 tests. Four REM CLI failures exposed a missingagentIddestructure and were fixed; the remaining untouched manager blank-query failure and legacy-cleanup timeout reproduced together in isolation and are outside this diff..agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main --engine codex --model gpt-5.6-sol --thinking high— clean, no accepted/actionable findings.extensions/memory-core/src/cli-runtime-common.ts:148; phase mutation is atextensions/memory-core/src/short-term-promotion-stats.ts:230; recall store ordering is atextensions/memory-core/src/short-term-promotion-record.ts:136.