feat: unify installation model catalog
This commit is contained in:
@@ -12,7 +12,7 @@ import type { RuntimeBindings } from "../src/workspaces/runtime-renderer.js";
|
||||
import { parseWorkspaceYaml, resolveDiagnosticUrl } from "../src/workspaces/schema.js";
|
||||
|
||||
const workspace = parseWorkspaceYaml(`workspace:
|
||||
schema_version: 3
|
||||
schema_version: 4
|
||||
id: psd-clinical
|
||||
name: Policlinico San Donato
|
||||
language: it
|
||||
@@ -22,18 +22,6 @@ dwh:
|
||||
schema: datawarehouse
|
||||
timeout_ms: 8000
|
||||
supported_transports: [postgres_direct, rest_api, ssh_tunnel]
|
||||
semantic_index:
|
||||
vector_store:
|
||||
engine: qdrant
|
||||
collection: psd-clinical
|
||||
dimensions: 1024
|
||||
distance: cosine
|
||||
embedding:
|
||||
provider: ollama_internal
|
||||
model: qwen3-embedding:0.6b
|
||||
dimensions: 1024
|
||||
llm_policy:
|
||||
allowed: [zai/glm-5.2]
|
||||
`);
|
||||
|
||||
const bindings: RuntimeBindings = {
|
||||
@@ -78,7 +66,7 @@ afterEach(() => {
|
||||
vi.restoreAllMocks();
|
||||
});
|
||||
|
||||
test("diagnoses schema-v3 DWH, internal Qdrant, and internal Ollama without semantic bindings", async () => {
|
||||
test("diagnoses workspace-v4 DWH plus installation-derived Qdrant and Ollama", async () => {
|
||||
const adapters = successfulAdapters();
|
||||
const result = await diagnose(adapters)(workspace, bindings, { writeProbe: false });
|
||||
|
||||
@@ -139,7 +127,7 @@ test("reports only sanitized DWH and Evidence binding names before network diagn
|
||||
expect(adapters.inspectQdrant).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
test("keeps schema-v3 DWH SSH diagnostic-only and runtime-inactive", async () => {
|
||||
test("keeps workspace-v4 DWH SSH diagnostic-only and runtime-inactive", async () => {
|
||||
const adapters = successfulAdapters();
|
||||
const result = await diagnose(adapters)(workspace, {
|
||||
...bindings,
|
||||
@@ -152,9 +140,9 @@ test("keeps schema-v3 DWH SSH diagnostic-only and runtime-inactive", async () =>
|
||||
expect(adapters.probeConnector).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
test("uses the schema-v3 declared DWH REST diagnostic and auth policy", async () => {
|
||||
test("uses the workspace-v4 declared DWH REST diagnostic and auth policy", async () => {
|
||||
const restWorkspace = parseWorkspaceYaml(`workspace:
|
||||
schema_version: 3
|
||||
schema_version: 4
|
||||
id: psd-clinical
|
||||
name: REST workspace
|
||||
language: en
|
||||
@@ -163,16 +151,12 @@ dwh:
|
||||
database: warehouse
|
||||
schema: datawarehouse
|
||||
supported_transports: [rest_api]
|
||||
semantic_index:
|
||||
vector_store: { engine: qdrant, collection: psd-clinical, dimensions: 1024, distance: cosine }
|
||||
embedding: { provider: ollama_internal, model: qwen3-embedding:0.6b, dimensions: 1024 }
|
||||
diagnostics:
|
||||
dwh_rest:
|
||||
method: POST
|
||||
path: /rpc/ping
|
||||
auth: bearer
|
||||
response: { database: database, schema: schema }
|
||||
llm_policy: { allowed: [zai/glm-5.2] }
|
||||
`);
|
||||
const adapters = successfulAdapters();
|
||||
const result = await diagnose(adapters)(restWorkspace, {
|
||||
@@ -423,7 +407,7 @@ test("uses a REST secret only as a header and redacts it from failed diagnostics
|
||||
const canary = "CANARY-REST-AUTH-SECRET";
|
||||
await writeFile(credentialFile, canary);
|
||||
const restDescriptor = parseWorkspaceYaml(`workspace:
|
||||
schema_version: 3
|
||||
schema_version: 4
|
||||
id: psd-clinical
|
||||
name: REST auth
|
||||
language: en
|
||||
@@ -432,16 +416,12 @@ dwh:
|
||||
database: warehouse
|
||||
schema: datawarehouse
|
||||
supported_transports: [rest_api]
|
||||
semantic_index:
|
||||
vector_store: { engine: qdrant, collection: psd-clinical, dimensions: 1024, distance: cosine }
|
||||
embedding: { provider: ollama_internal, model: qwen3-embedding:0.6b, dimensions: 1024 }
|
||||
diagnostics:
|
||||
dwh_rest:
|
||||
method: GET
|
||||
path: /health
|
||||
auth: bearer
|
||||
response: { database: database, schema: schema }
|
||||
llm_policy: { allowed: [zai/glm-5.2] }
|
||||
`);
|
||||
const fetchMock = vi.fn()
|
||||
.mockResolvedValueOnce(new Response("upstream CANARY-REST-AUTH-SECRET", { status: 503 }))
|
||||
|
||||
Reference in New Issue
Block a user