610 lines
18 KiB
TypeScript
610 lines
18 KiB
TypeScript
import { mkdtempSync, rmSync, writeFileSync } from "node:fs";
|
|
import { tmpdir } from "node:os";
|
|
import { join } from "node:path";
|
|
import { afterEach, expect, test } from "vitest";
|
|
import { parse } from "yaml";
|
|
import {
|
|
renderRuntimeConfig,
|
|
type RuntimeBindings,
|
|
type RuntimePaths,
|
|
type SemanticRuntimeConfig,
|
|
} from "../src/workspaces/runtime-renderer.js";
|
|
import { supportsSessionRuntime } from "../src/workspaces/bindings.js";
|
|
import { parseWorkspaceYaml } from "../src/workspaces/schema.js";
|
|
|
|
const workspace = parseWorkspaceYaml(`workspace:
|
|
schema_version: 2
|
|
id: psd-clinical
|
|
name: Policlinico San Donato
|
|
language: it
|
|
dwh:
|
|
engine: postgres
|
|
database: postgres
|
|
schema: datawarehouse
|
|
supported_transports: [postgres_direct, rest_api]
|
|
semantic_index:
|
|
vector_store:
|
|
engine: pgvector
|
|
database: postgres
|
|
schema: vectors
|
|
collection: clinical_documents
|
|
dimensions: 768
|
|
distance: cosine
|
|
supported_transports: [pgvector_direct, rest_api]
|
|
embedding:
|
|
provider: ollama_compatible
|
|
model: nomic-embed-text-v2-moe
|
|
dimensions: 768
|
|
llm_policy:
|
|
allowed: [zai/glm-5.2]
|
|
`);
|
|
const workspaceV3 = parseWorkspaceYaml(`workspace:
|
|
schema_version: 3
|
|
id: psd-clinical
|
|
name: Policlinico San Donato
|
|
language: it
|
|
dwh:
|
|
engine: postgres
|
|
database: postgres
|
|
schema: datawarehouse
|
|
supported_transports: [postgres_direct, 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
|
|
llm_policy:
|
|
allowed: [zai/glm-5.2]
|
|
`);
|
|
const paths: RuntimePaths = {
|
|
sessions: "/data/workspaces/psd-clinical/sessions",
|
|
artifacts: "/data/workspaces/psd-clinical/artifacts",
|
|
indexes: "/data/workspaces/psd-clinical/indexes",
|
|
};
|
|
const semanticRuntime: SemanticRuntimeConfig = {
|
|
internalQdrantUrl: "http://qdrant:6333",
|
|
internalEmbeddingUrl: "http://embedding:11434",
|
|
internalEmbeddingModel: "qwen3-embedding:0.6b",
|
|
internalEmbeddingDimensions: 1024,
|
|
};
|
|
const legacyWorkspace = parseWorkspaceYaml(`workspace:
|
|
schema_version: 1
|
|
id: psd-clinical
|
|
name: Policlinico San Donato
|
|
language: it
|
|
dwh:
|
|
engine: postgres
|
|
database: postgres
|
|
schema: datawarehouse
|
|
supported_transports: [postgres_direct]
|
|
semantic_index:
|
|
vector_store:
|
|
engine: pgvector
|
|
collection: clinical_documents
|
|
dimensions: 768
|
|
distance: cosine
|
|
supported_transports: [pgvector_direct]
|
|
embedding:
|
|
provider: ollama_compatible
|
|
model: nomic-embed-text-v2-moe
|
|
dimensions: 768
|
|
llm_policy:
|
|
allowed: [zai/glm-5.2]
|
|
`);
|
|
|
|
const directBindings: RuntimeBindings = {
|
|
dwh: {
|
|
transport: "postgres_direct",
|
|
missing: [],
|
|
values: {
|
|
THT_WS_PSD_CLINICAL_DWH_HOST: "dwh.internal",
|
|
THT_WS_PSD_CLINICAL_DWH_PORT: "5432",
|
|
THT_WS_PSD_CLINICAL_DWH_USER: "thoth_reader",
|
|
THT_WS_PSD_CLINICAL_DWH_PASSWORD_FILE: "/run/secrets/dwh-password",
|
|
THT_WS_PSD_CLINICAL_DWH_TLS_CA_FILE: "/run/secrets/dwh-ca.pem",
|
|
},
|
|
},
|
|
vector: {
|
|
transport: "pgvector_direct",
|
|
missing: [],
|
|
values: {
|
|
THT_WS_PSD_CLINICAL_VECTOR_HOST: "vector.internal",
|
|
THT_WS_PSD_CLINICAL_VECTOR_PORT: "5432",
|
|
THT_WS_PSD_CLINICAL_VECTOR_USER: "vector_reader",
|
|
THT_WS_PSD_CLINICAL_VECTOR_PASSWORD_FILE: "/run/secrets/vector-password",
|
|
THT_WS_PSD_CLINICAL_VECTOR_TLS_CA_FILE: "/run/secrets/vector-ca.pem",
|
|
},
|
|
},
|
|
vectorWriter: { transport: "rest_api", missing: [], values: {} },
|
|
embedding: {
|
|
transport: "rest_api",
|
|
missing: [],
|
|
values: { THT_WS_PSD_CLINICAL_EMBEDDING_BASE_URL: "http://embedding.internal:11434" },
|
|
},
|
|
evidence: { missing: [], values: {} },
|
|
};
|
|
|
|
test("runtime support stays fail-closed for either SSH connector", () => {
|
|
expect(supportsSessionRuntime(directBindings)).toBe(true);
|
|
expect(supportsSessionRuntime({
|
|
...directBindings,
|
|
dwh: { ...directBindings.dwh, transport: "ssh_tunnel" },
|
|
})).toBe(false);
|
|
expect(supportsSessionRuntime({
|
|
...directBindings,
|
|
vector: { ...directBindings.vector, transport: "ssh_tunnel" },
|
|
})).toBe(false);
|
|
});
|
|
|
|
test("renders a direct PostgreSQL binding to the legacy harness shape", () => {
|
|
const yaml = renderRuntimeConfig(workspace, directBindings, paths, {
|
|
workspaceId: "psd-clinical",
|
|
workspaceRevision: "a".repeat(40),
|
|
});
|
|
const rendered = parse(yaml);
|
|
|
|
expect(rendered).toMatchObject({
|
|
runtime_identity: {
|
|
workspace_id: "psd-clinical",
|
|
workspace_revision: "a".repeat(40),
|
|
source_identity: "workspace://psd-clinical",
|
|
},
|
|
language: "it",
|
|
database: {
|
|
host: "dwh.internal",
|
|
port: 5432,
|
|
database: "postgres",
|
|
schema: "datawarehouse",
|
|
user: "thoth_reader",
|
|
password_file: "/run/secrets/dwh-password",
|
|
ssl_ca_file: "/run/secrets/dwh-ca.pem",
|
|
transport: "direct",
|
|
},
|
|
vector_db: {
|
|
host: "vector.internal",
|
|
database: "postgres",
|
|
schema: "vectors",
|
|
password_file: "/run/secrets/vector-password",
|
|
ssl_ca_file: "/run/secrets/vector-ca.pem",
|
|
},
|
|
embeddings: {
|
|
base_url: "http://embedding.internal:11434",
|
|
model: "nomic-embed-text-v2-moe",
|
|
dim: 768,
|
|
},
|
|
paths,
|
|
});
|
|
expect(yaml).toContain("type: postgres_direct");
|
|
expect(yaml).toContain("schema: datawarehouse");
|
|
});
|
|
|
|
test("refuses to render a v1 descriptor until an explicit migration creates v2", () => {
|
|
expect(() => renderRuntimeConfig(legacyWorkspace, directBindings, paths)).toThrow(/migrat/i);
|
|
});
|
|
|
|
test("fails closed for v3 runtime rendering and session support", () => {
|
|
expect(supportsSessionRuntime(directBindings)).toBe(true);
|
|
const rendered = parse(renderRuntimeConfig(workspaceV3, directBindings, paths, undefined, {}, semanticRuntime));
|
|
|
|
expect(rendered.resources).toMatchObject({
|
|
vector: {
|
|
engine: "qdrant",
|
|
base_url: "http://qdrant:6333",
|
|
collection: "psd-clinical",
|
|
},
|
|
embeddings: {
|
|
provider: "ollama_internal",
|
|
base_url: "http://embedding:11434",
|
|
model: "qwen3-embedding:0.6b",
|
|
dimensions: 1024,
|
|
},
|
|
});
|
|
expect(rendered).not.toHaveProperty("embeddings");
|
|
});
|
|
|
|
test("schema v3 runtime rendering never exposes external semantic endpoints from bindings", () => {
|
|
const rendered = parse(renderRuntimeConfig(workspaceV3, {
|
|
...directBindings,
|
|
vector: {
|
|
transport: "rest_api",
|
|
missing: [],
|
|
values: {
|
|
THT_WS_PSD_CLINICAL_VECTOR_BASE_URL: "https://vector.example.test",
|
|
THT_WS_PSD_CLINICAL_VECTOR_API_KEY_FILE: "/run/secrets/vector-api-key",
|
|
},
|
|
},
|
|
embedding: {
|
|
transport: "rest_api",
|
|
missing: [],
|
|
values: {
|
|
THT_WS_PSD_CLINICAL_EMBEDDING_BASE_URL: "https://embedding.example.test",
|
|
},
|
|
},
|
|
}, paths, undefined, {}, semanticRuntime));
|
|
|
|
expect(rendered.resources.vector).toMatchObject({
|
|
engine: "qdrant",
|
|
base_url: "http://qdrant:6333",
|
|
collection: "psd-clinical",
|
|
});
|
|
expect(rendered.resources.embeddings).toMatchObject({
|
|
provider: "ollama_internal",
|
|
base_url: "http://embedding:11434",
|
|
model: "qwen3-embedding:0.6b",
|
|
dimensions: 1024,
|
|
});
|
|
expect(rendered).not.toHaveProperty("embeddings");
|
|
expect(JSON.stringify(rendered)).not.toContain("vector.example.test");
|
|
expect(JSON.stringify(rendered)).not.toContain("embedding.example.test");
|
|
});
|
|
|
|
test("omits direct TLS fields when binding validation did not retain a file path", () => {
|
|
const dwhValues = { ...directBindings.dwh.values };
|
|
const vectorValues = { ...directBindings.vector.values };
|
|
delete dwhValues.THT_WS_PSD_CLINICAL_DWH_TLS_CA_FILE;
|
|
delete vectorValues.THT_WS_PSD_CLINICAL_VECTOR_TLS_CA_FILE;
|
|
const yaml = renderRuntimeConfig(workspace, {
|
|
...directBindings,
|
|
dwh: {
|
|
...directBindings.dwh,
|
|
values: dwhValues,
|
|
},
|
|
vector: {
|
|
...directBindings.vector,
|
|
values: vectorValues,
|
|
},
|
|
}, paths);
|
|
const rendered = parse(yaml);
|
|
|
|
expect(rendered.database).not.toHaveProperty("ssl_ca_file");
|
|
expect(rendered.vector_db).not.toHaveProperty("ssl_ca_file");
|
|
});
|
|
|
|
test("renders REST bindings through the legacy rest sections without secret values", () => {
|
|
const yaml = renderRuntimeConfig(workspace, {
|
|
...directBindings,
|
|
dwh: {
|
|
transport: "rest_api",
|
|
missing: [],
|
|
values: {
|
|
THT_WS_PSD_CLINICAL_DWH_BASE_URL: "https://dwh.example.test",
|
|
THT_WS_PSD_CLINICAL_DWH_API_KEY_FILE: "/run/secrets/dwh-api-key",
|
|
THT_WS_PSD_CLINICAL_DWH_TLS_CA_FILE: "/run/secrets/ca.pem",
|
|
},
|
|
},
|
|
vector: {
|
|
transport: "rest_api",
|
|
missing: [],
|
|
values: {
|
|
THT_WS_PSD_CLINICAL_VECTOR_BASE_URL: "https://vector.example.test",
|
|
THT_WS_PSD_CLINICAL_VECTOR_API_KEY_FILE: "/run/secrets/vector-api-key",
|
|
},
|
|
},
|
|
}, paths);
|
|
const rendered = parse(yaml);
|
|
|
|
expect(rendered).toMatchObject({
|
|
database: { transport: "rest", schema: "datawarehouse" },
|
|
rest: {
|
|
base_url: "https://dwh.example.test",
|
|
api_key_file: "/run/secrets/dwh-api-key",
|
|
ssl_ca_file: "/run/secrets/ca.pem",
|
|
},
|
|
vector_rest: {
|
|
base_url: "https://vector.example.test",
|
|
api_key_file: "/run/secrets/vector-api-key",
|
|
},
|
|
});
|
|
expect(yaml).not.toContain("\n api_key: ");
|
|
});
|
|
|
|
const evidenceSecretRoots: string[] = [];
|
|
|
|
afterEach(() => {
|
|
evidenceSecretRoots.splice(0).forEach((root) => rmSync(root, { recursive: true, force: true }));
|
|
});
|
|
|
|
function evidenceSecretFile(name: string, contents: string): string {
|
|
const root = mkdtempSync(join(tmpdir(), "tht-renderer-evidence-secret-"));
|
|
evidenceSecretRoots.push(root);
|
|
const path = join(root, name);
|
|
writeFileSync(path, contents, { mode: 0o600 });
|
|
return path;
|
|
}
|
|
|
|
function evidenceWorkspace(source: Record<string, unknown>, policy?: Record<string, unknown>) {
|
|
return parseWorkspaceYaml(`${canonicalEvidenceWorkspace}\nevidence:\n source: ${JSON.stringify(source)}${
|
|
policy === undefined ? "" : `\n policy: ${JSON.stringify(policy)}`
|
|
}\n`);
|
|
}
|
|
|
|
const canonicalEvidenceWorkspace = `workspace:
|
|
schema_version: 3
|
|
id: psd-clinical
|
|
name: Runtime Evidence
|
|
language: en
|
|
dwh:
|
|
engine: postgres
|
|
database: analytics
|
|
schema: mart
|
|
supported_transports: [postgres_direct]
|
|
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 evidenceRevision = "1".repeat(40);
|
|
const evidenceContext = {
|
|
workspaceId: "psd-clinical",
|
|
workspaceRevision: evidenceRevision,
|
|
revisionContentRoot: `/srv/registry/snapshots/${evidenceRevision}`,
|
|
};
|
|
|
|
function evidenceRender(
|
|
source: Record<string, unknown>,
|
|
evidenceBinding: RuntimeBindings["evidence"] = { missing: [], values: {} },
|
|
policy?: Record<string, unknown>,
|
|
) {
|
|
return renderRuntimeConfig(
|
|
evidenceWorkspace(source, policy),
|
|
{ ...directBindings, evidence: evidenceBinding },
|
|
paths,
|
|
evidenceContext,
|
|
{},
|
|
semanticRuntime,
|
|
);
|
|
}
|
|
|
|
test("renders filesystem Evidence below the immutable revision content root with default policy", () => {
|
|
const yaml = evidenceRender({
|
|
type: "filesystem",
|
|
uri: "workspace-content/psd-clinical/evidence",
|
|
});
|
|
const rendered = parse(yaml);
|
|
|
|
expect(rendered.runtime_identity.workspace_revision).toBe(evidenceRevision);
|
|
expect(rendered.evidence).toEqual({
|
|
sources: [{
|
|
type: "filesystem",
|
|
root: `/srv/registry/snapshots/${evidenceRevision}/workspace-content/psd-clinical/evidence`,
|
|
patterns: ["**/*.md"],
|
|
max_bytes: 10_485_760,
|
|
}],
|
|
});
|
|
expect(rendered.vector).toEqual({
|
|
max_chunk_chars: 4_000,
|
|
retain_published_generations: 3,
|
|
});
|
|
expect(yaml).not.toContain("/srv/registry/repo");
|
|
});
|
|
|
|
test("renders public HTTP Evidence with exact fractional-second timeouts and every policy limit", () => {
|
|
const rendered = parse(evidenceRender({
|
|
type: "http",
|
|
uris: ["https://evidence.example.test/guide.md"],
|
|
authentication: "none",
|
|
connect_timeout_ms: 1_001,
|
|
read_timeout_ms: 30_001,
|
|
max_bytes: 12_345,
|
|
max_redirects: 0,
|
|
allow_private_hosts: true,
|
|
max_cache_bytes: 67_890,
|
|
}, undefined, {
|
|
max_chunk_chars: 2_501,
|
|
retain_published_generations: 7,
|
|
}));
|
|
|
|
expect(rendered.evidence).toEqual({
|
|
sources: [{
|
|
type: "http",
|
|
urls: ["https://evidence.example.test/guide.md"],
|
|
connect_timeout: 1.001,
|
|
read_timeout: 30.001,
|
|
max_bytes: 12_345,
|
|
max_redirects: 0,
|
|
allow_private_hosts: true,
|
|
max_cache_bytes: 67_890,
|
|
}],
|
|
});
|
|
expect(rendered.vector).toEqual({
|
|
max_chunk_chars: 2_501,
|
|
retain_published_generations: 7,
|
|
});
|
|
});
|
|
|
|
test("renders signed HTTP Evidence as provenance plus a validated file path only", () => {
|
|
const canary = "SIGNED-URL-CANARY-CONTENT";
|
|
const signedFile = evidenceSecretFile("evidence-signed-urls.json", canary);
|
|
const yaml = evidenceRender({
|
|
type: "http",
|
|
uris: [
|
|
"https://evidence.example.test/guide.md",
|
|
"https://evidence.example.test/runbook.md",
|
|
],
|
|
authentication: "signed_urls_file",
|
|
}, {
|
|
missing: [],
|
|
values: { THT_WS_PSD_CLINICAL_EVIDENCE_SIGNED_URLS_FILE: signedFile },
|
|
});
|
|
|
|
expect(parse(yaml).evidence.sources).toEqual([{
|
|
type: "http",
|
|
provenance_urls: [
|
|
"https://evidence.example.test/guide.md",
|
|
"https://evidence.example.test/runbook.md",
|
|
],
|
|
signed_urls_file: signedFile,
|
|
connect_timeout: 5,
|
|
read_timeout: 30,
|
|
max_bytes: 10_485_760,
|
|
max_redirects: 5,
|
|
allow_private_hosts: false,
|
|
max_cache_bytes: 67_108_864,
|
|
}]);
|
|
expect(yaml).not.toContain(canary);
|
|
});
|
|
|
|
test("renders ambient S3 Evidence without credential keys", () => {
|
|
const rendered = parse(evidenceRender({
|
|
type: "s3",
|
|
uri: "s3://clinical-evidence/published/guides/",
|
|
credentials: "ambient",
|
|
region: "eu-west-1",
|
|
}));
|
|
|
|
expect(rendered.evidence.sources).toEqual([{
|
|
type: "s3",
|
|
bucket: "clinical-evidence",
|
|
prefix: "published/guides/",
|
|
region: "eu-west-1",
|
|
trusted_endpoint: false,
|
|
allow_private_endpoint: false,
|
|
allow_insecure_endpoint: false,
|
|
max_bytes: 10_485_760,
|
|
max_objects: 10_000,
|
|
max_pages: 100,
|
|
page_size: 1_000,
|
|
}]);
|
|
expect(JSON.stringify(rendered.evidence)).not.toMatch(/access_key|secret_key|session_token/);
|
|
});
|
|
|
|
test("renders static S3 Evidence with endpoint policy, limits, and file paths but no contents", () => {
|
|
const accessCanary = "ACCESS-CANARY-CONTENT";
|
|
const secretCanary = "SECRET-CANARY-CONTENT";
|
|
const tokenCanary = "TOKEN-CANARY-CONTENT";
|
|
const accessFile = evidenceSecretFile("evidence-access", accessCanary);
|
|
const secretFile = evidenceSecretFile("evidence-secret", secretCanary);
|
|
const tokenFile = evidenceSecretFile("evidence-token", tokenCanary);
|
|
const source = {
|
|
type: "s3",
|
|
uri: "s3://clinical-evidence/published/",
|
|
credentials: "static_files",
|
|
endpoint_url: "http://minio.internal:9000/",
|
|
region: "eu-central-1",
|
|
trusted_endpoint: true,
|
|
allow_private_endpoint: true,
|
|
allow_insecure_endpoint: true,
|
|
max_bytes: 222,
|
|
max_objects: 33,
|
|
max_pages: 4,
|
|
page_size: 5,
|
|
};
|
|
const values = {
|
|
THT_WS_PSD_CLINICAL_EVIDENCE_ACCESS_KEY_FILE: accessFile,
|
|
THT_WS_PSD_CLINICAL_EVIDENCE_SECRET_KEY_FILE: secretFile,
|
|
THT_WS_PSD_CLINICAL_EVIDENCE_SESSION_TOKEN_FILE: tokenFile,
|
|
};
|
|
const yaml = evidenceRender(source, { missing: [], values });
|
|
|
|
expect(parse(yaml).evidence.sources).toEqual([{
|
|
type: "s3",
|
|
bucket: "clinical-evidence",
|
|
prefix: "published/",
|
|
endpoint_url: "http://minio.internal:9000/",
|
|
region: "eu-central-1",
|
|
access_key_file: accessFile,
|
|
secret_key_file: secretFile,
|
|
session_token_file: tokenFile,
|
|
trusted_endpoint: true,
|
|
allow_private_endpoint: true,
|
|
allow_insecure_endpoint: true,
|
|
max_bytes: 222,
|
|
max_objects: 33,
|
|
max_pages: 4,
|
|
page_size: 5,
|
|
}]);
|
|
expect(yaml).not.toContain(accessCanary);
|
|
expect(yaml).not.toContain(secretCanary);
|
|
expect(yaml).not.toContain(tokenCanary);
|
|
|
|
const withoutToken = parse(evidenceRender(source, {
|
|
missing: [],
|
|
values: {
|
|
THT_WS_PSD_CLINICAL_EVIDENCE_ACCESS_KEY_FILE: accessFile,
|
|
THT_WS_PSD_CLINICAL_EVIDENCE_SECRET_KEY_FILE: secretFile,
|
|
},
|
|
})).evidence.sources[0];
|
|
expect(withoutToken).toMatchObject({ access_key_file: accessFile, secret_key_file: secretFile });
|
|
expect(withoutToken).not.toHaveProperty("session_token_file");
|
|
});
|
|
|
|
test("omits Evidence configuration and policy when the descriptor has no Evidence", () => {
|
|
const rendered = parse(renderRuntimeConfig(
|
|
workspaceV3,
|
|
directBindings,
|
|
paths,
|
|
evidenceContext,
|
|
{},
|
|
semanticRuntime,
|
|
));
|
|
|
|
expect(rendered).not.toHaveProperty("evidence");
|
|
expect(rendered).not.toHaveProperty("vector");
|
|
});
|
|
|
|
test.each([
|
|
{
|
|
source: {
|
|
type: "http", uris: ["https://evidence.example.test/guide.md"],
|
|
authentication: "signed_urls_file",
|
|
},
|
|
missing: "THT_WS_PSD_CLINICAL_EVIDENCE_SIGNED_URLS_FILE",
|
|
},
|
|
{
|
|
source: {
|
|
type: "s3", uri: "s3://clinical-evidence/published/", credentials: "static_files",
|
|
},
|
|
missing: "THT_WS_PSD_CLINICAL_EVIDENCE_SECRET_KEY_FILE",
|
|
},
|
|
])("rejects missing required Evidence binding $missing before rendering", ({ source, missing }) => {
|
|
expect(() => evidenceRender(source, { missing: [missing], values: {} })).toThrow(
|
|
"runtime configuration requires complete Evidence bindings",
|
|
);
|
|
});
|
|
|
|
test("is byte deterministic and revision-bound for descriptor-identical content-only commits", () => {
|
|
const source = {
|
|
type: "filesystem",
|
|
uri: "workspace-content/psd-clinical/evidence",
|
|
};
|
|
const first = evidenceRender(source);
|
|
expect(evidenceRender(source)).toBe(first);
|
|
|
|
const nextRevision = "2".repeat(40);
|
|
const next = renderRuntimeConfig(
|
|
evidenceWorkspace(source),
|
|
directBindings,
|
|
paths,
|
|
{
|
|
workspaceId: "psd-clinical",
|
|
workspaceRevision: nextRevision,
|
|
revisionContentRoot: `/srv/registry/snapshots/${nextRevision}`,
|
|
},
|
|
{},
|
|
semanticRuntime,
|
|
);
|
|
const firstParsed = parse(first);
|
|
const nextParsed = parse(next);
|
|
|
|
expect(next).not.toBe(first);
|
|
expect(nextParsed.runtime_identity.workspace_revision).toBe(nextRevision);
|
|
expect(nextParsed.evidence.sources[0].root).toBe(
|
|
`/srv/registry/snapshots/${nextRevision}/workspace-content/psd-clinical/evidence`,
|
|
);
|
|
expect(nextParsed.evidence.sources[0].root).not.toBe(firstParsed.evidence.sources[0].root);
|
|
});
|