fix: tighten internal semantic compose contracts
This commit is contained in:
@@ -40,6 +40,8 @@ for (const service of [qdrant, embedding, modelInit]) {
|
||||
}
|
||||
if ((qdrant.expose || []).join(",") !== "6333") throw new Error("qdrant must expose only 6333");
|
||||
if ((embedding.expose || []).join(",") !== "11434") throw new Error("embedding must expose only 11434");
|
||||
if (!qdrant.healthcheck) throw new Error("qdrant must define a healthcheck");
|
||||
if (!embedding.healthcheck) throw new Error("embedding must define a healthcheck");
|
||||
if (qdrant.image !== "qdrant/qdrant:v1.18.2@sha256:75eab8c4ba42096724fdcfde8b4de0b5713d529dde32f285a1f86fdcb2c9e50c") {
|
||||
throw new Error("qdrant image must be pinned by version and digest");
|
||||
}
|
||||
@@ -72,6 +74,9 @@ if (depends.qdrant?.condition !== "service_healthy") {
|
||||
if (depends["embedding-model-init"]?.condition !== "service_completed_successfully") {
|
||||
throw new Error("core must wait for embedding-model-init success");
|
||||
}
|
||||
if (modelInit.depends_on?.embedding?.condition !== "service_healthy") {
|
||||
throw new Error("embedding-model-init must wait for embedding health");
|
||||
}
|
||||
if (JSON.stringify(embedding).includes('"devices"')) {
|
||||
throw new Error("base embedding service must stay CPU-only");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user