fix: complete TechLog migration evidence
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user