fix(auto-recall): thread AbortSignal + BM25-only mode + fix post-timeout rejection#746
fix(auto-recall): thread AbortSignal + BM25-only mode + fix post-timeout rejection#746jlin53882 wants to merge 0 commit into
Conversation
There was a problem hiding this comment.
💡 Codex Review
memory-lancedb-pro/src/retriever.ts
Line 598 in b0d03ec
The retrieve() method now opens a try block but never follows it with catch or finally, so TypeScript parsing fails (TS1472) and the plugin cannot load at all. This is a hard runtime blocker for any environment that imports src/retriever.ts.
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| results = await this.hybridRetrieval( | ||
| query, safeLimit, scopeFilter, category, trace, signal, |
There was a problem hiding this comment.
Pass AbortSignal in the correct retrieval argument slot
This call passes signal as the 6th positional argument, but hybridRetrieval expects source and diagnostics before signal, so the abort signal never reaches embedder.embedQuery(...). In vector/hybrid paths that provide a signal, cancellation will not work and timeouts can still block while remote embedding requests run to completion.
Useful? React with 👍 / 👎.
| const target = join(params.workspaceDir, params2.relPath); | ||
| if (!target.startsWith(params.workspaceDir)) throw new Error(`memory-lancedb-pro: invalid relPath ${params2.relPath}`); |
There was a problem hiding this comment.
Normalize memory_get paths before workspace boundary check
The boundary check uses join(workspaceDir, relPath) plus startsWith(workspaceDir), which can be bypassed with paths like ../workspaceDir2/... that still share the same prefix string. In compat readFile, this allows reading files outside the configured workspace when relPath is user-controlled.
Useful? React with 👍 / 👎.
96f7a61 to
be0f81e
Compare
|
Please rebase this branch on current The branch is behind current |
75403c8 to
dcc8663
Compare
dcc8663 to
2226403
Compare
|
Thanks for the work on this! I've taken the core signal-threading concept and combined it with a cleaner fallback design (James's approach) in a new PR: #783 What changed vs this PR:
This PR #746 had good intent but the implementation had some TS errors. The new PR #783 is a clean rebuild. |
|
Thanks for the work on this! I've taken the core signal-threading concept and combined it with a cleaner fallback design (James's approach) in a new PR: #784 What changed vs this PR:
This PR #746 had good intent but the implementation had some TS errors. The new PR #784 is a clean rebuild. |
Summary
Consolidates two closed/in-conflict PRs into a single reviewable branch:
AbortControllerthreaded throughrecallWork → retrieveWithRetry → embedder.embedQuery.Promise.racepost-timeout rejection now consumed via.catch()so it does not become an unhandled process rejection.Commits
dc7ec59fix(auto-recall): thread AbortSignal to cancel embedding on timeout9f4c86cfix(auto-recall): narrow abort classification to our controller3dc8644fix: restore cli compat and unblock auto-recall latencyb0d03ecfix(auto-recall): consume post-timeout rejection to avoid unhandled rejectionMaintainer feedback addressed
Rebased onto latest
origin/master(47b635d) — no conflicts.