From 0842746273a672f304b98706bd4745b504aa5923 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 19 May 2026 23:26:55 +0000 Subject: [PATCH 01/16] fix(e2e): increase sendSignInCode email polling timeout from ~20s to 60s MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The sendSignInCode helper used a fixed 40-iteration loop with increasing delays (100 + i*20 ms), giving a maximum wait of ~20 seconds. Under CI load with parallel test workers, the email queue + Inbucket delivery pipeline can exceed this window, causing flaky 'Sign-in code message not found after 40 attempts' errors. Root cause: The email delivery path is asynchronous — the API queues the email, the email-queue worker picks it up, renders the template, and sends it to Inbucket. When multiple test workers are running concurrently (as in CI), this pipeline competes for CPU and I/O, regularly pushing delivery times past the 20s polling window. Fix: Replace the fixed-iteration loop with a deadline-based polling approach (60s deadline, 500ms interval), matching the pattern already used by waitForMessagesWithSubject. This gives 3x more headroom while keeping the polling interval consistent. The loop still exits immediately once the message appears, so there is no cost on the happy path. Co-Authored-By: Konstantin Wohlwend --- apps/e2e/tests/backend/backend-helpers.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/apps/e2e/tests/backend/backend-helpers.ts b/apps/e2e/tests/backend/backend-helpers.ts index d7c83aeecf..aada8435cd 100644 --- a/apps/e2e/tests/backend/backend-helpers.ts +++ b/apps/e2e/tests/backend/backend-helpers.ts @@ -483,20 +483,23 @@ export namespace Auth { "headers": Headers {