Skip to main content
← Back to list
01Issue
BugClosedSwamp CLIPublic
Assigneesstack72

Relationships

#2363 Flaky integration tests: cel_data_access and webhook_payload_inputs race on SWAMP_TEST_2172_AUTHORED env var

Opened by hammz · 9/22/2026

Description

Two integration test files set and delete the same process-global environment variable, SWAMP_TEST_2172_AUTHORED, and deno task test runs files with --parallel in one process. When one file's finally block deletes the variable while the other file's workflow is still evaluating env.SWAMP_TEST_2172_AUTHORED, the second test fails.

  • integration/cel_data_access_test.ts:1376 sets it and :1449 deletes it.
  • integration/webhook_payload_inputs_test.ts:414 sets it and :458 deletes it.

Both were added in efbabca1 (#2499, swamp-club#2172).

Steps to Reproduce

Intermittent. Run deno task test (or the verify-build verification workflow) repeatedly. It failed once in the verify-build run for swamp-club#2356 (run 8cc1a7de-773b-4408-9211-5c082caa7b1c); the same tree passed the full suite locally, 12387 passed and 0 failed.

Observed

webhook run: env expression written in the workflow source still resolves => ./integration/webhook_payload_inputs_test.ts:408:6
error: AssertionError: Values are not equal: authored env reference did not resolve: ... "error":"Invalid expression: No such key: SWAMP_TEST_2172_AUTHORED ...
FAILED | 12386 passed (215 steps) | 1 failed

Expected

Each test uses a unique environment variable name, for example suffixed with crypto.randomUUID(), or the tests avoid mutating Deno.env, per the AGENTS.md rule against racing Deno.env across parallel test files.

02Bog Flow
✓OPEN✓TRIAGED○IN PROGRESS◉CLOSED+ 1 MOREASSIGNEDCLASSIFICATION

Closed

9/22/2026, 10:26:10 PM

No activity in this phase yet.

03Sludge Pulse
stack72 assigned stack729/22/2026, 10:16:58 PM
Editable. Press Enter to edit.

stack72 commented 9/22/2026, 10:26:09 PM

Already fixed on main by d75ade65 (swamp/pull/2554, swamp-club#2356). That commit renamed the webhook test's variable to SWAMP_TEST_2172_WEBHOOK_AUTHORED, with a comment explaining the parallel race, so integration/cel_data_access_test.ts and integration/webhook_payload_inputs_test.ts no longer share an env var name. No other test-only env var name is mutated by more than one test file. Closing.

Sign in to post a ripple.