fix(e2e): surface bunyip login error + stop login-bearing retries (BUNYIP-165) #184

Merged
nrupard merged 1 commit from fix/BUNYIP-165-login-error-surface-no-retry into main 2026-06-22 19:34:10 +02:00
Owner

What

Two fixes from a staging login failure where setup login looped on "never navigated away from /login" while auth-ui passed on retry with the same credentials (so the creds are valid; bunyip's 5/min-per-email login rate limit was rejecting, and the setup retries amplified it).

  • lib/login.ts: loginViaHub now races "left /login" against bunyip's error_box (.text-destructive, rendered only on a failed login) appearing. A rejection fails in ~1s and throws hub login did not leave /login: "<message>" (e.g. "Too many attempts", "Invalid email or password"), instead of a blind 30s timeout. New readLoginError() scrapes the box.
  • playwright.config.ts: retries: 0 on the setup and auth-ui projects (the only login-bearing ones); account-ui / api keep the global CI ? 2 : 0. Retrying a rate-limited login just deepens the 5/min hole.

Test

tsc --noEmit clean; all 18 specs collect via --list. The .text-destructive selector is false-positive-free (bunyip renders it only on a failed login, per bunyip-web/src/views/ui.rs error_box). No em-dash.

Operational note

The original run's root cause was the login rate limit, not a code bug - the credentials are valid. After this lands, a rate-limited run fails fast with "Too many attempts"; wait ~60s between runs to let the window clear.

#BUNYIP-165

## What Two fixes from a staging login failure where setup login looped on "never navigated away from /login" while `auth-ui` passed on retry with the same credentials (so the creds are valid; bunyip's 5/min-per-email login rate limit was rejecting, and the setup retries amplified it). - **`lib/login.ts`**: `loginViaHub` now races "left /login" against bunyip's `error_box` (`.text-destructive`, rendered only on a failed login) appearing. A rejection fails in ~1s and throws `hub login did not leave /login: "<message>"` (e.g. "Too many attempts", "Invalid email or password"), instead of a blind 30s timeout. New `readLoginError()` scrapes the box. - **`playwright.config.ts`**: `retries: 0` on the `setup` and `auth-ui` projects (the only login-bearing ones); `account-ui` / `api` keep the global `CI ? 2 : 0`. Retrying a rate-limited login just deepens the 5/min hole. ## Test `tsc --noEmit` clean; all 18 specs collect via `--list`. The `.text-destructive` selector is false-positive-free (bunyip renders it only on a failed login, per `bunyip-web/src/views/ui.rs` error_box). No em-dash. ## Operational note The original run's root cause was the login rate limit, not a code bug - the credentials are valid. After this lands, a rate-limited run fails fast with "Too many attempts"; wait ~60s between runs to let the window clear. #BUNYIP-165
fix(e2e): surface bunyip login error + stop login-bearing projects retrying
Some checks failed
E2E / Playwright against deployment (pull_request) Failing after 1m15s
Check / fmt + clippy + build + tests (pull_request) Successful in 5m22s
Create release / Create release from merged PR (pull_request) Has been skipped
50cf786d26
A staging run failed at setup login with a blind "hub login never navigated away from the /login flow" (3x, because the setup project retried), while auth-ui login.spec passed on retry with the SAME credentials - i.e. the credentials are valid and the login was being rejected by bunyip's per-email rate limit (5/min), with the retries amplifying the blip into a cascade. The failure also did not name bunyip's reason, so it was indistinguishable from a slow login.

lib/login.ts: loginViaHub now races "left /login" against bunyip's error_box (`.text-destructive`, rendered only on a failed login) becoming visible. On rejection it fails in ~1s and throws `hub login did not leave /login: "<message>"`, scraping the rendered text (e.g. "Too many attempts", "Invalid email or password"), instead of blocking the full 30s with no reason.

playwright.config.ts: set `retries: 0` on the `setup` and `auth-ui` projects (the only ones that log in), keeping the global `process.env.CI ? 2 : 0` for account-ui / api. Retrying a rate-limited login only burns more of the 5/min budget.

tsc --noEmit clean; all 18 specs still collect.

#BUNYIP-165

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
nrupard scheduled this pull request to auto merge when all checks succeed 2026-06-22 19:33:29 +02:00
nrupard deleted branch fix/BUNYIP-165-login-error-surface-no-retry 2026-06-22 19:34:10 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/bunyip!184
No description provided.