mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-03-21 19:08:17 +08:00
feat: enhance search, ranking, reranker and CLI tooling across ccw and codex-lens
Major improvements to smart-search, chain-search cascade, ranking pipeline, reranker factory, CLI history store, codex-lens integration, and uv-manager. Simplify command-generator skill by inlining phases. Add comprehensive tests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -98,6 +98,23 @@ class TestANNIndex:
|
||||
assert ids[0] == 1 # ID of first vector
|
||||
assert distances[0] < 0.01 # Very small distance (almost identical)
|
||||
|
||||
@pytest.mark.skipif(
|
||||
not _hnswlib_available(),
|
||||
reason="hnswlib not installed"
|
||||
)
|
||||
def test_search_clamps_top_k_to_available_vectors(self, temp_db, sample_vectors, sample_ids):
|
||||
"""Search should clamp top_k to the loaded vector count."""
|
||||
from codexlens.semantic.ann_index import ANNIndex
|
||||
|
||||
index = ANNIndex(temp_db, dim=384)
|
||||
index.add_vectors(sample_ids[:3], sample_vectors[:3])
|
||||
|
||||
ids, distances = index.search(sample_vectors[0], top_k=10)
|
||||
|
||||
assert len(ids) == 3
|
||||
assert len(distances) == 3
|
||||
assert ids[0] == 1
|
||||
|
||||
@pytest.mark.skipif(
|
||||
not _hnswlib_available(),
|
||||
reason="hnswlib not installed"
|
||||
|
||||
Reference in New Issue
Block a user