Skip to content

feat(memory): harden dreaming and multilingual memory promotion - #60697

Merged
vincentkoc merged 10 commits into
openclaw:mainfrom
vincentkoc:review/memory-dreaming-followups
Apr 4, 2026
Merged

vincentkoc merged 10 commits into
openclaw:mainfrom
vincentkoc:review/memory-dreaming-followups

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Apr 4, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Follow up the new dreaming flow from feat(memory-core): add dreaming promotion with weighted recall thresholds #60569 with real operator support and stronger promotion quality.
  • Replace the old ASCII/English-biased symbolic heuristic with conceptual tagging that works better across labs, including Unicode-heavy European-language notes and protected CJK memory terms.
  • Make dreaming safer to run continuously by repairing stale recall artifacts before promotion, exposing repair paths in memory status --fix and doctor --fix, and hardening managed cron/config behavior.

What Changed

  • Added recall-store audit/repair support for stale promotion locks, invalid recall metadata, and QMD audit surfacing.
  • Wired memory recall repair into openclaw memory status --fix and top-level openclaw doctor --fix through the public memory-core runtime seam.
  • Renamed the weak symbolic scoring signal to conceptual and moved concept extraction into a dedicated vocabulary module.
  • Added multilingual concept extraction with Unicode-aware tokenization, European-language stopword coverage, protected CJK glossary terms, and script-coverage reporting in recall audit/status output.
  • Hardened dreaming config/runtime behavior with dreaming.cron alias support, numeric-string normalization, limit=0 no-op behavior, duplicate/failed managed-cron cleanup handling, and pre-promotion recall repair.

Why It Matters

  • Dreaming is only useful at scale if it keeps working without manual cleanup.
  • Memory ranking should not overfit English-heavy labs while under-serving multilingual ones.
  • The doctor/status seam turns this from an opaque experimental feature into something operators can inspect and fix.

Verification

  • pnpm exec oxlint extensions/memory-core/src/concept-vocabulary.ts extensions/memory-core/src/concept-vocabulary.test.ts extensions/memory-core/src/short-term-promotion.ts extensions/memory-core/src/short-term-promotion.test.ts extensions/memory-core/src/cli.runtime.ts
  • OPENCLAW_VITEST_MAX_WORKERS=1 pnpm test extensions/memory-core/src/concept-vocabulary.test.ts
  • OPENCLAW_VITEST_MAX_WORKERS=1 pnpm test extensions/memory-core/src/short-term-promotion.test.ts
  • OPENCLAW_VITEST_MAX_WORKERS=1 pnpm test extensions/memory-core/src/dreaming.test.ts
  • git diff --check

Known Gaps

  • I did not rerun extensions/memory-core/src/cli.test.ts or src/commands/doctor-memory-search.test.ts after the multilingual follow-up.

@vincentkoc vincentkoc self-assigned this Apr 4, 2026
@openclaw-barnacle openclaw-barnacle Bot added extensions: memory-core Extension: memory-core commands Command implementations size: XL maintainer Maintainer-authored PR labels Apr 4, 2026
@vincentkoc vincentkoc changed the title [codex] feat(memory): add recall audit and doctor repair flow feat(memory): add recall audit and doctor repair flow Apr 4, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review April 4, 2026 05:40

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7f8d961e49

ℹ️ 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".

@greptile-apps

greptile-apps Bot commented Apr 4, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR hardens the memory dreaming and short-term promotion pipeline with three main additions: (1) audit/repair support for stale promotion locks and invalid recall store entries, surfaced through openclaw memory status --fix and openclaw doctor --fix; (2) a dedicated concept-vocabulary module replacing the old ASCII-biased symbolic scoring signal with Unicode-aware tokenization, multilingual stop word coverage, and a protected CJK/European glossary; (3) dreaming config improvements including cron-alias support, numeric-string normalization, limit=0 no-op, and pre-promotion repair before each dreaming run.

Key observations:

  • All three bugs flagged in the previous review cycle have been resolved: the write-without-lock race in repairShortTermPromotionArtifacts is fixed (store operations now run inside withShortTermLock), the inverted fix-hint condition in cli.runtime.ts is corrected (!opts.fix), and the redundant JSON.parse call is eliminated.
  • The new repairShortTermPromotionArtifacts function correctly separates stale-lock removal (must happen outside the lock) from the store normalization (inside the lock).
  • The collectGlossaryMatches function uses substring matching, which means a text containing "backups" will match both the \"backup\" and \"backups\" glossary entries. With MAX_CONCEPT_TAGS=8 this is unlikely to cause slot exhaustion in practice, but worth keeping in mind if the glossary grows.
  • One minor code quality issue: \"했다\" (Korean past tense) appears twice in the CJK stop words list. No runtime impact since the list is folded into a Set, but a clean-up is warranted.
  • The author notes that cli.test.ts and doctor-memory-search.test.ts were not rerun after the multilingual follow-up; confirming those remain green before landing would close the known gap.

Confidence Score: 5/5

Safe to merge — all previously flagged P1 issues are resolved and the only remaining finding is a trivial duplicate stop word entry with no functional impact.

The three bugs from the prior review (missing lock in repair function, inverted fix-hint condition, double JSON.parse) are all addressed. The new concept-vocabulary module and dreaming hardening are well-structured, with good test coverage for the new behaviors. The single remaining P2 finding (duplicate Korean stop word) has zero runtime impact due to Set deduplication and does not block merge.

No files require special attention. The author should verify cli.test.ts and doctor-memory-search.test.ts still pass after the multilingual additions before pushing to main.

Prompt To Fix All With AI
This is a comment left during a code review.
Path: extensions/memory-core/src/concept-vocabulary.ts
Line: 205-206

Comment:
**Duplicate Korean stop word entry**

`"했다"` appears twice in the `cjk` stop words list (lines 205–206). Since `CONCEPT_STOP_WORDS` is constructed as a `Set`, there is no functional impact — the duplicate is silently deduplicated. But it signals a copy-paste slip worth cleaning up.

```suggestion
    "해",
    "했다",
```

How can I resolve this? If you propose a fix, please make it concise.

Greploops — Automatically fix all review issues by running /greploops in Claude Code. It iterates: fix, push, re-review, repeat until 5/5 confidence.
Use the Greptile plugin for Claude Code to query reviews, search comments, and manage custom context directly from your terminal.

Reviews (2): Last reviewed commit: "Merge branch 'main' into review/memory-d..." | Re-trigger Greptile

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 22f64ab40e

ℹ️ 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".

Comment thread extensions/memory-core/src/dreaming.ts Resolved
@vignesh07 vignesh07 self-assigned this Apr 4, 2026
@vincentkoc vincentkoc changed the title feat(memory): add recall audit and doctor repair flow [codex] feat(memory): harden dreaming and multilingual memory promotion Apr 4, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3ee6837807

ℹ️ 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".

Comment thread extensions/memory-core/src/dreaming.ts Resolved
@vincentkoc

Copy link
Copy Markdown
Member Author

@greptileai review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c3664396dd

ℹ️ 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".

@vincentkoc vincentkoc changed the title [codex] feat(memory): harden dreaming and multilingual memory promotion feat(memory): harden dreaming and multilingual memory promotion Apr 4, 2026
@vincentkoc
vincentkoc merged commit 0609bf8 into openclaw:main Apr 4, 2026
21 of 34 checks passed
KimGLee pushed a commit to KimGLee/openclaw that referenced this pull request Apr 4, 2026
…claw#60697)

* feat(memory): add recall audit and doctor repair flow

* refactor(memory): rename symbolic scoring and harden dreaming

* feat(memory): add multilingual concept vocabulary

* docs(changelog): note dreaming memory follow-up

* docs(changelog): shorten dreaming follow-up entry

* fix(memory): address review follow-ups

* chore(skills): tighten security triage trust model

* Update CHANGELOG.md
lovewanwan pushed a commit to lovewanwan/openclaw that referenced this pull request Apr 28, 2026
…claw#60697)

* feat(memory): add recall audit and doctor repair flow

* refactor(memory): rename symbolic scoring and harden dreaming

* feat(memory): add multilingual concept vocabulary

* docs(changelog): note dreaming memory follow-up

* docs(changelog): shorten dreaming follow-up entry

* fix(memory): address review follow-ups

* chore(skills): tighten security triage trust model

* Update CHANGELOG.md
ogt-redknie pushed a commit to ogt-redknie/OPENX that referenced this pull request May 2, 2026
…claw#60697)

* feat(memory): add recall audit and doctor repair flow

* refactor(memory): rename symbolic scoring and harden dreaming

* feat(memory): add multilingual concept vocabulary

* docs(changelog): note dreaming memory follow-up

* docs(changelog): shorten dreaming follow-up entry

* fix(memory): address review follow-ups

* chore(skills): tighten security triage trust model

* Update CHANGELOG.md
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 24, 2026
…claw#60697)

* feat(memory): add recall audit and doctor repair flow

* refactor(memory): rename symbolic scoring and harden dreaming

* feat(memory): add multilingual concept vocabulary

* docs(changelog): note dreaming memory follow-up

* docs(changelog): shorten dreaming follow-up entry

* fix(memory): address review follow-ups

* chore(skills): tighten security triage trust model

* Update CHANGELOG.md
Nachx639 pushed a commit to Nachx639/clawdbot that referenced this pull request Jun 17, 2026
…claw#60697)

* feat(memory): add recall audit and doctor repair flow

* refactor(memory): rename symbolic scoring and harden dreaming

* feat(memory): add multilingual concept vocabulary

* docs(changelog): note dreaming memory follow-up

* docs(changelog): shorten dreaming follow-up entry

* fix(memory): address review follow-ups

* chore(skills): tighten security triage trust model

* Update CHANGELOG.md
vixco pushed a commit to vixco/openclaw that referenced this pull request Aug 16, 2026
…claw#60697)

* feat(memory): add recall audit and doctor repair flow

* refactor(memory): rename symbolic scoring and harden dreaming

* feat(memory): add multilingual concept vocabulary

* docs(changelog): note dreaming memory follow-up

* docs(changelog): shorten dreaming follow-up entry

* fix(memory): address review follow-ups

* chore(skills): tighten security triage trust model

* Update CHANGELOG.md
globalcaos pushed a commit to globalcaos/tinkerclaw that referenced this pull request Sep 29, 2026
…claw#60697)

* feat(memory): add recall audit and doctor repair flow

* refactor(memory): rename symbolic scoring and harden dreaming

* feat(memory): add multilingual concept vocabulary

* docs(changelog): note dreaming memory follow-up

* docs(changelog): shorten dreaming follow-up entry

* fix(memory): address review follow-ups

* chore(skills): tighten security triage trust model

* Update CHANGELOG.md
lhfer pushed a commit to lhfer/openclaw that referenced this pull request Oct 11, 2026
…claw#60697)

* feat(memory): add recall audit and doctor repair flow

* refactor(memory): rename symbolic scoring and harden dreaming

* feat(memory): add multilingual concept vocabulary

* docs(changelog): note dreaming memory follow-up

* docs(changelog): shorten dreaming follow-up entry

* fix(memory): address review follow-ups

* chore(skills): tighten security triage trust model

* Update CHANGELOG.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands Command implementations extensions: memory-core Extension: memory-core maintainer Maintainer-authored PR size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants