perf(ci): disable semantic search in default test fixtures#938
Merged
Conversation
Semantic search silently defaults to enabled whenever fastembed and sqlite-vec are importable, so every test that synced a note paid the ONNX embedding stack (~5-7s per sync). The dedicated semantic suites configure the flag explicitly and are unaffected. - set semantic_search_enabled=False in tests/ and test-int/ app_config fixtures - deselect on-demand benchmark tests from the CI integration recipes (they force-enable semantic themselves and cost ~85s per job) - fix six tests that implicitly relied on the enabled default: stub the vector purge in the reindex_vectors wiring tests, create the search_vector_embeddings stub in the embedding-status tests, and patch the ConfigManager property in the vec0 regression test Measured locally: int SQLite 337s -> 206s (-> ~120s with benchmarks deselected), watch-service unit file 31s -> 2.9s. Signed-off-by: phernandez <paul@basicmachines.co>
delete_stale_vector_rows is SQLite-only; monkeypatch.setattr raised AttributeError on PostgresSearchRepository. raising=False attaches an unused attribute there — the Postgres purge path never calls it. Verified on both backends. Signed-off-by: phernandez <paul@basicmachines.co>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
semantic_search_enabledsilently defaults to enabled whenever fastembed + sqlite-vec are importable — which they are in dev and CI. Neithertests/conftest.pynortest-int/conftest.pyoverrode it, so every test that synced a note ran the real ONNX embedding stack (~5–7s per sync). The dedicated semantic suites (test-int/semantic/) configure the flag explicitly in their own conftest and are unaffected.On top of that, the four search performance benchmarks in
test-int/test_search_performance_benchmark.pyforce-enable semantic themselves and were running inside every CI integration job (~85s, worst single test 41s) — they aren't collected byjust test-semanticand are meant to be run on demand.Changes
semantic_search_enabled=Falsein both sharedapp_configfixtures (with constraint comments)benchmark-marked tests from the CI integration recipes:-m "not semantic and not benchmark"reindex_vectorswiring tests: stubdelete_stale_vector_rows(the one call in that flow that requires the semantic stack)search_vector_embeddingsstub table that the file's other tests already useconfig_managerproperty for the status call, same pattern as its unit siblingsMeasured (local, same machine)
tests/sync/test_watch_service.pyTest plan
uv run pytest tests -q— 2903 passeduv run pytest -m "not semantic and not benchmark" test-int -q— 368 passed🤖 Generated with Claude Code
Reviewed SHA:
8c0ce6d8a7e8134acdf005453a0a9f1a8e9295abVerdict:
approveStatus:
success- BM Bossbot approved this head SHASummary:
Reviewed the full provided diff against the engineering style guidance and the touched search/project status code paths. The default test fixtures now explicitly disable semantic search, the semantic and benchmark suites remain opt-in through their own targets, and the latest Postgres portability fix only changes a SQLite-specific monkeypatch to be non-failing on Postgres where that method is not called. No concrete merge-blocking issues found.
Blocking findings:
Non-blocking findings:
BM Bossbot image choices
#938/home/runner/work/basic-memory/basic-memory/docs/assets/infographics/pr-938.webpgpt-image-21536x1024higheditorial-imageautoTheme / visual direction: