Skip to content

fix(search): surface request timeout in progressive search error and log failures (#4938) - #4939

Merged
thedotmack merged 4 commits into
thedotmack:mainfrom
pei711:fix/mem-search-timeout-surface
Oct 22, 2026
Merged

thedotmack merged 4 commits into
thedotmack:mainfrom
pei711:fix/mem-search-timeout-surface

Conversation

@pei711

@pei711 pei711 commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

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 passed
  • bun run typecheck:root — passed
  • git diff --check origin/main — passed

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-20T19:16:54.481754Z
We couldn’t complete this review. Comment @codex review to try again.
f8b1bce PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@greptile-apps

greptile-apps Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge.

Summary

The PR makes progressive search explain local worker timeouts without exposing unexpected backend error messages.

  • Progressive search names local worker timeouts without exposing backend errors.
  • MCP and HTTP search failures now get warning logs.

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"]
Loading

Reviews (3) · Last reviewed commit: "fix(search): disclose only the typed wor..." · Reviewed by Greptile

Vivek-Yarra added a commit to Vivek-Yarra/claude-mem that referenced this pull request Oct 22, 2026
…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
@thedotmack
thedotmack merged commit 6bd2910 into thedotmack:main Oct 22, 2026
8 checks passed
@thedotmack

Copy link
Copy Markdown
Owner

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:

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants