Repository navigation
fix(memory): gateway search times out before remote embeddings finish - #139003
saladinyao-cyber wants to merge 2 commits into
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
63f221d to
f75544e
Compare
|
Codex review: needs real behavior proof before merge. Reviewed September 5, 2026, 7:07 AM ET / 11:07 UTC. ClawSweeper reviewWhat this changesThe PR doubles Memory Core’s shared timeout from 15 to 30 seconds and updates tests, extending waits for agent searches, wiki-backed reads, and one-shot manager cleanup. Merge readiness⛔ Blocked before merge - 5 items remain Keep open: current main and v2026.9.1 retain the shorter deadline, and the companion PR explicitly excludes this change. The contribution remains useful, but its runtime benefit is unproven and its scope needs narrowing. Priority: P2 Review scores
Verification
How this fits togetherMemory Core supplies agent tools that retrieve indexed notes and optional wiki content. Its deadline limits how long those tools wait before returning results or an unavailable outcome. flowchart TD
A[Agent memory request] --> B[Memory Core tool]
B --> C[Shared deadline]
C --> D[Indexed memory and embeddings]
C --> E[Optional wiki corpus]
D --> F[Results or unavailable outcome]
E --> F
F --> G[One-shot manager cleanup]
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource 0, Tests +8. Total +8 across 6 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Size the bounded tool-search budget from observed embedding latency while preserving the existing read and cleanup deadlines, cancellation, and cooldown behavior. Do we have a high-confidence way to reproduce the issue? Yes, from source: an agent tool search still awaiting embeddings at 15 seconds is aborted, and a hanging wiki supplement delays otherwise-ready reads to the shared deadline. No real-provider reproduction was supplied or executed. Is this the best way to solve the issue? Unclear as a complete fix: increasing the search budget is plausible, but 30 seconds remains below the embedding owner's retry envelope and unnecessarily extends unrelated read and cleanup waits. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 49ecde890905. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
What Problem This Solves
Gateway
memory_searchcurrently aborts after 15 seconds, while remote embedding requests and their retry envelope can legitimately take longer. This makes otherwise healthy searches fail at the outer deadline before the provider operation can complete.Why This Change Was Made
Raise only the existing gateway memory-search deadline from 15 seconds to 30 seconds. The abort propagation, stable deadline error, timer cleanup, and provider-level timeout behavior remain unchanged.
User Impact
Remote-backed memory searches get enough time to complete without removing the bounded request deadline or changing retry policy.
Evidence
search-deadline.test.ts: 8/8 tests passed.git diff --checkpassed.main.