ConusAI vendor v0.1.0-beta.114
ci / gate (push) Waiting to run

This commit is contained in:
ConusAI vendor v0.1.0-beta.114
2026-11-14 09:56:45 +00:00
commit 1ce8d23c35
867 changed files with 122104 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
// SPDX-License-Identifier: LicenseRef-ConusAI-Template-1.0
// Retrieval is one platform service (ADR-061, RAG R9): the knowledge module's backend is the platform's
// knowledge service, an app keeps no vector store of its own, and a deployment that still names the old
// backend is told so by name instead of quietly getting another one.
import { readFileSync } from "node:fs"
import { KNOWLEDGE_BACKEND_VAR, KNOWLEDGE_BACKENDS, knowledgeBackendOf } from "@app/config"
import { describe, expect, it } from "vitest"
const read = (path: string): string => readFileSync(new URL(`../${path}`, import.meta.url), "utf8")
describe("the knowledge backend", () => {
it("is the platform's by default", () => {
expect(knowledgeBackendOf({})).toBe("platform")
expect(knowledgeBackendOf({ KNOWLEDGE_BACKEND: "" })).toBe("platform")
expect(knowledgeBackendOf({ KNOWLEDGE_BACKEND: " Platform " })).toBe("platform")
})
it("has no local backend to choose, and refuses the retired one by the variable's name", () => {
expect(KNOWLEDGE_BACKENDS).toEqual(["platform"])
expect(() => knowledgeBackendOf({ KNOWLEDGE_BACKEND: "vectors" })).toThrow(KNOWLEDGE_BACKEND_VAR)
})
it("leaves no vector store in the apps, their dependencies or the deployment contract", () => {
for (const file of [
"apps/web/src/server/ports.ts",
"apps/worker/src/ports.ts",
"apps/web/package.json",
"apps/worker/package.json",
"pnpm-workspace.yaml",
"compose.dev.yaml",
".env.example",
]) {
expect(read(file), file).not.toMatch(/qdrant|VECTOR_STORE|pgvector/i)
}
})
})