fix: close task3 qdrant and config quality gaps

This commit is contained in:
2026-08-11 08:06:18 +02:00
parent 88d1790728
commit b7ea5443b3
8 changed files with 290 additions and 47 deletions
+29
View File
@@ -278,6 +278,35 @@ def test_vector_index_schema_json_rejects_incompatible_empty_collection(monkeypa
assert not [call for call in calls if call[1].endswith("/points/scroll")]
def test_vector_index_schema_json_maps_compatible_scroll_404(monkeypatch, tmp_path):
cfg = _qdrant_runtime_config(tmp_path)
_write_schema_artifacts(tmp_path)
keyword_indexes = {
"content_hash", "document_id", "kind", "record_key", "record_kind",
"vector_generation", "workspace_id", "workspace_revision",
}
calls = []
def request(method, url, **kwargs):
calls.append((method, url))
if method == "GET" and url.endswith("/collections/psd-clinical"):
return _Response(200, {"result": {
"config": {"params": {"vectors": {"size": 1024, "distance": "Cosine"}}},
"payload_schema": {key: {"data_type": "keyword"} for key in keyword_indexes},
}})
if method == "POST" and url.endswith("/points/scroll"):
return _Response(404, {"status": "error"})
raise AssertionError((method, url))
monkeypatch.setattr("requests.request", request)
response = CliRunner().invoke(app, ["vector", "index-schema", "--json", "-c", str(cfg)])
assert response.exit_code == 1
assert response.stdout == '{"code":"semantic_index_incompatible","status":"failed"}\n'
assert response.stderr == ""
assert not [call for call in calls if call[0] in {"PUT", "DELETE"}]
def test_vector_index_schema_json_maps_require_existing_delete_race(monkeypatch, tmp_path):
cfg = _qdrant_runtime_config(tmp_path)
_write_schema_artifacts(tmp_path)