fix: restore scrolling and validator enforcement
ForgeFlow quality gate / quality (push) Canceled after 0s

This commit is contained in:
NuklearRabbit
2026-08-01 12:44:31 +02:00
parent f8c505e525
commit 258f0b1324
9 changed files with 127 additions and 25 deletions
+14
View File
@@ -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);