[Bug]: Durable memory maintenance rescans per search, forces full reindex on chunking bump, and replays provenance backfill on every open
Bug type
Behavior bug (incorrect output/state without crash)
Beta release blocker
No
Summary
Several defects in durable-memory maintenance:
openclaw memory searchand thememory.searchgateway RPC build a transient manager per call — every search rescans and hashes the whole corpus even though the gateway already owns a watched, current index; recall signals from operator searches are dropped (never recorded).- The chunking v2→v3 bump forces a full semantic reindex even for Markdown-only memory roots whose chunk boundaries are identical across versions.
ensureMemoryChunkProvenancetakes an immediate write lock and replays the whole backfill on every manager open, even when provenance is already complete.- Promotion candidates with blocked origins are ranked and narrated even though the durable write boundary always rejects them.
- memory-wiki's bridge import has no path exclusion mechanism.
(The related memory-flush append-duplication defect is tracked separately by PR #120404.)
Steps to reproduce
- With a populated memory root and a running gateway, run
openclaw memory search <query>repeatedly; observe a full corpus rescan/hash per invocation instead of the gateway's live index being used. - Upgrade across the chunking v2→v3 boundary with a Markdown-only root; observe a full re-embedding despite identical chunking.
- Open the manager repeatedly; observe the provenance backfill write path taken each time.
Expected behavior
Searches reuse the gateway's live manager and record recall; version bumps that provably do not change chunk boundaries upgrade metadata in place; provenance ensure short-circuits when complete; blocked-origin candidates are excluded from ranking; bridge imports support exclusions.
Actual behavior
Per-search rescans with dropped recall signals; unnecessary full reindexes; repeated backfill lock/replay; dead-end promotion narration.
OpenClaw version
2026.8.1 (source checkout)
Operating system
Ubuntu 26.04 LTS (Linux 7.0.6-2-pve x86_64)
Install method
Local pnpm source build
Model
N/A (embedding provider-independent)
Provider / routing chain
N/A
Additional provider/model setup details
N/A
Logs
NOT_ENOUGH_INFO
Screenshots, recordings, and evidence
Traceable in source: transient manager construction in the memory search CLI/RPC paths; unconditional reindex trigger on chunking version mismatch; unconditional provenance backfill in packages/memory-host-sdk.
Impact and severity
Slow searches, lost recall telemetry, and expensive unnecessary reindexes for every operator with a large memory corpus. A fix exists on a local branch (route-first gateway-backed search with --local fallback and recall recording, Markdown-only in-place chunking upgrade, provenance short-circuit, batched embedding-cache seeding with a query LRU, wiki bridge exclusions); PR to follow.
Source: openclaw/openclaw