fix: compare active registry state in acceptance negatives

This commit is contained in:
2026-08-11 16:21:58 +02:00
parent e06d31aeac
commit 01090b5be7
+5 -6
View File
@@ -552,13 +552,12 @@ async function executeChecks({ checks }) {
return results;
}
async function registryState(ctx) {
const repo = join(ctx.run.root, "installation", "registry", "repo");
const head = (await git(ctx, ["rev-parse", "HEAD"], { cwd: repo })).stdout.trim();
const statePath = join(ctx.run.root, "installation", "registry", "state", "active.json");
const active = JSON.parse(await readFile(statePath, "utf8"));
return {
head,
catalog: (await git(ctx, ["rev-parse", `HEAD:thoth-workspaces.yaml`], { cwd: repo })).stdout.trim(),
filesystemDescriptor: (await git(ctx, ["rev-parse", `HEAD:p11-filesystem/workspace.yaml`], { cwd: repo })).stdout.trim(),
evidenceTree: (await git(ctx, ["rev-parse", `HEAD:p11-filesystem/evidence`], { cwd: repo })).stdout.trim(),
head: active.head,
revisions: active.revisions.map((revision) => ({ id: revision.id, commit: revision.commit, blob: revision.blob })),
catalog: active.catalog ?? null,
};
}
function safeErrorEnvelope(response, code, status) {