fix(auth): gate registration rate limit to production only #224
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/bunyip-197-registration-rate-limit-nonprod"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The per-IP registration cap (3/hour) is an anti-abuse control for the public production deployment. bunyip's e2e suite runs against a deployed staging instance and self-provisions disposable accounts via registerDisposable() from the single CI runner egress IP; registrations accumulate across serial runs inside the one-hour window and trip a spurious 429 RATE_LIMITED, failing the change-email, magic-link, and password-reset specs.
There is no test-side workaround: each disposable account needs a fresh unique email, so the accounts cannot be pre-seeded or reused the way the shared login account is. Apply the cap only when config.is_production(); staging/dev register unthrottled. Production keeps the existing 3/hour/IP limit unchanged.
#BUNYIP-197
Pull request closed