Skip to content

CL-6589: run-all tests must not inherit the caller's gate config - #297

Merged
TheGreatAxios merged 1 commit into
mainfrom
cl-runner-test-env
Aug 22, 2026
Merged

CL-6589: run-all tests must not inherit the caller's gate config#297
TheGreatAxios merged 1 commit into
mainfrom
cl-runner-test-env

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Contributor

Follow-up defect in my own CL-6589 change, found while using the new gate.

scripts/run-all.test.ts spawns the runner against a temporary fixture workspace, inheriting the caller's environment. With WORKBENCH_CHECK_SINCE exported — the workflow CL-6589 documents and that agent lanes are now told to use — the spawned runner resolves the affected-package filter against the real repository's git rather than the fixture. Every probe package reads as unaffected, the runner correctly prints nothing affected by this change, and two cases fail for a reason that has nothing to do with what they assert:

✗ run-all > fails the run and names the package whose script failed
✗ run-all > keeps a failing package from cancelling its siblings
   Received: "probe: nothing affected by this change\n"

CI never sets the variable, so this is green there and red only for a developer following the documented faster workflow — the worst-shaped failure, since it looks like the developer broke something.

Fix: the helper strips WORKBENCH_CHECK_SINCE from the inherited environment. A case that wants it sets it explicitly through extraEnv. A test asserting the runner's own fan-out should control its environment rather than inherit ambient config.

The second spawn site is unaffected: no fixture package defines that script, so discovered.length === 0 short-circuits before the filter runs.

Verified by running the suite with WORKBENCH_CHECK_SINCE=origin/main set — the exact condition that failed. 13/13 pass, 27/27 across both runner suites.

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.
@TheGreatAxios
TheGreatAxios merged commit 119dd47 into main Aug 22, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant