From 78a3b03596aa1ae14fbf533611cb0271de9a38e3 Mon Sep 17 00:00:00 2001 From: Arye Kogan Date: Sat, 4 Jul 2026 05:46:34 +0300 Subject: [PATCH] fix: ignore bootstrapped eval result bundles --- src/bootstrap.mjs | 14 +++++++++++++- tests/bootstrap-cli.test.mjs | 18 ++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/src/bootstrap.mjs b/src/bootstrap.mjs index 017e516..26c0ba1 100644 --- a/src/bootstrap.mjs +++ b/src/bootstrap.mjs @@ -123,7 +123,19 @@ const initFilesForSuite = (suite) => { content: [ "# Eval Results", "", - "Generated evaluation result bundles are written here. Keep durable summaries, but do not commit bulky transient outputs unless your repo policy requires them.", + "Generated evaluation result bundles are written here. Keep durable summaries, but do not commit raw transient outputs unless your repo policy requires them.", + "", + "The sibling `.gitignore` keeps run bundles local by default while preserving this README and curated files a human intentionally adds.", + "", + ].join("\n"), + }, + { + relativePath: "evals/results/.gitignore", + content: [ + "# Keep raw eval result bundles local unless a human curates a summary.", + "*", + "!README.md", + "!.gitignore", "", ].join("\n"), }, diff --git a/tests/bootstrap-cli.test.mjs b/tests/bootstrap-cli.test.mjs index 8c578d5..4153d4d 100644 --- a/tests/bootstrap-cli.test.mjs +++ b/tests/bootstrap-cli.test.mjs @@ -38,6 +38,7 @@ describe("bootstrap CLI", () => { expect(result.status).toBe(0); expect(result.stdout).toContain("Would write evals/eval-kit.config.json"); + expect(result.stdout).toContain("Would write evals/results/.gitignore"); expect(fs.existsSync(path.join(root, "evals"))).toBe(false); }); @@ -58,6 +59,23 @@ describe("bootstrap CLI", () => { root: "cases", }, }); + expect( + fs.readFileSync( + path.join(root, "evals", "results", ".gitignore"), + "utf8", + ), + ).toBe( + [ + "# Keep raw eval result bundles local unless a human curates a summary.", + "*", + "!README.md", + "!.gitignore", + "", + ].join("\n"), + ); + expect( + fs.readFileSync(path.join(root, "evals", "results", "README.md"), "utf8"), + ).toContain("keeps run bundles local by default"); const doctor = runCli(root, ["doctor"]); expect(doctor.status).toBe(0);