fix: restore scrolling and validator enforcement
ForgeFlow quality gate / quality (push) Canceled after 0s
ForgeFlow quality gate / quality (push) Canceled after 0s
This commit is contained in:
@@ -23,6 +23,20 @@ test("Git Validator policies enforce score, blockers and enabled checks", () =>
|
||||
assert.equal(governed.checks[0].blocking, true);
|
||||
});
|
||||
|
||||
test("built-in policies enforce their declared blocking severities", () => {
|
||||
const finding = [{ id: "readme", status: "warning", category: "Documentation", weight: 5 }];
|
||||
assert.equal(applyPolicy(finding, { id: "minimal" }, []).checks[0].blocking, false);
|
||||
for (const id of ["standard", "strict", "production"])
|
||||
assert.equal(applyPolicy(finding, { id }, []).checks[0].blocking, true, `${id} must block active warnings`);
|
||||
});
|
||||
|
||||
test("documented suppressions remove active blockers", () => {
|
||||
const now = new Date("2026-07-01T00:00:00.000Z");
|
||||
const suppression = validateSuppression({ checkId: "readme", reason: "Tracked remediation work", author: "Jens", expiresAt: "2026-07-08T00:00:00.000Z", evidence: "ticket:FF-7" }, normalizePolicy({ id: "standard" }), now);
|
||||
const check = applyPolicy([{ id: "readme", status: "warning", category: "Documentation", weight: 5 }], { id: "standard" }, [suppression], now).checks[0];
|
||||
assert.equal(check.suppressed, true);
|
||||
assert.equal(check.blocking, false);
|
||||
});
|
||||
test("suppressions require accountable evidence and reactivate after expiry", () => {
|
||||
const now = new Date("2026-07-01T00:00:00.000Z");
|
||||
const suppression = validateSuppression({ checkId: "signed-tags", reason: "Tracked under release hardening", author: "Jens", ticket: "FF-42", expiresAt: "2026-07-08T00:00:00.000Z", scope: "repository", evidence: "sha:abc" }, normalizePolicy({ id: "standard" }), now);
|
||||
|
||||
Reference in New Issue
Block a user