Skip to content

A full-featured CRM built with React, shadcn/ui, and Supabase.

Exempt the e2e dry run from bash-guard, and raise the suite's output buffer

Jeromeb041c8eb1fd6
diff --git a/.claude/hooks/bash-guard.mjs b/.claude/hooks/bash-guard.mjs
index 44eee25b..dd5d460a 100755
--- a/.claude/hooks/bash-guard.mjs
+++ b/.claude/hooks/bash-guard.mjs
@@ -99,6 +99,7 @@ const runsUnitTests = (c) =>
c,
);
const runsE2eTests = (c) =>
+ !/E2E_SMOKE_DRY=1/.test(c) &&
/(npx\s+playwright\s+test|make\s+test-e2e|e2e-smoke\.sh)/.test(c);
const runsLint = (c) => /(make\s+lint\b|npm\s+run\s+lint\b)/.test(c);
const runsBuild = (c) =>
diff --git a/.claude/hooks/e2e-on-feature-review.mjs b/.claude/hooks/e2e-on-feature-review.mjs
index 1a9c18a6..5e2c0e61 100755
--- a/.claude/hooks/e2e-on-feature-review.mjs
+++ b/.claude/hooks/e2e-on-feature-review.mjs
@@ -97,6 +97,9 @@ appendProgress(
const r = bash(`E2E_SMOKE_SRC='${src}' bash '${script}' 2>&1`, {
cwd: ctx.repo,
timeout: E2E_TIMEOUT_MS,
+ // A 15-minute suite's output overruns spawnSync's 1 MB default, which SIGKILLs it
+ // mid-run and records a false `failed` with innocuous-looking tail output.
+ maxBuffer: 64 * 1024 * 1024,
});
const output = String(r.stdout || "");
const status = classify(r.status, output);
diff --git a/.claude/hooks/test/bash-guard.test.mjs b/.claude/hooks/test/bash-guard.test.mjs
index 9b0a051c..645cda0b 100644
--- a/.claude/hooks/test/bash-guard.test.mjs
+++ b/.claude/hooks/test/bash-guard.test.mjs
@@ -155,6 +155,15 @@ describe("bash-guard hook", () => {
expect(isBlocked(r)).toBe(true);
});
+ // The dry run starts no Docker stack and takes no slot lease.
+ test("dry run of e2e-smoke.sh → allowed", () => {
+ const r = runHook(
+ "orchestrator",
+ "E2E_SMOKE_DRY=1 bash .claude/scripts/e2e-smoke.sh",
+ );
+ expect(isBlocked(r)).toBe(false);
+ });
+
test("dropping e2e from the config unblocks it again", () => {
const noE2e = {
validation: {