yams/tests/integration/search/meson.build
Trevon 4228a0c5e9
chore: housekeeping — rm dead code, consolidate MCP tools, add tests, clean docs (#50)
* implemented stubbed IGraphContextService methods

* feat: wire graph communication updates in ipc, mcp and cli

* fix: fix call graph recall and add profiling coverage to graph calls sites

* fix: fixes for work where we added agent navigation to graph tooling

* fix(corpus): clean FTS and KG orphans on document delete

* fix(repair): clean orphans, honor cancellation, surface stats

* fix(rm): order content removal before metadata/KG delete. keep manifest while content is still referenced

* fix(daemon): seed built-in content extractor for readiness

* chore(cli): remove dead stubs and unwired helpers

* feat(search): named-collection scoping + provable relevance gate

* fix(refactor): rm dead stubs, inline simd, add proto/metrics tests

* chore: rm dead interfaces/enums, consolidate guards, add tests

* refactor: rm dr vaporware, collapse download handlers, clean list flags

* docs: rm stale testing investigation logs

* fix: address Copilot review findings from PR #50

- relationship_ops: return existing id when INSERT OR IGNORE skips
- document_crud_ops: propagate FTS5 cleanup error (was silent skip)
- builtin_text_content_extractor: unsigned char cast for tolower, add cctype
- mcp_server download_jobs: validate job_id for status/cancel actions
- list_command tests: unsigned char cast for isspace, add cctype include
2026-06-16 19:37:24 -04:00

123 lines
4.6 KiB
Meson

# Hybrid search integration tests - Catch2 tests requiring full daemon with embeddings
# Covers semantic search, hybrid search, RRF fusion with real infrastructure
if not catch2_dep.found()
message('Catch2 not found; skipping hybrid search integration tests.')
else
hybrid_search_integration_srcs = files(
'hybrid_search_integration_test.cpp',
)
symbol_search_integration_srcs = files(
'symbol_search_integration_test.cpp',
)
fsm_tuning_integration_srcs = files(
'fsm_tuning_benchmark_integration_test.cpp',
)
corpus_relevance_srcs = files(
'corpus_relevance_test.cpp',
)
dbg = (get_option('buildtype') == 'debug')
if (get_option('enable-integration-tests') or dbg) and (get_option('enable-daemon-integration') or dbg)
# Catch2 needs its main library
catch2_main_dep = dependency('catch2-with-main', required: false)
if not catch2_main_dep.found()
catch2_main_dep = dependency('Catch2WithMain', required: false, method: 'cmake')
endif
hybrid_search_integration_exe = executable('yams_hybrid_search_integration',
hybrid_search_integration_srcs,
include_directories: incs,
dependencies: [catch2_dep, catch2_main_dep, test_deps, catch2_trailing_link_deps],
cpp_args: ['-DYAMS_TESTING=1'],
install: false,
)
test('hybrid_search_integration',
hybrid_search_integration_exe,
suite: ['integration', 'search', 'hybrid', 'semantic', 'catch2'],
env: {
'YAMS_TEST_SAFE_SINGLE_INSTANCE': '1',
'TSAN_OPTIONS': _test_tsan_options,
# Note: Do NOT set YAMS_DISABLE_VECTORS - we need vector search for hybrid tests
},
is_parallel: false,
timeout: 300, # 5 minutes - allows time for daemon startup + embedding model load
# Allow exit 0 when all tests skip (Windows daemon shutdown not yet implemented)
args: ['--allow-running-no-tests'],
)
# Symbol search integration tests
symbol_search_integration_exe = executable('yams_symbol_search_integration',
symbol_search_integration_srcs,
include_directories: incs,
dependencies: [catch2_dep, catch2_main_dep, test_deps, catch2_trailing_link_deps],
cpp_args: ['-DYAMS_TESTING=1'],
install: false,
)
test('symbol_search_integration',
symbol_search_integration_exe,
suite: ['integration', 'search', 'symbols', 'kg', 'catch2'],
env: {
'YAMS_TEST_SAFE_SINGLE_INSTANCE': '1',
'YAMS_DISABLE_VECTORS': '1', # Don't need embeddings for symbol tests
'TSAN_OPTIONS': _test_tsan_options,
},
is_parallel: false,
timeout: 120, # 2 minutes - symbol extraction can be slow
# Allow exit 0 when all tests skip (Windows daemon shutdown not yet implemented)
args: ['--allow-running-no-tests'],
)
# FSM Tuning integration tests (Phase 4 of yams-7ez4)
fsm_tuning_integration_exe = executable('yams_fsm_tuning_integration',
fsm_tuning_integration_srcs,
include_directories: incs,
dependencies: [catch2_dep, catch2_main_dep, test_deps, catch2_trailing_link_deps],
cpp_args: ['-DYAMS_TESTING=1'],
install: false,
)
test('fsm_tuning_integration',
fsm_tuning_integration_exe,
suite: ['integration', 'search', 'fsm', 'tuning', 'benchmark', 'catch2'],
env: {
'YAMS_TEST_SAFE_SINGLE_INSTANCE': '1',
'TSAN_OPTIONS': _test_tsan_options,
# Some tests need embeddings for hybrid search validation
},
is_parallel: false,
timeout: 180, # 3 minutes - FSM tests run multiple search operations
# Allow exit 0 when all tests skip (Windows daemon shutdown not yet implemented)
args: ['--allow-running-no-tests'],
)
# Provable multi-corpus relevance gate (FTS completeness, collection isolation, path scoping)
corpus_relevance_exe = executable('yams_corpus_relevance',
corpus_relevance_srcs,
include_directories: incs,
dependencies: [catch2_dep, catch2_main_dep, test_deps, catch2_trailing_link_deps],
cpp_args: ['-DYAMS_TESTING=1'],
install: false,
)
test('corpus_relevance',
corpus_relevance_exe,
suite: ['integration', 'search', 'relevance', 'fts', 'catch2'],
env: {
'YAMS_TEST_SAFE_SINGLE_INSTANCE': '1',
'YAMS_DISABLE_VECTORS': '1', # keyword/FTS + metadata scoping; no embeddings needed
'TSAN_OPTIONS': _test_tsan_options,
},
is_parallel: false,
timeout: 180,
args: ['--allow-running-no-tests'],
)
else
message('hybrid_search_integration test disabled (enable with -Denable-daemon-integration=true).')
endif
endif