test(absence): fix graph-only (macOS Intel) + Windows CI#406
Merged
Conversation
Two test-only fixes; no production behavior change. Master went red on macOS Intel + Windows after #405 merged (those platforms were never exercised by these new tests before merge). macOS Intel (graph-only): the 4 search integration tests monkeypatch mcp_v2.run_search, which makes `lexical_mode = run_search is None` (mcp_v2.py:895) False, forcing the semantic path -> _get_sentence_transformer -> ModuleNotFoundError('sentence_transformers') on graph-only installs where the vector trio is gated off. Add the repo's needs_vectors skipif (mirrors test_mcp_v2.py:35-48) so they skip where the vector stack is absent. The absence classifier itself stays covered by test_absence_diagnosis.py unit tests on every platform. Windows: _find_symbol_with_edges ran `MATCH (s:Symbol)--() ... LIMIT 1` with no filter on s.resolved, so Kùzu's nondeterministic first row could be a phantom/external symbol -> diagnose classifies it external_dependency (external-wins precedence) instead of the expected refine_query. Add `WHERE s.resolved = true` (the codebase idiom, absence_diagnosis.py:526) to guarantee a genuine project symbol on every platform. Co-Authored-By: Claude <noreply@anthropic.com>
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.
Master went red on macOS Intel and Windows after #405 merged — those platforms were never exercised by the new absence integration tests before merge. Two test-only fixes; no production behavior change.
Root causes
macOS Intel (graph-only, no torch): the 4 search integration tests monkeypatch
mcp_v2.run_search. That makeslexical_mode = run_search is None(mcp_v2.py:895) evaluate False, forcing the semantic path →_get_sentence_transformer(line 952) →ModuleNotFoundError: sentence_transformerson graph-only installs where the vector trio is gated off by PEP 508 markers. Result:success=False, soabsenceis never set.Windows:
_find_symbol_with_edgesranMATCH (s:Symbol)--() ... LIMIT 1with noWHERE s.resolved. Kùzu's first row is platform-nondeterministic, and on Windows it returned a phantom/external symbol →diagnoseclassified itexternal_dependency(external-wins) instead of the expectedrefine_query.Fixes
needs_vectorsskipif (mirrorstest_mcp_v2.py:35-48) to the 4 search tests. They skip where the vector stack is absent; the absence classifier stays fully covered on every platform bytest_absence_diagnosis.pyunit tests.WHERE s.resolved = true(the codebase idiom,absence_diagnosis.py:526) to_find_symbol_with_edgesso it always picks a genuine project symbol.Verification
needs_vectorstests run here; the resolved-symbol fixture yieldsrefine_query).🤖 Generated with Claude Code