diff --git a/.gitignore b/.gitignore index 42840131381..63de6b12829 100644 --- a/.gitignore +++ b/.gitignore @@ -45,6 +45,7 @@ diagnostics/ .vscode/ .claude/settings.local.json .paperclip-local/ +.paperclip-runtime/ /.idea/ /.agents/ diff --git a/packages/shared/src/gitignore-runtime.test.ts b/packages/shared/src/gitignore-runtime.test.ts new file mode 100644 index 00000000000..798dde7cc7d --- /dev/null +++ b/packages/shared/src/gitignore-runtime.test.ts @@ -0,0 +1,19 @@ +import { spawnSync } from "node:child_process"; +import { fileURLToPath } from "node:url"; +import { describe, expect, it } from "vitest"; + +const repoRoot = fileURLToPath(new URL("../../..", import.meta.url)); + +describe("repository gitignore", () => { + it("ignores materialized Paperclip runtime credentials", () => { + const sensitiveRuntimePath = ".paperclip-runtime/codex/home/auth.json"; + const result = spawnSync("git", ["check-ignore", "-v", sensitiveRuntimePath], { + cwd: repoRoot, + encoding: "utf8", + }); + + expect(result.status).toBe(0); + expect(result.stdout).toContain(".paperclip-runtime/"); + expect(result.stdout).toContain(sensitiveRuntimePath); + }); +});