fix: tighten evidence artifact guarantees

This commit is contained in:
2026-08-09 20:12:42 +02:00
parent 212c973e3b
commit ba7596c2dd
4 changed files with 64 additions and 8 deletions
+5 -1
View File
@@ -1013,13 +1013,17 @@ test("snapshots canonical Evidence artifacts at the active commit without copyin
const committedDescriptor = parseWorkspaceYaml(await gitOutput(remote.source, [
"show", `${remote.initialCommit}:workspaces/psd-clinical.yaml`,
])) as CanonicalWorkspace;
const committedBlob = await gitOutput(remote.source, [
"rev-parse", `${remote.initialCommit}:workspaces/psd-clinical.yaml`,
]);
expect(active.revision.blob).toBe(committedBlob);
expect(expectedFiles["psd-clinical.yaml"]).toBe(serializeWorkspaceYaml(committedDescriptor));
expect(readdirSync(snapshotDirectory).sort()).toEqual([
"psd-clinical.env.example", "psd-clinical.md", "psd-clinical.yaml", "snapshot.json",
]);
expect(manifest.head).toBe(remote.initialCommit);
expect(manifest.revisions[0]).toMatchObject({
id: "psd-clinical", commit: remote.initialCommit, blob: active.revision.blob,
id: "psd-clinical", commit: remote.initialCommit, blob: committedBlob,
});
expect(Object.keys(manifest.files).sort()).toEqual(Object.keys(expectedFiles).sort());
for (const [name, contents] of Object.entries(expectedFiles)) {