fix: complete TechLog migration evidence

This commit is contained in:
DongHyeonka
2026-08-16 04:55:52 +09:00
parent 6c2780b7a7
commit 3a7c5deca0
81 changed files with 1492 additions and 345 deletions
+23 -2
View File
@@ -192,14 +192,35 @@ describe("CI gate contract", () => {
expect(contract.commands).toHaveLength(81);
expect(contract.gates.reduce((total, gate) => total + gate.commandIds.length, 0)).toBe(93);
expect(contract.commands.filter(({ expect }) => expect === "fail")).toHaveLength(23);
expect(contract.gates.reduce((total, gate) => total + gate.evidenceArtifactIds.length, 0)).toBe(85);
expect(contract.artifacts).toHaveLength(105);
expect(contract.gates.reduce((total, gate) => total + gate.evidenceArtifactIds.length, 0)).toBe(106);
expect(contract.artifacts).toHaveLength(126);
expect(contract.stages).toHaveLength(5);
expect(contract.retention.classes).toHaveLength(5);
expect(index.gates.get("FE-GATE-015")?.commandIds).toHaveLength(2);
expect(index.gates.get("FE-GATE-020")?.name).toBe("removability");
});
it("rejects accessibility evidence registrations that drift from the installed route scope", async () => {
const candidate = JSON.parse(
JSON.stringify(await loadCiGateContract(process.cwd())),
) as Record<string, any>;
const gate = candidate.gates.find(
(entry: Record<string, any>) => entry.id === "FE-GATE-009",
);
const artifactId =
"artifact-artifacts-tests-a11y-manual-TECH-LOG-HOME-md";
candidate.artifacts = candidate.artifacts.filter(
(entry: Record<string, any>) => entry.id !== artifactId,
);
gate.evidenceArtifactIds = gate.evidenceArtifactIds.filter(
(id: string) => id !== artifactId,
);
expect(() =>
parseCiGateContract(candidate, { mode: "removal-fixture" }),
).toThrow(/FE-GATE-009 manual accessibility evidence.*installed route scope/i);
});
it("keeps the action registry recursively immutable and resolves only known actions", () => {
expect(Object.isFrozen(CI_ACTION_REGISTRY)).toBe(true);
expect(Object.values(CI_ACTION_REGISTRY).every((action) => Object.isFrozen(action))).toBe(true);