Summary
On gbrain 0.42.8.0 (installed via bun install -g github:garrytan/gbrain, main HEAD), gbrain search <q> and gbrain query <q> print no results and exit with:
[cli] engine.disconnect() did not return within 10000ms — force-exiting
The same brain DB queried with gbrain 0.22.8 returns correct ranked results. Only search/query are affected — list, get, sync, doctor, status all work and render output normally on 0.42.8.0.
Environment
- gbrain 0.42.8.0 (
bun install -g github:garrytan/gbrain)
- Runtime: Bun 1.3.14 on WSL2 / Ubuntu 24.04
- Brain: Postgres (remote), schema v112 (migrated up from v29 by 0.42.8.0)
- Embedding model:
zeroentropyai:zembed-1
Repro
$ gbrain search trak
[cli] engine.disconnect() did not return within 10000ms — force-exiting
$ # no results printed
Expected
Ranked keyword results, as gbrain 0.22.8 produces against the identical DB:
$ gbrain search trak
[0.4493] companies/shiftcare -- # ShiftCare ...
[0.3559] products/trak/trak -- ...
... (7 hits)
Evidence the data + index are healthy (the regression is in the search/query CLI path, not the data)
gbrain list -n 5 returns pages including products/trak/trak.
gbrain doctor reports all checks OK; embeddings present; no stale chunks.
- Direct SQL against the same DB confirms FTS is fully populated:
SELECT count(*) FROM content_chunks WHERE search_vector @@ to_tsquery('english','trak') → 19
SELECT count(*) FROM pages WHERE search_vector @@ to_tsquery('english','trak') → 9
- gbrain 0.22.8 renders the results correctly against the same DB, captured the same (non-TTY) way.
Notes / narrowing
- Not stdout buffering. The empty output persists under a PTY (
script -qec 'gbrain search trak' /dev/null), so it isn't results lost to an unflushed buffer at force-exit.
- The
engine.disconnect() did not return within 10000ms line appears only on search/query, never on list/status/doctor/sync — suggesting the search/query code path opens a connection/pool that never closes, and either (a) the process force-exits before printing results, or (b) the query returns empty due to a scoping/RLS change introduced in 0.4x.
Happy to provide more detail, logs, or test a patch.
Summary
On gbrain 0.42.8.0 (installed via
bun install -g github:garrytan/gbrain,mainHEAD),gbrain search <q>andgbrain query <q>print no results and exit with:The same brain DB queried with gbrain 0.22.8 returns correct ranked results. Only
search/queryare affected —list,get,sync,doctor,statusall work and render output normally on 0.42.8.0.Environment
bun install -g github:garrytan/gbrain)zeroentropyai:zembed-1Repro
Expected
Ranked keyword results, as gbrain 0.22.8 produces against the identical DB:
Evidence the data + index are healthy (the regression is in the search/query CLI path, not the data)
gbrain list -n 5returns pages includingproducts/trak/trak.gbrain doctorreports all checks OK; embeddings present; no stale chunks.SELECT count(*) FROM content_chunks WHERE search_vector @@ to_tsquery('english','trak')→ 19SELECT count(*) FROM pages WHERE search_vector @@ to_tsquery('english','trak')→ 9Notes / narrowing
script -qec 'gbrain search trak' /dev/null), so it isn't results lost to an unflushed buffer at force-exit.engine.disconnect() did not return within 10000msline appears only onsearch/query, never onlist/status/doctor/sync— suggesting the search/query code path opens a connection/pool that never closes, and either (a) the process force-exits before printing results, or (b) the query returns empty due to a scoping/RLS change introduced in 0.4x.Happy to provide more detail, logs, or test a patch.