This commit is contained in:
omp-port
2026-08-12 22:03:00 -04:00
parent 3a903bd74d
commit a908bd7efe
7 changed files with 84 additions and 41 deletions

View File

@@ -229,4 +229,17 @@ describe("defensive-guards check", () => {
const state = await loadRunState(cwd);
expect(state?.checks["defensive-guards"]?.status).toBe("skipped");
});
it("does not skip when sources live in subdirectories (gate scans recursively)", async () => {
// Top level holds only a directory — the old shallow gate skipped any
// repo whose source lives under `game/`/`src/`-style subdirs.
await mkdir(join(cwd, "game"), { recursive: true });
await writeFile(join(cwd, "game", "main.lua"), "return {}\n", "utf8");
const check = getCheck("defensive-guards")!;
await handleCheckCommand(check, "", stubCtx(cwd));
const state = await loadRunState(cwd);
expect(state?.checks["defensive-guards"]?.status).toBe("complete");
});
});