yams/tests/unit/vector
Trevon 47f14f5093
fix(vector): prepare backend statements only once per connection (#351)
prepareStatements() prepared all nine statements over whatever handles it
already held. On an existing vectors.db, initialize() prepares them and
createTables() prepares them again, so the first nine leaked. They kept
the connection alive: close() finalized only the current handles, and
sqlite3_close_v2() left a zombie connection with 9 live statements.

LeakSanitizer on a gcc Debug ASan build reported 220 KB in 572
allocations, all indirect, from vector_submodule ("preserves vector
generation tracking while migrating update triggers"). It was found with
YAMS_TRACE_DB_LIFETIME=1, which logged close.sqlite with stmts=9.

prepareStatements() now prepares only the empty slots. A new test checks
that a second createTables() leaves the live statement count unchanged.

Signed-off-by: trvon <me@trevon.dev>
2026-10-25 20:54:40 -06:00
..
binary_quantization_catch2_test.cpp feat(topology): opt-in medoid representative and BQ rotation (#277) 2026-10-08 14:30:27 -06:00
dim_resolver_catch2_test.cpp fix: cli clean up of old comments and duplicate code. search improvements as we migrate yams to simeon. 2026-04-21 10:20:01 -04:00
document_chunker_catch2_test.cpp refactor(vector): decouple embedding generator policy (#83) 2026-09-02 10:12:46 -04:00
embedding_service_synthetic_catch2_test.cpp feat: instrumented embedding for deeper insight into hotspots. Fixed CoreML scaling that resulted in high ram usage due to VRAM calculation. Expanded testing for embedding and draining of work 2026-02-11 12:07:08 -05:00
simeon_backend_catch2_test.cpp refactor(vector): decouple embedding generator policy (#83) 2026-09-02 10:12:46 -04:00
sqlite_vec_backend_comprehensive_catch2_test.cpp fix(vector): prepare backend statements only once per connection (#351) 2026-10-25 20:54:40 -06:00
sqlite_vec_backend_persistence_catch2_test.cpp Sync experimental into main: Search retrieval improvements (#60) 2026-07-24 19:00:22 -04:00
sqlite_vec_c_api_smoke_catch2_test.cpp ingestion optimizations, continued test migrations 2025-12-12 12:50:56 -05:00
static_cosine_ann_index_catch2_test.cpp perf(search): bound topology routing and harden runtime paths (#59) 2026-07-19 14:53:10 -04:00
tokenizer_catch2_test.cpp fix: harden CI and metadata stability (#48) 2026-06-11 16:42:54 -04:00
vec0_cosine_order_catch2_test.cpp fix(vector): rank vec0 by cosine on unit-normalized copies (#275) 2026-10-08 14:30:26 -06:00
vector_dimension_validation_catch2_test.cpp removed hnsw vector manager. search optimizations 2026-01-05 23:39:18 -05:00
vector_schema_migration_vec0_catch2_test.cpp refactor: simplify runtime paths and harden retrieval (#61) 2026-07-31 14:16:45 -04:00
vector_smoke_catch2_test.cpp fix(daemon): run memory_sync catch-up sweeps only when a store changed (#295) 2026-10-14 08:32:56 -06:00
vector_sync_adapter_catch2_test.cpp feat(memory-sync): apply paged winners through bounded adapters (#330) 2026-10-22 07:12:24 -06:00