fix(setup): retry login up to 3× with 90s timeout and 15s backoff #12

Merged
peptiderepo merged 1 commits from claude/e2e-login-retry-20260612 into main 2026-06-12 02:53:06 +00:00
peptiderepo commented 2026-06-12 02:32:54 +00:00 (Migrated from github.com)

Problem

Hostinger rate-limits GitHub runner IPs on wp-login.php, causing TimeoutError: page.goto wp-login.php 30000ms exceeded during the auth setup step. This has produced 6 deploy-gate failures across 2 days (latest: v0.18.2 run 27390193150, 3/3 failures). All 21 real smoke tests pass whenever setup survives.

Approach: retry hardening (not app-password)

The app-password route was evaluated and ruled out:

  • smoke.yml only passes STAGING_WP_ADMIN_USER + STAGING_WP_ADMIN_PASSWORD — no app-password secret exists in the workflow
  • Specs 03-admin-plugins.spec.ts and 00-homepage.spec.ts depend on #wpadminbar visibility, which requires real browser session cookies built via the login form — a REST-built storage state would not satisfy these checks

Changes (global.setup.ts only)

  • Navigation timeout raised: 30s → 90s per attempt
  • Login sequence wrapped in a retry loop: up to 3 attempts
  • Fresh BrowserContext per attempt — stale cookies / throttle state cannot carry over between retries
  • 15s backoff between attempts to let transient throttle windows clear
  • Per-attempt console.log / console.error so any future failure is diagnosable from CI logs alone
  • On final failure: human-readable hint pointing at the Hostinger throttle cause

Assertions: unchanged

The #wpadminbar visibility check and storageState write are identical to before. The retry loop only wraps the navigation + form-fill; it does not skip, weaken, or gate any assertion. No changes to playwright.config.ts, smoke.yml, or any test spec.


Agent-Session: e2e-login-flake-20260612

## Problem Hostinger rate-limits GitHub runner IPs on `wp-login.php`, causing `TimeoutError: page.goto wp-login.php 30000ms exceeded` during the auth setup step. This has produced 6 deploy-gate failures across 2 days (latest: v0.18.2 run 27390193150, 3/3 failures). All 21 real smoke tests pass whenever setup survives. ## Approach: retry hardening (not app-password) The app-password route was evaluated and ruled out: - `smoke.yml` only passes `STAGING_WP_ADMIN_USER` + `STAGING_WP_ADMIN_PASSWORD` — no app-password secret exists in the workflow - Specs `03-admin-plugins.spec.ts` and `00-homepage.spec.ts` depend on `#wpadminbar` visibility, which requires real browser session cookies built via the login form — a REST-built storage state would not satisfy these checks ## Changes (`global.setup.ts` only) - Navigation timeout raised: 30s → **90s per attempt** - Login sequence wrapped in a **retry loop: up to 3 attempts** - **Fresh `BrowserContext` per attempt** — stale cookies / throttle state cannot carry over between retries - **15s backoff** between attempts to let transient throttle windows clear - Per-attempt `console.log` / `console.error` so any future failure is diagnosable from CI logs alone - On final failure: human-readable hint pointing at the Hostinger throttle cause ## Assertions: unchanged The `#wpadminbar` visibility check and `storageState` write are identical to before. The retry loop only wraps the navigation + form-fill; it does not skip, weaken, or gate any assertion. No changes to `playwright.config.ts`, `smoke.yml`, or any test spec. --- Agent-Session: e2e-login-flake-20260612
Sign in to join this conversation.