fix(e2e): share one disposable account + skip on registration 429 #223

Closed
Claude-Run wants to merge 549 commits from fix/BUNYIP-196-e2e-register-budget into main
Member

The email-driven specs (magic-link, password-reset, change-email) each registered their own disposable account, so a full run did 3 POST /v1/auth/register calls. bunyip caps registration at 3/hour/IP (RateLimitConfig::REGISTRATION), so the suite sat exactly at the cap: any Playwright retry or a back-to-back CI run on the shared runner egress IP tripped a 429 at registerDisposable (e2e/lib/accounts.ts), which is what failed e2e.yml run #977.

Consolidate the three flows into one serial describe (e2e/tests/auth/email-flows.spec.ts) that registers a single disposable account in beforeAll and mutates it in turn (magic-link is non-destructive, password-reset rotates the password, change-email rotates the email, threading the current credentials forward). One registration per run instead of three leaves head-room for reruns.

Because the suite runs against a persistent staging deployment from one shared CI IP and e2e.yml serialises runs without spacing them an hour apart, sibling runs in the same hour can still exhaust the per-IP budget. registerDisposable now raises a typed RegistrationRateLimitedError on HTTP 429 and the spec SKIPS rather than fails when it sees one: a rate-limited window is outside this run's control, while a genuine registration outage is a non-429 status and still fails the suite.

Validated with tsc --noEmit and playwright test --list (the e2e suite is TypeScript; it has no Rust to run through just check).

#BUNYIP-196

The email-driven specs (magic-link, password-reset, change-email) each registered their own disposable account, so a full run did 3 POST /v1/auth/register calls. bunyip caps registration at 3/hour/IP (RateLimitConfig::REGISTRATION), so the suite sat exactly at the cap: any Playwright retry or a back-to-back CI run on the shared runner egress IP tripped a 429 at registerDisposable (e2e/lib/accounts.ts), which is what failed e2e.yml run #977. Consolidate the three flows into one serial describe (e2e/tests/auth/email-flows.spec.ts) that registers a single disposable account in beforeAll and mutates it in turn (magic-link is non-destructive, password-reset rotates the password, change-email rotates the email, threading the current credentials forward). One registration per run instead of three leaves head-room for reruns. Because the suite runs against a persistent staging deployment from one shared CI IP and e2e.yml serialises runs without spacing them an hour apart, sibling runs in the same hour can still exhaust the per-IP budget. registerDisposable now raises a typed RegistrationRateLimitedError on HTTP 429 and the spec SKIPS rather than fails when it sees one: a rate-limited window is outside this run's control, while a genuine registration outage is a non-429 status and still fails the suite. Validated with `tsc --noEmit` and `playwright test --list` (the e2e suite is TypeScript; it has no Rust to run through `just check`). #BUNYIP-196
fix(e2e): share one disposable account + skip on registration 429
All checks were successful
E2E / Playwright against deployment (pull_request) Successful in 23s
Check / fmt + clippy + build + tests (pull_request) Successful in 2m18s
Create release / Create release from merged PR (pull_request) Has been skipped
9b028e1d1d
The email-driven specs (magic-link, password-reset, change-email) each registered their own disposable account, so a full run did 3 POST /v1/auth/register calls. bunyip caps registration at 3/hour/IP (RateLimitConfig::REGISTRATION), so the suite sat exactly at the cap: any Playwright retry or a back-to-back CI run on the shared runner egress IP tripped a 429 at registerDisposable (e2e/lib/accounts.ts), which is what failed e2e.yml run #977.

Consolidate the three flows into one serial describe (e2e/tests/auth/email-flows.spec.ts) that registers a single disposable account in beforeAll and mutates it in turn (magic-link is non-destructive, password-reset rotates the password, change-email rotates the email, threading the current credentials forward). One registration per run instead of three leaves head-room for reruns.

Because the suite runs against a persistent staging deployment from one shared CI IP and e2e.yml serialises runs without spacing them an hour apart, sibling runs in the same hour can still exhaust the per-IP budget. registerDisposable now raises a typed RegistrationRateLimitedError on HTTP 429 and the spec SKIPS rather than fails when it sees one: a rate-limited window is outside this run's control, while a genuine registration outage is a non-429 status and still fails the suite.

Validated with `tsc --noEmit` and `playwright test --list` (the e2e suite is TypeScript; it has no Rust to run through `just check`).

#BUNYIP-196
nrupard closed this pull request 2026-06-25 16:39:55 +02:00
David deleted branch fix/BUNYIP-196-e2e-register-budget 2026-06-28 23:06:46 +02:00
All checks were successful
E2E / Playwright against deployment (pull_request) Successful in 23s
Required
Details
Check / fmt + clippy + build + tests (pull_request) Successful in 2m18s
Required
Details
Create release / Create release from merged PR (pull_request) Has been skipped

Pull request closed

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!223
No description provided.