From bf2fcee317b4be550f609e25db46c0a2714d3a3e Mon Sep 17 00:00:00 2001 From: Alex Langenfeld Date: Tue, 18 Aug 2026 14:26:18 -0500 Subject: [PATCH] [e2e] Assert only the positive direction of step source maps Where hasStepSourceMaps() reports maps unsupported, the tests asserted their absence - but on some lanes (nuxt, nextjs-webpack) source maps apply nondeterministically, so the negative assertion pinned that nondeterminism as a flake (#2083 measured this as one of the three flake classes blocking e2e concurrency re-enablement). A stack that resolves to source where none was promised is an improvement, not a failure; hasStepSourceMaps() remains the record to update when a lane starts mapping reliably, verified by the positive assertions on the lanes it does promise. Signed-off-by: Alex Langenfeld --- packages/core/e2e/e2e.test.ts | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/packages/core/e2e/e2e.test.ts b/packages/core/e2e/e2e.test.ts index bbfb275222..7d2fa60193 100644 --- a/packages/core/e2e/e2e.test.ts +++ b/packages/core/e2e/e2e.test.ts @@ -1353,12 +1353,16 @@ describe('e2e', () => { expect(result.stack).toContain('errorStepFn'); expect(result.stack).not.toContain('evalmachine'); - // Source maps are not supported everywhere. Check the definition - // of hasStepSourceMaps() to see where they are supported + // Source maps are not supported everywhere — see + // hasStepSourceMaps() for the matrix. Only the positive direction + // is asserted: where maps are unsupported they still apply + // nondeterministically on some lanes (nuxt, nextjs-webpack), so + // asserting their absence pinned that nondeterminism as a flake. + // A stack resolving to source where none was promised is an + // improvement, not a failure — hasStepSourceMaps() is the record + // to update when a lane starts mapping reliably. if (hasStepSourceMaps()) { expect(result.stack).toContain('99_e2e.ts'); - } else { - expect(result.stack).not.toContain('99_e2e.ts'); } // Verify step failed via CLI (--withData needed to resolve errorRef) @@ -1381,12 +1385,10 @@ describe('e2e', () => { expect(errorData.stack).toContain('errorStepFn'); expect(errorData.stack).not.toContain('evalmachine'); - // Source maps are not supported everywhere. Check the definition - // of hasStepSourceMaps() to see where they are supported + // Positive direction only — see the note on the first source-map + // assertion above. if (hasStepSourceMaps()) { expect(errorData.stack).toContain('99_e2e.ts'); - } else { - expect(errorData.stack).not.toContain('99_e2e.ts'); } // Workflow completed (error was caught) @@ -1415,12 +1417,10 @@ describe('e2e', () => { expect(result.stack).toContain('stepThatThrowsFromHelper'); expect(result.stack).not.toContain('evalmachine'); - // Source maps are not supported everywhere. Check the definition - // of hasStepSourceMaps() to see where they are supported + // Positive direction only — see the note on the first source-map + // assertion above. if (hasStepSourceMaps()) { expect(result.stack).toContain('helpers.ts'); - } else { - expect(result.stack).not.toContain('helpers.ts'); } // Verify step failed via CLI - same stack info available there too (--withData needed to resolve errorRef) @@ -1439,12 +1439,10 @@ describe('e2e', () => { } expect(errorData.stack).toContain('stepThatThrowsFromHelper'); expect(errorData.stack).not.toContain('evalmachine'); - // Source maps are not supported everywhere. Check the definition - // of hasStepSourceMaps() to see where they are supported + // Positive direction only — see the note on the first source-map + // assertion above. if (hasStepSourceMaps()) { expect(errorData.stack).toContain('helpers.ts'); - } else { - expect(errorData.stack).not.toContain('helpers.ts'); } // Workflow completed (error was caught)