Skip to content

test coverage & CI gaps: search no-Lance error path, resolve no-match, installer migration, ranking, heavy-gating #358

Description

@HumanBean17

Summary

Several high-value behaviours are untested or only run outside the CI merge gate.

Gaps (confirmed)

  • search real no-Lance error path is untested. Every search test monkeypatches run_search (e.g. test_mcp_v2.py:120,128,136,569,…) — the genuine except Exception envelope (mcp_v2.py:986) never runs in CI. Violates README rule Add Cursor rules and agent settings for CLI agents #3 (test the contract without LanceDB). A regression turning the graceful failure into a traceback would ship green.
  • resolve "no match" path untested (only many-match + empty-string paths covered).
  • Installer upgrade / config-schema migration untested. handle_rerun (installer.py:682) is tested for existing-config and no-config, but not for an older config needing keys seeded/migrated — a breaking config change would silently corrupt installs.
  • Ranking / RRF beyond a single unit test (test_search_lancedb.py::test_rrf_merge_weights_second_list_by_row) — no multi-table RRF, score ordering, or tie-breaking coverage for search's core value-prop.
  • Heavy-gating: test_lancedb_e2e.py, test_vectors_progress.py, and test_installer_integration.py are the only coverage for the vectors flow, the concurrent-optimize race guard (Retryable commit conflict), and real install indexing — none run in CI without JAVA_CODEBASE_RAG_RUN_HEAVY=1.

Impact

Real error envelopes and the vectors flow are effectively unverified by the merge gate.

Highest-value tests to add

  1. search with no Lance index present (no monkeypatch) → assert success is False, non-empty message, no traceback; prove find/describe/neighbors still succeed against the same graph.
  2. resolve unknown identifier → success is False, empty candidates.
  3. Installer config-migration on re-run after upgrade (old-schema config → keys seeded, $version bumped, user selections preserved).
  4. Promote at least a smoke version of the vectors flow + the concurrent-optimize race guard into CI (or a nightly).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingworkflow

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions