feat: unify installation model catalog

This commit is contained in:
Codex
2026-09-02 18:45:33 +02:00
parent ae053961a3
commit 7b7927bfe5
169 changed files with 3696 additions and 4572 deletions
+22 -29
View File
@@ -86,26 +86,11 @@ for (const name of [
}
if (workspace.workspace?.id !== "task13-smoke") throw new Error("fixture workspace id changed");
if (workspace.semantic_index?.vector_store?.engine !== "qdrant") {
throw new Error("fixture workspace must use qdrant");
}
if (workspace.semantic_index?.vector_store?.collection !== workspace.workspace?.id) {
throw new Error("fixture workspace must dedicate one qdrant collection per workspace id");
}
if (workspace.semantic_index?.vector_store?.dimensions !== 1024) {
throw new Error("fixture workspace qdrant dimension changed");
}
if (workspace.semantic_index?.vector_store?.distance !== "cosine") {
throw new Error("fixture workspace qdrant distance changed");
}
if (workspace.semantic_index?.embedding?.provider !== "ollama_internal") {
throw new Error("fixture workspace must use internal ollama embeddings");
}
if (workspace.semantic_index?.embedding?.model !== "qwen3-embedding:0.6b") {
throw new Error("fixture workspace embedding model changed");
}
if (workspace.semantic_index?.embedding?.dimensions !== 1024) {
throw new Error("fixture workspace embedding dimension changed");
if (workspace.workspace?.schema_version !== 4) throw new Error("fixture workspace must use schema v4");
for (const forbidden of ["semantic_index", "llm_policy"]) {
if (Object.hasOwn(workspace, forbidden)) {
throw new Error(`fixture workspace must not own installation model configuration: ${forbidden}`);
}
}
if (!statSync(bundleSource).isFile()) {
@@ -139,28 +124,36 @@ if (profile === "local") {
throw new Error("server runtime fixture lacks one readable, read-only password-file bind");
}
accessSync(runtimePasswordSourceInput, constants.R_OK);
const piTargets = [
"/home/thoth/.pi/agent/auth.json",
const generatedPiTargets = [
"/home/thoth/.pi/agent/models.json",
"/home/thoth/.pi/agent/settings.json",
] as const;
const piParent = mounts.filter((mount: any) => mount.target === "/home/thoth/.pi");
if (piParent.length !== 1) throw new Error("core lacks exactly one Pi state mount");
for (const target of piTargets) {
for (const target of generatedPiTargets) {
const selected = mounts.filter((mount: any) => mount.target === target);
if (selected.length !== 1 || selected[0].type !== "bind" || !selected[0].read_only) {
throw new Error(`Pi fixture mount is not one generated read-only bind: ${target}`);
}
accessSync(selected[0].source, constants.R_OK);
if (profile === "local") {
if (piParent[0].type !== "volume" || selected.length !== 0) {
throw new Error(`local Pi fixture must come only from the projected state volume: ${target}`);
if (piParent[0].type !== "volume") {
throw new Error(`local Pi parent is not a state volume: ${target}`);
}
} else {
if (selected.length !== 1 || selected[0].type !== "bind" || !selected[0].read_only) {
throw new Error(`Pi fixture mount is not one read-only bind: ${target}`);
}
accessSync(selected[0].source, constants.R_OK);
const hidden = join(piParent[0].source, "agent", basename(target));
if (!statSync(hidden).isFile()) throw new Error(`server parent root lacks ${hidden}`);
}
}
const authTarget = "/home/thoth/.pi/agent/auth.json";
const authMounts = mounts.filter((mount: any) => mount.target === authTarget);
if (profile === "local") {
if (authMounts.length !== 0) {
throw new Error("local Pi auth must be projected into the state volume, not directly mounted");
}
} else if (authMounts.length !== 1 || authMounts[0].type !== "bind" || !authMounts[0].read_only) {
throw new Error("server Pi auth is not one independent read-only bind");
}
for (const [target, localVolume] of [
["/run/thothii-auth", "auth-runtime"],