fix(evidence): validate curated runtime corpus
This commit is contained in:
@@ -442,6 +442,26 @@ test("rejects a schema-versioned Evidence layout that acquires source documents
|
||||
}, /curated/i);
|
||||
});
|
||||
|
||||
test.each(["curated/**/*.yaml", "curated/**"])(
|
||||
"rejects a schema-versioned Evidence layout that uses the non-canonical curated pattern %s",
|
||||
(pattern) => {
|
||||
expectSafeEvidenceError({
|
||||
...withEvidence({
|
||||
type: "filesystem",
|
||||
uri: "psd-clinical/evidence",
|
||||
}),
|
||||
evidence: {
|
||||
schema_version: 2,
|
||||
source: {
|
||||
type: "filesystem",
|
||||
uri: "psd-clinical/evidence",
|
||||
patterns: [pattern],
|
||||
},
|
||||
},
|
||||
}, /curated\/\*\*\/\*\.md/i);
|
||||
},
|
||||
);
|
||||
|
||||
test("keeps evidence optional on schema v3", () => {
|
||||
expect(validateWorkspaceDescriptor(validWorkspaceObject())).not.toHaveProperty("evidence");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user