fix(sift): disable vector retriever + ML reranking to prevent hang
Some checks are pending
CI / detect-changes (push) Waiting to run
CI / docs-check (push) Blocked by required conditions
CI / lint (push) Blocked by required conditions
CI / build (push) Blocked by required conditions
CI / integration-tests (push) Blocked by required conditions
CI / windows-portability (push) Blocked by required conditions
CI / rtk-portability (linux, blacksmith-4vcpu-ubuntu-2404) (push) Blocked by required conditions
CI / rtk-portability (macos, macos-15) (push) Blocked by required conditions
CI / rtk-portability (windows, blacksmith-4vcpu-windows-2025) (push) Blocked by required conditions
Some checks are pending
CI / detect-changes (push) Waiting to run
CI / docs-check (push) Blocked by required conditions
CI / lint (push) Blocked by required conditions
CI / build (push) Blocked by required conditions
CI / integration-tests (push) Blocked by required conditions
CI / windows-portability (push) Blocked by required conditions
CI / rtk-portability (linux, blacksmith-4vcpu-ubuntu-2404) (push) Blocked by required conditions
CI / rtk-portability (macos, macos-15) (push) Blocked by required conditions
CI / rtk-portability (windows, blacksmith-4vcpu-windows-2025) (push) Blocked by required conditions
The sentence-transformers/all-MiniLM-L6-v2 embedding model inference hangs indefinitely during sift search, causing: - Warmup to never complete (TTL expired 62+ min ago) - All page-index-hybrid searches to timeout - The search cache to become stale Fix: Restrict warmup and search to bm25+phrase retrievers with no ML reranking. This gives fast lexical results while avoiding the hanging embedding inference path. Also expose --retrievers and --reranking params in sift_search tool so callers can override per-query if needed. Closes #vector-hang-fix Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
ec65b4d881
commit
1a98d8f9af
2 changed files with 18 additions and 0 deletions
|
|
@ -554,6 +554,11 @@ export function ensureSiftIndexWarmup(projectRoot, prefs, options = {}) {
|
|||
};
|
||||
}
|
||||
const scope = resolveSiftSearchScope(projectRoot, options.scope ?? ".");
|
||||
// ── Vector retriever hang workaround ─────────────────────────────────────
|
||||
// When the embedding model (sentence-transformers/all-MiniLM-L6-v2) hangs
|
||||
// during inference, page-index-hybrid with vector retriever stalls forever.
|
||||
// Restrict retrievers to bm25+phrase and disable ML reranking so warmup
|
||||
// completes without the vector path (#vector-hang-fix).
|
||||
const siftArgs = [
|
||||
"search",
|
||||
"--json",
|
||||
|
|
@ -565,6 +570,10 @@ export function ensureSiftIndexWarmup(projectRoot, prefs, options = {}) {
|
|||
String(
|
||||
options.retrieverTimeoutMs ?? DEFAULT_SIFT_WARMUP_RETRIEVER_TIMEOUT_MS,
|
||||
),
|
||||
"--retrievers",
|
||||
"bm25,phrase",
|
||||
"--reranking",
|
||||
"none",
|
||||
scope,
|
||||
options.query ?? DEFAULT_SIFT_WARMUP_QUERY,
|
||||
];
|
||||
|
|
|
|||
|
|
@ -54,6 +54,15 @@ function buildSiftArgs(params, projectRoot = process.cwd()) {
|
|||
String(params.retrieverTimeoutMs ?? DEFAULT_RETRIEVER_TIMEOUT_MS),
|
||||
];
|
||||
|
||||
// Allow callers to restrict retrievers (e.g. bm25,phrase) when the
|
||||
// vector retriever or ML reranking is hanging (#vector-hang-fix).
|
||||
if (params.retrievers) {
|
||||
args.push("--retrievers", String(params.retrievers));
|
||||
}
|
||||
if (params.reranking) {
|
||||
args.push("--reranking", String(params.reranking));
|
||||
}
|
||||
|
||||
if (params.agent === true) {
|
||||
args.push("--agent");
|
||||
if (params.agentMode) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue