feat: pristine harness JSON interfaces and require-existing semantic mode (P2)
This commit is contained in:
@@ -113,6 +113,61 @@ def test_signed_http_file_resolves_in_memory_and_preserves_provenance_order(tmp_
|
||||
assert_no_canaries(repr(adapter))
|
||||
|
||||
|
||||
def test_qdrant_runtime_config_keeps_require_existing_and_http_policy_fields(tmp_path):
|
||||
path = tmp_path / "runtime.yaml"
|
||||
path.write_text(
|
||||
yaml.safe_dump(
|
||||
{
|
||||
"runtime_identity": {
|
||||
"workspace_id": "psd-clinical",
|
||||
"workspace_revision": "a" * 40,
|
||||
},
|
||||
"dwh": {
|
||||
"type": "postgres_direct",
|
||||
"connection": {
|
||||
"database": "analytics",
|
||||
"schema": "public",
|
||||
"user": "reader",
|
||||
"password": "secret",
|
||||
},
|
||||
},
|
||||
"vectors": {
|
||||
"type": "qdrant",
|
||||
"base_url": "http://qdrant:6333",
|
||||
"collection": "psd-clinical",
|
||||
"collection_lifecycle": "require_existing",
|
||||
},
|
||||
"embeddings": {
|
||||
"provider": "ollama_internal",
|
||||
"base_url": "http://embedding:11434",
|
||||
"model": "qwen3-embedding:0.6b",
|
||||
"dim": 1024,
|
||||
},
|
||||
"evidence": {
|
||||
"sources": [
|
||||
{
|
||||
"type": "http",
|
||||
"urls": ["https://evidence.example.test/guide.md"],
|
||||
"allow_private_hosts": True,
|
||||
"max_redirects": 2,
|
||||
"max_cache_bytes": 1234,
|
||||
}
|
||||
]
|
||||
},
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
cfg = load_config(path)
|
||||
rendered = cfg.model_dump(mode="json")
|
||||
|
||||
assert cfg.vectors.collection_lifecycle == "require_existing"
|
||||
assert rendered["vectors"]["collection_lifecycle"] == "require_existing"
|
||||
assert rendered["evidence"]["sources"][0]["allow_private_hosts"] is True
|
||||
assert rendered["evidence"]["sources"][0]["max_redirects"] == 2
|
||||
assert rendered["evidence"]["sources"][0]["max_cache_bytes"] == 1234
|
||||
|
||||
|
||||
def test_signed_http_file_requires_explicit_provenance_urls(tmp_path):
|
||||
secret_file = tmp_path / "signed-urls.json"
|
||||
secret_file.write_text(json.dumps([
|
||||
|
||||
Reference in New Issue
Block a user