Skip to content

feat(memory): let workspaces exclude generated files from search - #188294

Open
serg0x wants to merge 58 commits into
openclaw:mainfrom
serg0x:memory-search-exclude-paths
Open

serg0x wants to merge 58 commits into
openclaw:mainfrom
serg0x:memory-search-exclude-paths

Conversation

@serg0x

@serg0x serg0x commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Related: #101422

Supersedes #177868 by @CheekyHobson (closed for inactivity on 2026-11-18): their reviewed head a2008ab09, ported onto current main with co-author credit on the commit, plus the proof ClawSweeper asked for.

What Problem This Solves

Generated dreaming reports under memory/dreaming/ are indexed like curated notes and crowd them out of memory search, and there is no setting to exclude paths inside the default memory folders.

User Impact

User impact: operators can set memory.search.excludePaths (globally or per agent), for example ["memory/dreaming/**"], to keep matching workspace files out of memory search and file watching.

  • Unset or empty changes nothing. The index scope hash is identical to the one 2026.11.6 writes, so this setting adds no rebuild on upgrade.
  • Setting or changing the list is a scope change, like changing extraPaths: openclaw memory status reports it, vector search pauses, and openclaw memory index rebuilds and drops the excluded rows.
  • Search only: excluded files are not deleted, memory_get can still read them, memory forget still scrubs them, and short-term recall/promotion eligibility is unchanged.
  • Patterns are workspace-relative globs. A leading ./ or / and a trailing / are accepted (memory/dreaming/ is the same as memory/dreaming/**), and per-agent lists add to the global list.

Why This Change Was Made

One workspace-relative glob check, using the same minimatch options as the extraPaths matcher beside it in the memory host SDK (so patterns behave the same on Node and Bun), is applied where search scope is decided: file discovery (local and remote workspace providers), watcher eligibility, and the index scope hash. Shared watchers include the exclusions in their selection keys, so agents with different exclusions on one workspace rebaseline when one joins or leaves (the P2 ClawSweeper found on #177868).

Portable glob matching (ClawSweeper's 2026-11-09 review on 05585b7): the exclusion matcher called path.posix.matchesGlob, which Bun implements with Bun.Glob: extglobs never match and wildcards match dotfiles, so ["memory/dreaming/**/!(*.keep).md"] excluded a report on Node but not on Bun. Main's #194912 had just moved the extraPaths matcher to minimatch for the same reason. 1463f6e moves those minimatch options into one shared constant and uses it for excludePaths too, with compiled matchers cached per configured list. Results on Node are unchanged; on Bun they now match Node.

Pattern spellings (2b7dc7f): gitignore-style spellings such as memory/dreaming/, ./memory/dreaming/** or /memory/dreaming/** excluded nothing. resolveMemorySearchIndexConfig, which every reader (scan, watcher, scope hash, remote file worker) gets its settings from, now normalizes each entry once: trim, drop empty entries, use / separators, strip one leading ./ or /, turn a trailing / into /**, and dedupe in order. The matcher is unchanged. The docs and help example drop memory/.dreams/**: that folder only holds .txt and .json dreaming state, which memory search never indexes.

Changes compared with #177868 at a2008ab09:

  • Rebased onto main: the scope hash goes through the single resolveConfiguredMemoryScopeHash() owner, and the matcher is exported from plugin-sdk/memory-core-host-engine-fs, the subpath perf(memory): narrow workspace file worker imports #181891 narrowed the file worker to, instead of engine-storage. Both are private local-only subpaths, so this adds no third-party SDK contract.
  • The matcher lives in packages/memory-host-sdk/src/host/internal.ts beside matchesExtraMemoryPathEntry instead of core src/memory/root-memory-files.ts.
  • Added the config field label, corrected the docs about the rebuild step, and linked the setting from the dreaming docs.
  • Tests: replaced the 13 s CLI e2e case with a manager test of about 4 s that mirrors two unforced openclaw memory index runs (the real CLI run is below). Dropped a test that indexed an excluded file through a private method, a selectionKeys shape test covered by the join/leave behavior test, a worker integration test that still passed with the P2 fix reverted, and (after ClawSweeper's review) a test that only checked the worker request shape.

Size against main a2f7aa9: production +102/-21 in 15 files (including moving main's glob options into the shared constant); tests +159/-3; docs +18/-4; generated baselines +3/-3. (#177868 was +439/-18 in 33 files.)

Maintainer decision needed

#101422 asks for both search exclusion and recall/promotion eligibility control. This PR is the narrow first stage: search discovery, watching, and index scope only, with defaults and promotion safeguards unchanged. ClawSweeper's review of #177868 recommended approving that narrow search stage and leaving recall inclusion and diagnostics to follow-up work; the alternative is one combined search+recall include/exclude design. An operator on #101422 said the search-only step covers their need.

Config surface: pnpm config:docs:gen raises the core count by 4 (2668 -> 2672 on main a2f7aa9) for memory.search.excludePaths and agents.entries.*.memory.search.excludePaths, each with its .* item path. That is the new setting itself.

Evidence

Real runs on 78d4f9f (on main 431392a), starting from the latest stable release, [email protected] from npm (installed with --ignore-scripts; the CLI runs without the package's install scripts). The current head fa31efc adds only a merge of main a2f7aa9. Earlier runs from 2026.11.5 on 59298b8, from 2026.11.4 on ddb2348, from 2026.11.3 on c210875, from 2026.11.2 on 1463f6e and on 05585b7 (before the portable-matcher change), from 2026.11.1 on 6d9ace7 and from 2026.10.10 on b607675 showed the same behavior. Synthetic workspace: 3 curated files (MEMORY.md, memory/backups.md, memory/garden.md) and 7 generated reports (5 light, 2 REM, one REM report containing only "No strong patterns surfaced."). Isolated OPENCLAW_HOME under env -i, Node 26.12.1, and a local OpenAI-compatible embeddings stub on 127.0.0.1 (deterministic vectors, no provider calls).

Upgrade from 2026.11.6 and existing data: 2026.11.6 builds the index (10 files, 10 chunks). After this branch's doctor --fix (main's agent-database migrations since 2026.11.6, v38 -> v43), the existing index loads clean (Dirty: no) and returns the same results and scores as 2026.11.6, before any re-index. With excludePaths unset, memory index keeps the stored scope hash, the chunking version and every stored chunk row (same count and same fingerprint over id, path, hash). This PR adds no database schema or stored fields; the scope hash changes only when excludePaths is set. The branch build prints main's version string, 2026.11.5, because 2026.11.6 shipped from a release branch.

Opting in: setting excludePaths marks the index dirty with a scope change and pauses vector search until a rebuild, both shown in memory status. memory index then drops the 7 reports and keeps the 3 curated files; the curated note ranks first, and an edit refreshes it.

Terminal output (paths redacted to $OPENCLAW_HOME)
$ openclaw --version   # npm [email protected]
OpenClaw 2026.11.6 (06afb10)
$ openclaw memory index --agent main
Memory index updated (main): 10 files indexed.
$ openclaw memory search "when does the nightly backup run" --agent main
0.449 memory/backups.md:1-5
0.223 memory/dreaming/light/2026-10-28.md:1-5
0.218 memory/dreaming/light/2026-10-27.md:1-5
0.213 memory/dreaming/light/2026-10-26.md:1-5
0.208 memory/dreaming/light/2026-10-25.md:1-5
0.204 memory/dreaming/light/2026-10-24.md:1-5
# stored index identity (2026.11.6):
{"scopeHash":"e861c1d291b583b9f4bf96233b72b9e6984cc92320671a0805e1063946e4b1a1","chunkingVersion":6}
# stored rows (2026.11.6):
{"chunks":10,"chunkIdsSha256":"e538aca49c37a70e"}
$ openclaw --version   # this branch
OpenClaw 2026.11.5 (78d4f9f)
$ openclaw doctor --fix --non-interactive   # main's state migrations since 2026.11.6
Upgraded agent database schema in $OPENCLAW_HOME/.openclaw/agents/main/agent/openclaw-agent.sqlite: v38 -> v43
$ openclaw memory status --agent main
Indexed: 10/10 files · 10 chunks
Dirty: no
$ openclaw memory search "when does the nightly backup run" --agent main   # existing 2026.11.6 index, before any re-index
0.449 memory/backups.md:1-5
0.223 memory/dreaming/light/2026-10-28.md:1-5
0.218 memory/dreaming/light/2026-10-27.md:1-5
0.213 memory/dreaming/light/2026-10-26.md:1-5
0.208 memory/dreaming/light/2026-10-25.md:1-5
0.204 memory/dreaming/light/2026-10-24.md:1-5
$ openclaw memory index --agent main
Memory index updated (main): 10 files indexed.
# stored index identity (this branch, no excludePaths):
{"scopeHash":"e861c1d291b583b9f4bf96233b72b9e6984cc92320671a0805e1063946e4b1a1","chunkingVersion":6}
# stored rows (this branch, no excludePaths):
{"chunks":10,"chunkIdsSha256":"e538aca49c37a70e"}
$ openclaw config set memory.search.excludePaths '["memory/dreaming/**"]' --strict-json
Updated memory.search.excludePaths. Restart the gateway to apply.
$ openclaw memory status --agent main
Indexed: 10/3 files · 10 chunks
Dirty: yes
Index identity: index scope changed (owner: configuration, code: scope)
Vector search: paused until memory is rebuilt
$ openclaw memory index --agent main
Memory index updated (main): 3 files indexed.
$ openclaw memory status --agent main
Indexed: 3/3 files · 3 chunks
Dirty: no
# indexed rows by path:
{"path":"MEMORY.md","chunks":1}
{"path":"memory/backups.md","chunks":1}
{"path":"memory/garden.md","chunks":1}
$ openclaw memory search "when does the nightly backup run" --agent main
0.422 memory/backups.md:1-5
The nightly backup runs at 02:30 and copies the photo archive to the NAS.
# edit memory/backups.md: 02:30 -> 03:15
$ openclaw memory index --agent main
Memory index updated (main): 3 files indexed.
$ openclaw memory search "when does the nightly backup run" --agent main
0.422 memory/backups.md:1-5
The nightly backup runs at 03:15 and copies the photo archive to the NAS.

Pattern spelling on 2b7dc7f: the same synthetic workspace with a trailing-slash pattern, ["memory/dreaming/"], which matched nothing before 2b7dc7f.

Terminal output
$ openclaw --version
OpenClaw 2026.11.3 (2b7dc7f)
$ openclaw memory index --agent main
Memory index updated (main): 10 files indexed.
$ openclaw memory search "when does the nightly backup run" --agent main
0.449 memory/backups.md:1-5
0.249 memory/dreaming/light/2026-10-28.md:1-5
0.243 memory/dreaming/light/2026-10-27.md:1-5
0.238 memory/dreaming/light/2026-10-26.md:1-5
0.232 memory/dreaming/light/2026-10-25.md:1-5
0.227 memory/dreaming/light/2026-10-24.md:1-5
$ openclaw config set memory.search.excludePaths '["memory/dreaming/"]' --strict-json
Updated memory.search.excludePaths. Restart the gateway to apply.
$ openclaw config get memory.search.excludePaths
[
  "memory/dreaming/"
]
$ openclaw memory status --agent main
Indexed: 10/3 files · 10 chunks
Dirty: yes
Index identity: index scope changed (owner: configuration, code: scope)
Vector search: paused until memory is rebuilt
$ openclaw memory index --agent main
Memory index updated (main): 3 files indexed.
$ openclaw memory status --agent main
Indexed: 3/3 files · 3 chunks
Dirty: no
$ openclaw memory search "when does the nightly backup run" --agent main
0.422 memory/backups.md:1-5
The nightly backup runs at 02:30 and copies the photo archive to the NAS.

Gateway watcher: a throwaway loopback Gateway with excludePaths set. One agent turn opens the Gateway's default memory manager and its watcher: a local chat-completions stub calls memory_search once, through dispatch_action, because current main keeps memory_search behind Tool Search for this model. Then, with no further CLI calls, a new dreaming report is written and the curated note edited: the watcher refreshes the note within about 2 s and never indexes the report.

Terminal output
$ openclaw memory index --agent main
Memory index updated (main): 3 files indexed.
$ openclaw gateway run --bind loopback ...   # throwaway Gateway
[gateway] ready
$ openclaw agent --agent main --message "When does the nightly backup run?"   # stub model calls memory_search once via dispatch_action
Done.
tool call: dispatch_action {"id":"memory_search","args":{"query":"nightly backup"}}
# memory_search result paths (from the stub log): memory/backups.md
# indexed memory/ rows before edits:
{"path":"memory/backups.md","text":"# Backups  The nightly backup runs at 02:30 and copies the p"}
{"path":"memory/garden.md","text":"# Garden  Water the tomatoes every second evening in summer."}
# wrote memory/dreaming/light/2026-10-29.md and edited memory/backups.md (02:30 -> 04:45); no CLI calls from here
# after the Gateway watcher sync (~2s), plus 5s more:
{"path":"memory/backups.md","text":"# Backups  The nightly backup runs at 04:45 and copies the p"}
{"path":"memory/garden.md","text":"# Garden  Water the tomatoes every second evening in summer."}
# dreaming rows:
{"dreamingRows":0}

Regressions fail without the fix:

  • file-watcher.lifecycle.test.ts "rebaselines shared exclusions when a differently scoped agent joins and leaves" fails with excludePaths removed from selectionKeys ("expected setScopes to be called once, but got 0 times").
  • manager-workspace-files.test.ts "drops generated Dream reports once excluded and keeps curated edits fresh" fails when the config resolver drops excludePaths (the report is still found).
  • internal.test.ts "keeps generated dreaming reports out of default and overlapping extra paths" also lists files with memory/dreaming/**/!(*.keep).md. With the old path.posix.matchesGlob matcher, listMemoryFiles under Bun still returns the report: on stock Bun 1.3.14 it lists memory/current.md, memory/dreaming/light/pinned.keep.md, memory/dreaming/light/report.md, and with 1463f6e only memory/current.md, memory/dreaming/light/pinned.keep.md. On Node both matchers agree, so the Node run passes either way; the CI shard that runs this test (checks-node-changed-compact-large-6) sets up the pinned Bun 1.4.4 test runtime.

Changed test files (pnpm test <file> --maxWorkers=1 on 685db0c, same test code as 8eb4b7b):

File Result Wall Vitest duration
file-watcher.lifecycle.test.ts 29 passed 48s 41.65s
manager-reindex-state.test.ts 49 passed 40s 36.19s
manager-workspace-files.test.ts 11 passed 71s 64.91s
watch-policy.test.ts 6 passed 47s 41.51s
internal.test.ts 43 passed 4s 749ms
memory-search.test.ts 39 passed 46s 42.06s

Vitest time is mostly cold transform; the new manager case takes about 4 s and the other new cases take 1-24 ms.

Checks: node scripts/check-changed.mjs --base upstream/main on 83eb31b (main 200afde, same code) passes typecheck (core, core tests, extensions, extension tests), lint, format, config docs baseline, Plugin SDK package exports, plugin boundaries and the other changed-file guards. Three lanes fail outside this PR: wrapper shadowing (buildSkillWorkshopPromptSection) and the public Plugin SDK surface budget (agent-harness-runtime) fail identically on clean main 200afde, and the dead-export scan lists only auto-reply, gateway and UI exports this PR does not touch. The pnpm check:docs content checks pass. Test lines grow by a net +154, covered by config/test-lines-allocations/memory-search-exclude-paths-188294.txt: default scope-hash compatibility, the shared-watcher rebaseline, discovery and portable (Node/Bun) glob matching, and the exclusion rebuild.

PR CI: CI has not run on the current head fa31efc (merging main a2f7aa9) or on the seven heads before it: GitHub holds this fork PR's workflows until a maintainer clicks "Approve and run" (action_required), so openclaw/ci-gate shows failure until CI completes. The last completed run, on fc2ef72, passed 72 checks; its three failing memory-core tests are in files this PR does not touch, failed the same way on main without this PR, and main fixed them in #197543. Earlier red runs also came from main and were fixed there. Merges of main conflicted only on the generated config baseline, which was regenerated each time. The full CI history is in this description's edit history.

Local review: autoreview, Codex gpt-6.1-sol, branch mode against upstream/main, P0–P2: scoped-clean, "patch is correct" (0.87). It ran on 685db0c, before the rebases onto 200afde and f980e01, which changed only the base and the generated baseline files. For 2b7dc7f: autoreview with the Claude engine, local mode, P0–P2: scoped-clean, "patch is correct" (0.8). On 2b7dc7f, memory-search.test.ts (39/39; the updated case fails on e768746), schema.help.quality.test.ts, internal.test.ts and workspace-memory-client.test.ts pass, as do tsgo:core, oxlint, oxfmt, check:docs, config:docs:check and the test-line ratchet. On fa31efc (main a2f7aa9), tsgo:core, tsgo:extensions, config:docs:check, prompt:snapshots:check, oxfmt on this PR's files, check:docs and the test-line ratchet (net +154, covered by the allocation) pass, and so do the touched tests plus neighboring memory tests (18 files). Locally, one cli.test.ts test from main's #197543 (fails index --force after full verification records orphaned provenance) fails; it fails the same way on main a2f7aa9 without this PR.

Not covered: Windows paths (the matcher normalizes path.sep) and a live remote node workspace (the harness test checks that list and watch requests carry excludePaths).

serg0x and others added 4 commits October 30, 2026 12:24
Add opt-in memory.search.excludePaths: workspace-relative globs that keep
matching files out of memory search discovery, file watching, and index
scope identity. When unset, the index scope hash is unchanged, so existing
indexes are not rebuilt.

Ported from openclaw#177868 (head a2008ab) onto current main. Conflict
resolution: the scope hash goes through the single
resolveConfiguredMemoryScopeHash owner, and the watch policy imports the
new matcher from the filesystem-worker SDK subpath (engine-fs), keeping
the narrow worker imports from openclaw#181891.

Co-authored-by: CheekyHobson <[email protected]>
Move shouldSkipConfiguredMemorySearchPath next to the extraPaths glob
matcher in the memory host SDK, so core root-memory files stay unchanged,
and add the config field label.

Drop three tests: one indexed an excluded file through a private method
(the CLI e2e covers the real config-change removal), one asserted
selectionKeys shape (the lifecycle join/leave test proves the behavior and
fails without the fix), and a worker integration test that still passed
without the shared-watcher fix.
A scope change pauses vector search until an explicit rebuild, so say
that instead of "next full sync". Point the dreaming docs at the setting
where they describe report files.
Replace the 13 s CLI e2e case with a manager test that mirrors two
unforced `openclaw memory index` runs: the first drops excluded rows after
the scope change, the second refreshes an edited curated note. It fails
when the config resolver drops excludePaths.

Drop a redundant skip check for extra file roots (the loop already
skips excluded roots) and keep the original selectionKeys rationale.
@clawsweeper

clawsweeper Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation extensions: memory-core Extension: memory-core agents Agent runtime and tooling size: M labels Oct 30, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Oct 30, 2026
@clawsweeper

clawsweeper Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge.

What this changes

Adds optional workspace-relative exclusions to memory search discovery, watching, and index scope.

Example: Set memory.search.excludePaths to ["memory/dreaming/**"] and rebuild the index.

  • Before: The supplied workspace indexes 10 files, including 7 generated reports.
  • After: Only the 3 curated files remain indexed, and subsequent curated-note edits remain searchable.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The focused implementation has sufficient behavior and upgrade evidence, but product scope remains undecided and delivery is partial against the canonical request.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): Supplied terminal transcripts exercise the shipped memory CLI and an isolated Gateway watcher with synthetic files and deterministic embedding/model endpoints: exclusions remove generated reports, curated edits refresh, and upgrading from 2026.11.6 preserves the unset configuration's index identity and rows; the relevant production files remain unchanged at the reviewed head.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Needs a maintainer decision · Fix scope: Partial
User problem: Generated dreaming reports compete with curated notes in memory search, and moving reports outside memory/ must be repeated as new reports appear.
Reason: The operator need is concrete and maintainer-supported, but the new setting and search-only staging still need approval; the PR correctly uses Related rather than closing the broader issue.

Merge readiness

⛔ Blocked before merge - 1 item remains

Keep this PR open: it provides a coherent implementation of a maintainer-consolidated need that current main still lacks, with no actionable correctness findings.

Priority: P2
Reviewed head: fa31efcafe2e5bae47f86915296c61c088b9ae8e
Owner decision: Required. See Decision needed.

Decision needed

  • Question: Should memory.search.excludePaths ship for search discovery, watching, and index scope before broader recall eligibility controls?
  • Recommendation: Approve search exclusions first: Accept this focused setting with unchanged defaults, and retain [Feature]: Configurable memory recall eligibility and index exclusion paths for markdown-first workspaces #101422 for the remaining recall and diagnostic requirements.
  • Why: The maintainer-consolidated requirement and operator support establish value, but neither approves this precise configuration contract or the search-only staging.

Before merge

  • Await maintainer action - A maintainer must approve and run the workflows held for the current PR head so required CI can complete.

Findings

None.

Agent review details

How this fits together

Memory configuration feeds local and remote file discovery, shared filesystem watchers, and index identity; eligible files become searchable chunks in the Gateway-owned index.

flowchart TD
  A[Memory configuration] --> B[Normalized exclusion patterns]
  B --> C[Local and remote discovery]
  B --> D[Shared watcher policy]
  B --> E[Index scope identity]
  C --> F[Memory index]
  D --> F
  E --> F
  F --> G[Memory search results]
Loading

Technical review

Best possible solution:

Approve the narrow search-only setting while retaining the canonical issue for recall eligibility and diagnostics.

Do we have a high-confidence way to reproduce the issue?

Current-main source establishes the missing exclusion capability, and the discussion supplies official-release observations; this read-only review executed no product code.

Is this the best way to solve the issue?

The patch is a focused search-only implementation using existing discovery, watcher, and index-identity owners; it intentionally leaves the broader recall request incomplete.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 895c50368fee.

Provenance checked

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

  • Maintainer-supported requirement: vincentkoc explicitly consolidated the requirement that generated dreaming Markdown be excludable from indexing and watcher flows while defaults remain unchanged: [Feature]: Configurable memory recall eligibility and index exclusion paths for markdown-first workspaces #101422 (comment). This establishes maintainer interest, but does not settle the specific setting or staged scope.
  • Current main still lacks default-root exclusions: Current-main discovery recursively includes eligible memory/ files and only applies the existing root auxiliary exclusions; its strict memory-search schema has no excludePaths setting. (packages/memory-host-sdk/src/host/internal.ts:286, 895c50368fee)
  • One exclusion owner: The shared predicate applies workspace-relative minimatch patterns, leaves outside-workspace paths unaffected, and is consumed by discovery and watcher policy. (packages/memory-host-sdk/src/host/internal.ts:196, fa31efcafe2e)
  • Default index compatibility: The scope serializer adds excludePaths only for a nonempty list, preserving the previous serialized identity when unset or empty. (extensions/memory-core/src/memory/manager-reindex-state.ts:181, fa31efcafe2e)
  • Behavior and upgrade evidence: The fully retrieved PR body contains CLI indexing/search, configuration-change rebuild, Gateway watcher, and 2026.11.6 upgrade transcripts. It records unchanged default index identity and stored-row fingerprints, followed by removal of generated reports after opting in. robburke independently confirms the operator need and credits the earlier relocation workaround; CheekyHobson supplied the predecessor implementation. (78d4f9f1165e)
  • Proof remains applicable: The reviewed discovery, configuration, watcher, worker, and scope-identity production files are unchanged between the demonstrated revision and the current head. (fa31efcafe2e)

PR surface

Source +81, Tests +154, Docs +14, Generated 0, Other +2. Total +251 across 27 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 15 102 21 +81
Tests 7 157 3 +154
Docs 2 18 4 +14
Config 0 0 0 0
Generated 2 3 3 0
Other 1 2 0 +2
Total 27 282 31 +251

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Review metrics

Metric Value Why it matters
Configuration surface One new optional list setting, available globally and per agent The generated baseline adds four paths for the two setting locations and their array items; the supported contract needs an owner decision.

Root-cause cluster

Relationship: partial_overlap
Canonical: #101422
Summary: This PR implements the search-exclusion portion of the maintainer-designated canonical request.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: Excluding generated reports improves retrieval for affected workspaces without changing defaults or addressing an urgent runtime outage.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: ⏳ waiting on maintainer: Only explicit maintainer approvals or decisions remain; merge is still blocked.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (6 earlier review cycles)
  • reviewed 2026-10-30T11:53:46.291Z sha 8eb4b7b :: blocked before merge. :: none
  • reviewed 2026-11-03T11:22:42.988Z sha 3fca7e6 :: needs real behavior proof before merge. :: none
  • reviewed 2026-11-03T16:25:07.240Z sha b607675 :: blocked before merge. :: none
  • reviewed 2026-11-04T09:44:50.085Z sha 6d9ace7 :: blocked before merge. :: none
  • reviewed 2026-11-09T13:12:22.660Z sha 05585b7 :: blocked before merge. :: [P2] Use portable glob matching for exclusions
  • reviewed 2026-11-11T02:55:30.095Z sha c210875 :: ready, awaiting a maintainer decision. :: none

Reviewed November 22, 2026, 1:25 PM ET / 18:25 UTC (Revision 7).

@roboclaw-bot roboclaw-bot added the clawtributors PR from a clawtributor label Oct 31, 2026
@robburke

Copy link
Copy Markdown

Thanks @serg0x for carrying this forward and adding the CLI, watcher and upgrade evidence, and @CheekyHobson for the original implementation.

From the operator side of #101422, this search-only scope addresses our immediate need: keep generated dream reports out of memory search, including newly written reports, while curated notes remain searchable and continue updating. Our earlier workaround on 2026.9.5 was to move about 165 reports per agent out of the indexed tree and reindex. An opt-in memory/dreaming/** exclusion covering discovery and watching would replace that manual relocation.

I checked the relevant diff and docs at 4f89172. I have not run this branch against our workspace; the execution evidence in this PR is yours. The explicit rebuild step and unchanged defaults fit the operational requirement.

For the maintainer's scope decision, I support shipping these search exclusions as the first stage, with #101422 retained for its broader scope. Selecting which sessions enter dreaming is the separate request in #183574; this PR does not need to solve that to be useful to us.

My existing offer stands: once the scope is agreed, I can test against a copy of a real workspace and report indexed file counts before and after.

excludePaths called path.posix.matchesGlob, which Bun implements with
Bun.Glob: extglobs never match and wildcards match dotfiles. The same
setting then excluded different files on Node and Bun. Reuse the
minimatch options main adopted for extraPaths patterns (openclaw#194912) so both
pattern kinds share one glob contract on every runtime.
@serg0x

serg0x commented Nov 11, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Nov 11, 2026
Gitignore-style spellings such as "memory/dreaming/", "./memory/dreaming/**"
or "/memory/dreaming/**" silently excluded nothing. Resolve each
memory.search.excludePaths entry once where the config is read: trim it,
drop empty entries, use "/" separators, strip a leading "./" or "/", treat
a trailing "/" as "/**", and dedupe in order.

The docs and help example drop "memory/.dreams/**": that directory only
holds .txt and .json dreaming state, which memory search never indexes.
@clawsweeper clawsweeper Bot removed proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked. labels Nov 17, 2026
@serg0x

serg0x commented Nov 22, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked. labels Nov 22, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling clawtributors PR from a clawtributor docs Improvements or additions to documentation extensions: memory-core Extension: memory-core P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: M status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants