Skip to content

test(absence): fix graph-only (macOS Intel) + Windows CI#406

Merged
HumanBean17 merged 1 commit into
masterfrom
fix/absence-ci-graph-only-windows
Jul 8, 2026
Merged

test(absence): fix graph-only (macOS Intel) + Windows CI#406
HumanBean17 merged 1 commit into
masterfrom
fix/absence-ci-graph-only-windows

Conversation

@HumanBean17

Copy link
Copy Markdown
Owner

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 makes lexical_mode = run_search is None (mcp_v2.py:895) evaluate False, forcing the semantic path → _get_sentence_transformer (line 952) → ModuleNotFoundError: sentence_transformers on graph-only installs where the vector trio is gated off by PEP 508 markers. Result: success=False, so absence is never set.

Windows: _find_symbol_with_edges ran MATCH (s:Symbol)--() ... LIMIT 1 with no WHERE s.resolved. Kùzu's first row is platform-nondeterministic, and on Windows it returned a phantom/external symbol → diagnose classified it external_dependency (external-wins) instead of the expected refine_query.

Fixes

  • macOS Intel: add the repo's needs_vectors skipif (mirrors test_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 by test_absence_diagnosis.py unit tests.
  • Windows: add WHERE s.resolved = true (the codebase idiom, absence_diagnosis.py:526) to _find_symbol_with_edges so it always picks a genuine project symbol.

Verification

  • Local (darwin ARM, vectors present): the 2 affected files pass — 36 passed (the needs_vectors tests run here; the resolved-symbol fixture yields refine_query).
  • Cross-platform (macOS Intel / Windows) validated by CI on this PR.

🤖 Generated with Claude Code

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>
@HumanBean17 HumanBean17 merged commit b7d9b14 into master Jul 8, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant