fix(evidence): validate curated runtime corpus
This commit is contained in:
@@ -207,6 +207,7 @@ test("renders filesystem Evidence below the immutable revision content root with
|
||||
|
||||
expect(rendered.runtime_identity.workspace_revision).toBe(evidenceRevision);
|
||||
expect(rendered.evidence).toEqual({
|
||||
schema_version: 2,
|
||||
sources: [{
|
||||
type: "filesystem",
|
||||
root: `/srv/registry/snapshots/${evidenceRevision}/psd-clinical/evidence`,
|
||||
|
||||
@@ -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