Repository navigation
fix(search): surface request timeout in progressive search error and log failures (#4938) - #4939
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
[Medium impact] The PR appears safe to merge. SummaryThe PR makes progressive search explain local worker timeouts without exposing unexpected backend error messages.
No new actionable issues were found. No previous review threads were supplied. Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["dumb_search"] --> B["workerHttpRequest"]
B --> C["fetchWithTimeout"]
C -->|Deadline expires| D["WorkerRequestTimeoutError"]
D --> E["progressiveSearchToolError"]
E --> F["Fixed message with timeout duration"]
G["Unexpected backend error"] --> E
E --> H["Generic retry message"]
Reviews (3) · Last reviewed commit: "fix(search): disclose only the typed wor..." · Reviewed by Greptile |
…in progressive search error and log failures (thedotmack#4938) Squashed from thedotmack/claude-mem pull/4939 (source only, CHANGELOG excluded). Claude-Session: https://claude.ai/code/session_01J69ZRK5a82yX2rX1vVhjeo
…rors - fetchWithTimeout throws WorkerRequestTimeoutError (same message, so existing callers that match on it are unchanged). - progressiveSearchToolError maps that error to a fixed sentence instead of echoing any error whose text says "timed out"; backend errors such as a chroma-mcp timeout stay masked. The check is by name and numeric deadline so the contract file stays import-free. - Log line names dumb_search; the HTTP handler logs the project count, not the project list. - Tests: typed timeout from fetchWithTimeout, and backend timeout text stays masked. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01QVujqk6gvQYaoymRd7Aynn
|
Merged, thank you @pei711! When dumb_search runs out of time, the error now says the local worker didn't answer within the deadline instead of a generic "Memory retrieval failed", and both the MCP server and the worker log the real error, so a timeout like the one in #4938 can actually be diagnosed. Thanks also for merging main yourself after the mem_search to dumb_search rename. What we changed:
|
Summary
Surface request timeout errors from progressive search while keeping unexpected backend details masked. Log failures in the MCP and HTTP handlers for diagnosis.
Refs #4938 (diagnostics only; the timeline CTE and the Chroma query timeout remain the root-cause follow-up).
Verification
bun test tests/worker/progressive-search-adversarial.test.ts tests/worker/progressive-memory-search.test.ts tests/servers/progressive-memory-stdio.test.ts— 9 passedbun run typecheck:root— passedgit diff --check origin/main— passed