Files
clean-architecture-frontend…/scripts/lib/test-evidence-artifact.ts
DongHyeonka 7679ce6592 revert: #55 되돌림(411c9338)을 되돌려 그룹 C 검사기 변경을 다시 넣는다
This reverts commit 411c9338c6.

문제: #55(b4895894)가 main run 376의 FE-GATE-030(browser file/storage
제거 드릴)을 깨서 411c9338(#64)로 통째로 되돌렸다. #55의 검사기 진단과
시험 빈틈 고침 12커밋이 main에 없다.

고른 방법: 되돌림을 되돌려 #55를 그대로 다시 넣고, 드릴을 깬 원인은
다음 커밋에서 따로 고친다. 리뷰어가 이 커밋이 #55와 같은지 트리로 볼 수
있다. 이 커밋의 트리는 b4895894 트리에 그 뒤 main에 들어온 #63·#65만
더한 것이다(git diff b4895894 <이 커밋>: docs/ledger 두 파일,
cross-context-invalidation adapter 한 파일과 시험 두 파일).
버린 대안: #55 커밋 12개 cherry-pick. 71606ff1 merge의 충돌 해소분을
다시 풀어야 하고 결과 트리를 b4895894와 대조하기 어렵다.

위험·한계: 이 커밋만으로는 main 단계의 FE-GATE-030이 run 376처럼
실패한다(같은 트리 내용). PR 단계 게이트는 돈다.

검증: 다음 커밋 본문에 적는다. 그 커밋의 새 단언을 이 커밋의 검사기에
돌리면 실패한다(RED).

Refs: #55, #64
2026-11-19 16:32:00 +09:00

39 lines
1.3 KiB
TypeScript

import { z } from "zod";
export const testEvidenceReportSchema = z
.object({
schemaVersion: z.literal(2),
sourceRoot: z.string().min(1),
status: z.enum(["PASS", "FAIL"]),
facts: z
.object({
scannedFiles: z.number().int().nonnegative(),
visualBaselines: z.number().int().nonnegative(),
sharedScenarios: z.number().int().nonnegative(),
declaredScenarioExecutions: z.number().int().nonnegative(),
executedScenarioExecutions: z.number().int().nonnegative(),
// 1112/03-03. The Playwright configs the forbidOnly rule read.
playwrightConfigs: z.array(z.string().min(1)).optional(),
})
.strict(),
failures: z.array(z.string()),
})
.strict()
.superRefine((report, context) => {
const passed = report.status === "PASS";
if (passed !== (report.failures.length === 0)) {
context.addIssue({ code: "custom", path: ["status"], message: "status must agree with failures" });
}
if (
passed &&
report.facts.declaredScenarioExecutions !==
report.facts.executedScenarioExecutions
) {
context.addIssue({
code: "custom",
path: ["facts", "executedScenarioExecutions"],
message: "PASS requires exact declared/executed scenario agreement",
});
}
});