docs(evidence): publish curated-only workspace contract
This commit is contained in:
@@ -139,8 +139,14 @@ function evidenceSecretFile(name: string, contents: string): string {
|
||||
return path;
|
||||
}
|
||||
|
||||
function evidenceWorkspace(source: Record<string, unknown>, policy?: Record<string, unknown>) {
|
||||
return parseWorkspaceYaml(`${canonicalEvidenceWorkspace}\nevidence:\n source: ${JSON.stringify(source)}${
|
||||
function evidenceWorkspace(
|
||||
source: Record<string, unknown>,
|
||||
policy?: Record<string, unknown>,
|
||||
evidenceSchemaVersion?: number,
|
||||
) {
|
||||
return parseWorkspaceYaml(`${canonicalEvidenceWorkspace}\nevidence:${
|
||||
evidenceSchemaVersion === undefined ? "" : `\n schema_version: ${evidenceSchemaVersion}`
|
||||
}\n source: ${JSON.stringify(source)}${
|
||||
policy === undefined ? "" : `\n policy: ${JSON.stringify(policy)}`
|
||||
}\n`);
|
||||
}
|
||||
@@ -180,9 +186,10 @@ function evidenceRender(
|
||||
source: Record<string, unknown>,
|
||||
evidenceBinding: RuntimeBindings["evidence"] = { missing: [], values: {} },
|
||||
policy?: Record<string, unknown>,
|
||||
evidenceSchemaVersion?: number,
|
||||
) {
|
||||
return renderRuntimeConfig(
|
||||
evidenceWorkspace(source, policy),
|
||||
evidenceWorkspace(source, policy, evidenceSchemaVersion),
|
||||
{ ...directBindings, evidence: evidenceBinding },
|
||||
paths,
|
||||
evidenceContext,
|
||||
@@ -195,7 +202,7 @@ test("renders filesystem Evidence below the immutable revision content root with
|
||||
const yaml = evidenceRender({
|
||||
type: "filesystem",
|
||||
uri: "psd-clinical/evidence",
|
||||
});
|
||||
}, undefined, undefined, 2);
|
||||
const rendered = parse(yaml);
|
||||
|
||||
expect(rendered.runtime_identity.workspace_revision).toBe(evidenceRevision);
|
||||
@@ -203,7 +210,7 @@ test("renders filesystem Evidence below the immutable revision content root with
|
||||
sources: [{
|
||||
type: "filesystem",
|
||||
root: `/srv/registry/snapshots/${evidenceRevision}/psd-clinical/evidence`,
|
||||
patterns: ["**/*.md"],
|
||||
patterns: ["curated/**/*.md"],
|
||||
max_bytes: 10_485_760,
|
||||
}],
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user