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:
@@ -100,6 +100,24 @@ test("Git Validator recognizes remote aliases and secret-shaped tracked paths",
|
||||
assert.equal(isSensitiveTrackedPath(".env.example"), false);
|
||||
});
|
||||
|
||||
test("Git Validator rejects stale or forged repair requests", async () => {
|
||||
const validator = new GitValidatorService({ git: new GitService() });
|
||||
validator.scan = async () => ({
|
||||
checks: [{ id: "local-safety", fixAction: "configure-local-safety", status: "warning" }],
|
||||
});
|
||||
assert.equal(
|
||||
(await validator.resolveRepairCheck({}, { id: "local-safety", fixAction: "configure-local-safety" })).id,
|
||||
"local-safety",
|
||||
);
|
||||
await assert.rejects(
|
||||
validator.resolveRepairCheck({}, { id: "local-safety", fixAction: "align-origin" }),
|
||||
/stale/i,
|
||||
);
|
||||
await assert.rejects(
|
||||
validator.resolveRepairCheck({}, { id: "resolved-check", fixAction: "align-origin" }),
|
||||
/resolved|no longer repairable/i,
|
||||
);
|
||||
});
|
||||
test("Git Validator reports reproducibility, CI and editor hygiene and creates reviewable defaults", async (t) => {
|
||||
const root = await mkdtemp(path.join(os.tmpdir(), "forgeflow-hygiene-"));
|
||||
t.after(() => rm(root, { recursive: true, force: true }));
|
||||
|
||||
Reference in New Issue
Block a user