From 82a1c0928d7298ab3ad3e614b386f968a7ab2274 Mon Sep 17 00:00:00 2001 From: Sawyer Cutler Date: Fri, 21 Aug 2026 20:52:59 -0700 Subject: [PATCH] run-all tests: do not inherit the caller's gate config These cases assert the runner's own fan-out over a fixture workspace. With WORKBENCH_CHECK_SINCE exported, the spawned runner resolved the affected-package filter against the real repository instead of the fixture, so every probe package read as unaffected and the runner correctly reported nothing to do -- failing tests that are about something else entirely. CI never set the variable, so this passed there and failed only for a developer following the documented faster-gate workflow. --- scripts/run-all.test.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/scripts/run-all.test.ts b/scripts/run-all.test.ts index ef1005fcc..e0686cefd 100644 --- a/scripts/run-all.test.ts +++ b/scripts/run-all.test.ts @@ -63,9 +63,17 @@ async function runProbe( const logPath = join(workspace, `probe-${logCounter}.log`); await writeFile(logPath, ""); + // These cases assert the runner's own fan-out over a fixture workspace, so + // they must not inherit the caller's gate configuration. A developer with + // WORKBENCH_CHECK_SINCE exported resolves the filter against the real repo's + // git rather than the fixture, every probe package reads as unaffected, and + // the runner correctly reports "nothing affected" — failing tests that are + // actually about something else. A case that wants either variable sets it + // through `extraEnv`. + const { WORKBENCH_CHECK_SINCE: _since, ...ambient } = process.env; const child = Bun.spawn(["bun", "run", RUNNER, script], { cwd: workspace, - env: { ...process.env, PROBE_LOG: logPath, ...extraEnv }, + env: { ...ambient, PROBE_LOG: logPath, ...extraEnv }, stdout: "pipe", stderr: "pipe", });