36 lines
1.6 KiB
TypeScript
36 lines
1.6 KiB
TypeScript
// @vitest-environment node
|
|||
|
|
import { existsSync, readFileSync } from "node:fs";
|
||
|
|
import { spawnSync } from "node:child_process";
|
||
|
|
import { expect, it } from "vitest";
|
||
|
|
|
||
|
|
// 현재 ASR 실패를 유지한 채, 이번 exact-byte 승인 기록이 없으면 먼저 RED가 된다.
|
||
|
|
it("v0.2.5 exact-byte owner approval record exists with the exact statement", () => {
|
||
|
|
const path = ".agent/RELEASE-APPROVAL-v0.2.5.json";
|
||
|
|
expect(existsSync(path), "exact approval record is absent").toBe(true);
|
||
|
|
const approval = JSON.parse(readFileSync(path, "utf8"));
|
||
|
|
expect(approval.statement).toBe("승인합니다. 이대로 진행하세요");
|
||
|
|
expect(approval.owner).toBe("Oz");
|
||
|
|
expect(approval.timestampUtc).toBe("2026-10-14T11:29:51Z");
|
||
|
|
expect(approval.productOwnerReleaseApproval).toBe(true);
|
||
|
|
expect(approval.humanListeningAcceptance).toBe(true);
|
||
|
|
expect(approval.legalPrivacyClearance).toBe(false);
|
||
|
|
});
|
||
|
|
|
||
|
|
// npm test의 릴리스 판정은 Python의 동일 CLI를 실행하므로 별도 우회 gate가 없다.
|
||
|
|
it("release contract is green only through valid exact-byte owner listening approval", () => {
|
||
|
|
const result = spawnSync("python3", ["scripts/release_approval.py"], {
|
||
|
|
encoding: "utf8",
|
||
|
|
});
|
||
|
|
expect(result.status, result.stdout + result.stderr).toBe(0);
|
||
|
|
expect(JSON.parse(result.stdout)).toMatchObject({
|
||
|
|
passed: true,
|
||
|
|
acceptancePath: "exact-byte-owner-listening-approval",
|
||
|
|
automatedEmptyAsrPassed: false,
|
||
|
|
productOwnerReleaseApproval: true,
|
||
|
|
humanListeningAcceptance: true,
|
||
|
|
legalPrivacyClearance: false,
|
||
|
|
reviewBundleSha256:
|
||
|
|
"bb2e974b652df43db4a1f2a59716836e2c521839c724b34d4b71c1b40c3322e5",
|
||
|
|
});
|
||
|
|
});
|