Files
gbrain/test
a5a80549e5 fix(search,embed): normalize / in FTS queries; CPU-safe defaults for local embedding endpoints
Two backlog fixes:

1. Takeover of #2380 (search): Postgres' default text-search parser
   classifies foo/bar as a single file-alias token mapped to the simple
   dictionary, so websearch_to_tsquery produces one un-stemmed lexeme
   that never matches indexed text — slash-containing queries bypassed
   FTS AND semantics (zero primary hits, OR-fallback results only).
   normalizeKeywordQuery() replaces / with whitespace before parse.
   Beyond the original PR: also routes searchTitles through the
   normalizer (the PR only covered the two chunk arms), applies it in
   BOTH engines, and drops the stray node_modules symlink from the diff.

2. Fixes #2552 (embed): cloud-tuned embedding defaults silently wedge
   CPU-only Ollama boxes. The ollama recipe now declares a conservative
   static batch cap (max_batch_tokens 4096 x chars_per_token 2, ~8K
   chars/request) instead of no_batch_cap — Ollama never returns a
   recognizable token-limit error, so the recursive-halving safety net
   can't fire. Bulk embed auto-caps worker fan-out at 2 for local
   endpoints (ollama / llama-server / localhost base URL) unless
   GBRAIN_EMBED_CONCURRENCY is set explicitly, and gbrain doctor grows
   an embed_concurrency check that warns when an explicit override fans
   out against a local endpoint.

Co-authored-by: rwbaker <rwbaker@users.noreply.github.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 15:12:33 -07:00
..