feat: complete catalog sensitivity enhancements

This commit is contained in:
Codex
2026-09-04 15:11:18 +02:00
parent b891246664
commit 7b1d69a65b
72 changed files with 33866 additions and 358 deletions
+42 -7
View File
@@ -70,17 +70,52 @@ test("accepts the evidence schema version materialized by the backend", async ()
})));
await expect(getWorkspace("psd-clinical")).resolves.toEqual({
workspace: {
...persistedWorkspace,
evidence: {
source: persistedWorkspace.evidence.source,
policy: persistedWorkspace.evidence.policy,
},
},
workspace: persistedWorkspace,
revision,
});
});
test("validates a workspace read from the backend without losing its Evidence schema version", async () => {
const persistedWorkspace = {
...workspace,
evidence: {
schema_version: 1,
source: {
type: "filesystem",
uri: "psd-clinical/evidence",
patterns: ["curated/**/*.md"],
max_bytes: 10 * 1024 * 1024,
},
policy: { max_chunk_chars: 5000, retain_published_generations: 3 },
},
};
let validationRequest: unknown;
server.use(
http.get("/api/workspaces/psd-clinical", () => HttpResponse.json({
workspace: persistedWorkspace,
revision,
})),
http.post("/api/workspaces/validate", async ({ request }) => {
validationRequest = await request.json();
return HttpResponse.json({
workspace: persistedWorkspace,
contract: {},
activatable: true,
diagnostics: [],
authentication: {
ready: true,
mode: "local",
checks: [{ level: "info", code: "auth_ready", message: "Authentication is ready." }],
},
});
}),
);
const loaded = await getWorkspace("psd-clinical");
await expect(validateWorkspace(loaded.workspace)).resolves.toMatchObject({ activatable: true });
expect(validationRequest).toEqual({ workspace: persistedWorkspace });
});
test("decodes runtime requirements but rejects any secret value returned by the server", async () => {
server.use(http.get(
"/api/workspaces/psd-clinical/runtime-configuration",