fix(memory-core): clarify memory_search tool timeouts#92632
Conversation
Classify memory_search tool deadline failures separately from embedding provider errors, add a configurable memory-core tool timeout, and return partial corpus=all results when a supplemental corpus stalls after primary memory results are available.
|
Codex review: needs real behavior proof before merge. Reviewed June 13, 2026, 4:21 AM ET / 08:21 UTC. Summary PR surface: Source +139, Tests +66, Docs +8. Total +213 across 6 files. Reproducibility: yes. Source inspection on current main shows a fixed 15s memory_search wrapper and generic provider-error classification for timeout strings; I did not run a live Gateway/QMD repro in this read-only review. Review metrics: 1 noteworthy metric.
Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Keep the explicit memory-core tool timeout direction, fix the lint error, align the config reference/test coverage, and require redacted real memory_search runtime proof before merge. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection on current main shows a fixed 15s memory_search wrapper and generic provider-error classification for timeout strings; I did not run a live Gateway/QMD repro in this read-only review. Is this the best way to solve the issue? No as submitted. The explicit memory-core timeout key is a better direction than borrowing raw QMD settings, but the lint, config reference/test, and real-proof gaps should be fixed before merge. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 7bd533a80e9d. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +139, Tests +66, Docs +8. Total +213 across 6 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
|
|
Closing this voluntarily. Recent maintainer feedback made clear I should avoid keeping implementation PRs open when the change is feature/config/hardening-oriented rather than a maintainer-requested bugfix. This overlaps the existing #91947 / #91958 |
Summary
Fixes the
memory_searchtool timeout path so tool-deadline failures are no longer reported as embedding-provider failures, and makes the deadline configurable for slower hosts / larger indexes.What changed:
plugins.entries.memory-core.config.tools.memorySearch.timeoutMs(1000-120000 ms) for thememory_searchtool hard deadline;memory_search timed out after ...as a tool deadline failure instead of an embedding/provider error;corpus="all"when the supplemental/wiki corpus stalls after memory hits are already available;Relationship to adjacent work
This is adjacent to, but not a duplicate of:
corpus="all"results.searchMemoryCorpusSupplements. This PR handles the outer tool deadline path, including partial primary-memory results when the supplement phase misses the deadline.Behavior addressed
memory_searchcould hit the hardcoded 15s tool deadline and surface:That message is misleading when the embedding provider is healthy and the failure is the wrapper deadline. Broad
corpus="all"searches could also discard usable primary memory results if the supplemental/wiki phase stalled.Real setup tested
Isolated source checkout on current
origin/main. I did not use any live user Gateway/runtime/config for proof.Exact steps or command run after this patch
node scripts/run-vitest.mjs run --config test/vitest/vitest.extension-memory.config.ts extensions/memory-core/src/tools.test.ts extensions/memory-core/src/tools.citations.test.ts extensions/memory-core/src/config.test.ts corepack pnpm exec oxfmt --check extensions/memory-core/src/tools.ts extensions/memory-core/src/tools.shared.ts extensions/memory-core/src/tools.test.ts extensions/memory-core/src/tools.citations.test.ts extensions/memory-core/openclaw.plugin.json docs/concepts/memory-search.md node scripts/run-tsgo.mjs -p tsconfig.extensions.json --noEmitEvidence after fix
Observed result after fix
Memory search timed out before the tool deadline.instead of the generic embedding/provider warning.tools.memorySearch.timeoutMs: 5000producesmemory_search timed out after 5sand aborts the active search signal.corpus="all"returnspartial: trueand primary memory hits when the supplemental corpus stalls after primary memory hits are available.What was not tested
Live Gateway behavior on a production/user instance was intentionally not tested.