docs(memory): align descriptors and docs with recursive memory/**/*.md#85899
docs(memory): align descriptors and docs with recursive memory/**/*.md#85899leafbird wants to merge 2 commits into
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 29, 2026, 7:24 AM ET / 11:24 UTC. Summary PR surface: Source 0, Docs 0, Generated 0. Total 0 across 10 files. Reproducibility: yes. Source inspection of current main shows recursive memory collection through Review metrics: 1 noteworthy metric.
Stored data model Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land a refreshed version of this wording-only change that preserves newer main docs/descriptors, keeps startup-context root-level wording, regenerates the config baseline, and reruns narrow docs/config checks. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection of current main shows recursive memory collection through Is this the best way to solve the issue? Yes after refresh. A wording-only docs/descriptor update is the narrowest maintainable fix because runtime indexing already recurses; the branch just needs conflict resolution and regenerated baseline proof. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against cfd8ba8fc81d. Label changesLabel justifications:
Evidence reviewedPR surface: Source 0, Docs 0, Generated 0. Total 0 across 10 files. View PR surface stats
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
Review history (1 earlier review cycle)
|
4d4e734 to
30f15f4
Compare
|
ClawSweeper PR egg ✨ Hatched: 💎 rare Brave Clawlet Hatch commandComment Hatchability rules:
Rarity: 💎 rare. What is this egg doing here?
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Command router queued. I will update this comment with the next step. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
/clownfish automerge |
|
Clownfish is on the reef for this PR. 🐠 I tagged A maintainer can call |
|
🦞✅ Source: Why human review is needed: What the maintainer can do as a next step: I added |
|
Thanks, ClawSweeper. Clownfish picked up the reef notes and is starting a guarded repair pass. 🐠 Source: I will update this PR branch when I can. If GitHub branch permissions block that swim lane, I will open a safe credited replacement instead and keep it narrow. |
|
Clownfish 🐠 reef automerge status Clownfish took another look: no safe branch change to make on this pass. Target: #85899 Worker actions:
Clownfish left the PR as-is: no push, no rebase, no replacement PR, no merge, and no fresh ClawSweeper pass. fish notes: model gpt-5.5, reasoning medium. |
Summary
memory/recursively viacollectMemoryFilesFromDir(packages/memory-host-sdk/src/host/internal.ts), so nested files likememory/YYYY-MM/YYYY-MM-DD.mdare indexed and searched. But several agent-facing descriptors and public docs still saidmemory/*.md, which can mislead agents into thinking the index is flat.memory/**/*.md. No runtime behavior change.Files touched
extensions/memory-core/index.ts— lazymemory_search/memory_getdescriptorsextensions/memory-core/src/tools.ts— concretememory_search/memory_getdescriptionsextensions/memory-core/src/prompt-section.ts— system-prompt recall guidancesrc/config/schema.help.ts—agents.defaults.memorySearchhelp textdocs/concepts/memory-builtin.md,memory.md,system-prompt.mddocs/gateway/config-agents.md,docs/reference/token-use.mddocs/.generated/config-baseline.sha256regenerated viapnpm config:docs:genNote
This supersedes #72748. That PR also carried QMD watcher changes that were independently resolved upstream by #81802 (
watch-settle.ts), so the surviving value was just this wording alignment. Splitting it out as a small, behavior-neutral PR for easier review.Real behavior proof
Behavior or issue addressed: Agent-facing descriptors and public docs said
memory/*.mdeven though the runtime already walksmemory/recursively and indexes nested files such asmemory/YYYY-MM/YYYY-MM-DD.md. This PR aligns the wording tomemory/**/*.mdso agents and readers see what is actually indexed. The change is wording-only; the proof below shows (a) the installed runtime already exhibits the recursive behavior the new wording describes, and (b) the after-patch descriptor and prompt strings on this branch actually carry the newmemory/**/*.mdwording when imported at runtime.Real environment tested: Installed OpenClaw
2026.5.20(npm global, currentlatestpublished build, ahead of theacf265dbase this PR branches from), against the live workspace~/.openclaw/workspace-mokuused by the gateway. Agentmain, local embedding provider, per-agent SQLite memory store at~/.openclaw/memory/main.sqlite. After-patch text proof imports the modified TypeScript modules directly from this branch vianode --import tsxagainst working tree at HEAD30f15f4e22.Exact steps or command run after this patch:
Step 1 — drop a nested dated memory file under
memory/2026-05/with a unique token:Step 2 — reindex the live agent's memory store:
Step 3 — search for the unique token to prove the nested path was indexed and is retrievable:
Step 4 — on the PR branch checkout (
30f15f4e22), import the modified descriptor/help modules at runtime viatsxand print the after-patch strings to prove the newmemory/**/*.mdwording is observable from a real runtime call site (not just the diff):After-fix evidence: Terminal output from the installed
openclaw 2026.5.20runtime on the live workspace, plus runtime-imported after-patch strings from this branch (absolute paths redacted to~):After-patch text observed from this branch (HEAD
30f15f4e22) by importing the modified modules at runtime:Observed result after fix: (a) The freshly written nested file
memory/2026-05/2026-05-24-recursive-proof.md(two levels deep undermemory/) was indexed byopenclaw memory indexand returned as the top match (score0.812) for the unique token. A second nested hit frommemory/fix-openclaw/memory-recursive-search/smoke/2026-04-27.md(three levels deep) confirms recursion is not limited to one level. (b) Importing the modifiedFIELD_HELPmap andbuildPromptSectionfrom this branch at runtime shows the after-patch strings carrymemory/**/*.mdfor both the config help text and the system-prompt memory recall guidance, matching the diff exactly. (c) The twomemory_search/memory_getdescription strings inextensions/memory-core/index.tsandextensions/memory-core/src/tools.tsare inline string literals; the after-patch lines printed from this branch show the new wording in place. No runtime code paths are modified, only the descriptor and doc strings plus the regenerateddocs/.generated/config-baseline.sha256.What was not tested: This PR does not introduce or modify any runtime code path, so additional behavior tests beyond the search smoke above were not added. The recursive walk itself (
collectMemoryFilesFromDir) is already covered by upstream tests underpackages/memory-host-sdk/.Test plan
pnpm config:docs:genregenerates baseline cleanly (no other drift)2026.5.20returns the new nested file at score0.812FIELD_HELP['agents.defaults.memorySearch'],buildPromptSection(...)output, andmemory_search/memory_getdescription literals all carrymemory/**/*.md