yams/third_party
trvon 4a19d13e12
fix(search): give the Simeon lexical index its own governor grant
The daemon grew past 100 GB on a 90k-document corpus. The governor capped
the lexical build's input text (recommendLexicalCorpusBytes) but not the
in-memory BM25 index built from it, which runs ~8x the text for
SubwordAwareBackoff.

- ResourceGovernor::recommendLexicalIndexBytes(): live-heap grant for the
  BM25 indexes, 6.25% of the memory budget (256 MiB to 4 GiB), scaled by
  pressure.
- scaleBudgetForPressure() replaces three copies of the pressure switch
  in the recommend*Bytes() budgets.
- The lexical build reads the grant, sizes Simeon's reservations from it,
  checks the live index size before each document and re-polls the
  governor every 256 documents; the grant only shrinks mid-build. Over
  the grant it stops and search stays on FTS5.
- testing_endStartupGrace() lets tests reach Critical and Emergency.
- third_party/simeon: Bm25Index memory_bytes(), max_memory_bytes,
  try_add_doc(), bounded reservations, validate() and fuzzers
  (trvon/simeon#4).

On the 90k corpus a traced daemon run held the lexical index at 3.6 GB,
under its 4 GiB grant.

Signed-off-by: trvon <me@trevon.dev>
2026-11-05 06:29:34 -07:00
..
simeon@2e5626a65b fix(search): give the Simeon lexical index its own governor grant 2026-11-05 06:29:34 -07:00
sqlite-vec-cpp@0fec31ca73 fix(vector): bump sqlite-vec-cpp for safe error formatting 2026-09-22 18:58:23 -06:00
symspell@7f0fa8d879 Sync experimental into main: Search retrieval improvements (#60) 2026-07-24 19:00:22 -04:00
tinyfsm feat: vendoring and migrating correctly to use tinyfsm 2026-04-16 12:37:28 -04:00