Skip to content

fix(search): fast-fail during reindex instead of hanging requests - #12

Merged
ManSio merged 1 commit into
mainfrom
feat/lsp-thin-client
Aug 25, 2026
Merged

fix(search): fast-fail during reindex instead of hanging requests#12
ManSio merged 1 commit into
mainfrom
feat/lsp-thin-client

Conversation

@ManSio

@ManSio ManSio commented Aug 25, 2026

Copy link
Copy Markdown
Owner

Живое воспроизведение 2026-08-25: полная переиндексация блокировала ВСЕ вызовы ~7.5 мин (таймауты вплоть до passport); поиск — главная жертва.

Фикс: Searcher.hybrid_search_async проверяет db_manager.is_reindexing() на входе и отвечает мгновенным «⏳ индекс перестраивается — повторите через несколько секунд» вместо минут зависания. Методы set/clear/is_reindexing уже существуют в LanceDBManager — не хватало только проверки в пути запроса.

Строгая проверка is True: первая попытка уронила 6 тестов (MagicMock-truthy, инцидент 2026-08-13) — исправлено, 9/9 зелёные, полный pytest в gate-zero прошёл.

Остаётся открытым: механизм полного зависания (passport тоже молчал) требует отдельной трассировки; set_project не влияет на reindex-скоуп (job идёт по CWD) — следующий пункт.

- Live repro 2026-08-25: full reindex blocked every MCP call ~7.5 min (timeouts incl. debug_runtime_passport); search is the primary victim.
- Searcher.hybrid_search_async checks db_manager.is_reindexing() at entry -> instant 'busy, retry in seconds' instead of waiting minutes. Guard methods already exist in LanceDBManager; only the query path missed the check.
- Strict 'is True' check: MagicMock-truthy trap (incident 2026-08-13) broke 6 hybrid-cache/searcher tests on first attempt; fixed + verified 9/9.
@coderabbitai

coderabbitai Bot commented Aug 25, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: f8fcf675-9056-4053-a7d7-0c6ea114ff1b


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ManSio
ManSio merged commit 5453b12 into main Aug 25, 2026
13 checks passed
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.

1 participant