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; return results;
} }
async function registryState(ctx) { async function registryState(ctx) {
const repo = join(ctx.run.root, "installation", "registry", "repo"); const statePath = join(ctx.run.root, "installation", "registry", "state", "active.json");
const head = (await git(ctx, ["rev-parse", "HEAD"], { cwd: repo })).stdout.trim(); const active = JSON.parse(await readFile(statePath, "utf8"));
return { return {
head, head: active.head,
catalog: (await git(ctx, ["rev-parse", `HEAD:thoth-workspaces.yaml`], { cwd: repo })).stdout.trim(), revisions: active.revisions.map((revision) => ({ id: revision.id, commit: revision.commit, blob: revision.blob })),
filesystemDescriptor: (await git(ctx, ["rev-parse", `HEAD:p11-filesystem/workspace.yaml`], { cwd: repo })).stdout.trim(), catalog: active.catalog ?? null,
evidenceTree: (await git(ctx, ["rev-parse", `HEAD:p11-filesystem/evidence`], { cwd: repo })).stdout.trim(),
}; };
} }
function safeErrorEnvelope(response, code, status) { function safeErrorEnvelope(response, code, status) {