You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
expect(stalledDetails.error).toBe("memory_search timed out after 15s");
497
+
expect(stalledDetails.warning).toBe(
498
+
"Memory search returned partial results because a supplemental corpus did not finish.",
499
+
);
500
+
expect(stalledDetails.action).toBe(
501
+
'Retry with corpus="memory" or corpus="wiki" for a narrower search, or increase plugins.entries.memory-core.config.tools.memorySearch.timeoutMs for slower hosts.',
502
+
);
503
+
expect(stalledDetails.debug?.partial).toEqual({
504
+
failedPhase: "supplement",
485
505
error: "memory_search timed out after 15s",
486
-
warning: "Memory search is unavailable due to an embedding/provider error.",
487
-
action: "Check embedding provider configuration and retry memory_search.",
warning: "Memory search is unavailable due to an embedding/provider error.",
535
-
action: "Check embedding provider configuration and retry memory_search.",
552
+
warning: "Memory search timed out before the tool deadline.",
553
+
action:
554
+
"Retry with a narrower corpus/query or after Gateway pressure clears; if this recurs, increase plugins.entries.memory-core.config.tools.memorySearch.timeoutMs.",
? "Memory search is unavailable because the embedding provider quota is exhausted."
134
-
: "Memory search is unavailable due to an embedding/provider error.");
135
+
: isToolTimeout
136
+
? "Memory search timed out before the tool deadline."
137
+
: "Memory search is unavailable due to an embedding/provider error.");
135
138
constaction=
136
139
overrides?.action??
137
140
(isQuotaError
138
141
? "Top up or switch embedding provider, then retry memory_search."
139
-
: "Check embedding provider configuration and retry memory_search.");
142
+
: isToolTimeout
143
+
? "Retry with a narrower corpus/query or after Gateway pressure clears; if this recurs, increase plugins.entries.memory-core.config.tools.memorySearch.timeoutMs."
144
+
: "Check embedding provider configuration and retry memory_search.");
warning: "Memory search is unavailable due to an embedding/provider error.",
149
-
action: "Check embedding provider configuration and retry memory_search.",
148
+
warning: "Memory search timed out before the tool deadline.",
149
+
action:
150
+
"Retry with a narrower corpus/query or after Gateway pressure clears; if this recurs, increase plugins.entries.memory-core.config.tools.memorySearch.timeoutMs.",
warning: "Memory search is unavailable due to an embedding/provider error.",
175
-
action: "Check embedding provider configuration and retry memory_search.",
175
+
warning: "Memory search timed out before the tool deadline.",
176
+
action:
177
+
"Retry with a narrower corpus/query or after Gateway pressure clears; if this recurs, increase plugins.entries.memory-core.config.tools.memorySearch.timeoutMs.",
176
178
});
177
179
// The deadline must abort the orphaned search, not just race past it.
warning: "Memory search is unavailable due to an embedding/provider error.",
183
-
action: "Check embedding provider configuration and retry memory_search.",
184
+
warning: "Memory search timed out before the tool deadline.",
185
+
action:
186
+
"Retry with a narrower corpus/query or after Gateway pressure clears; if this recurs, increase plugins.entries.memory-core.config.tools.memorySearch.timeoutMs.",
184
187
});
185
188
expect(searchCalls).toBe(1);
186
189
}finally{
187
190
vi.useRealTimers();
188
191
}
189
192
});
190
193
194
+
it("honors the configured memory_search tool deadline",async()=>{
warning: "Memory search timed out before the tool deadline.",
228
+
action:
229
+
"Retry with a narrower corpus/query or after Gateway pressure clears; if this recurs, increase plugins.entries.memory-core.config.tools.memorySearch.timeoutMs.",
230
+
});
231
+
expect(searchSignal?.aborted).toBe(true);
232
+
}finally{
233
+
vi.useRealTimers();
234
+
}
235
+
});
236
+
191
237
it("keeps the timeout result when an abort-aware search rejects on abort",async()=>{
warning: "Memory search is unavailable due to an embedding/provider error.",
213
-
action: "Check embedding provider configuration and retry memory_search.",
258
+
warning: "Memory search timed out before the tool deadline.",
259
+
action:
260
+
"Retry with a narrower corpus/query or after Gateway pressure clears; if this recurs, increase plugins.entries.memory-core.config.tools.memorySearch.timeoutMs.",
? "Memory search returned partial results because a supplemental corpus did not finish."
231
+
: "Memory search returned partial results because the primary memory corpus did not finish.";
232
+
constaction=
233
+
'Retry with corpus="memory" or corpus="wiki" for a narrower search, or increase plugins.entries.memory-core.config.tools.memorySearch.timeoutMs for slower hosts.';
0 commit comments