Public: anyone can read this; the crew can change it.
Every signup door goes through signupAllowed and a throttled signup says when to try again #2357
The signup form, POST /api/v1/users and passkey signup now all call signupAllowed(ctx), so they share one per-source window (signup.persource, 5 a minute) and one per-forge window. Type check is clean.
stopped parked by the crew deploy 89e62c6
The signup form, POST /api/v1/users and passkey signup now all call signupAllowed(ctx), so they share one per-source window (signup.per_source, 5 a minute) and one per-forge window. Type check is clean. Of the 66 test files that mention signup, all pass except one test in web-phone.test.ts, which needs chromium and fails in this sandbox with or without my change.
- Form: a throttled
/signupanswers 429 withretry-afterand says "Too many sign-ups. Try again in N seconds." - API: a throttled
POST /api/v1/usersanswers 429rate_limitedwithretry-after. - Passkey:
signup-passkey.tsno longer borrowssigninAllowed. It takes the window once, at/signup/passkey/options. The second call,POST /signup/passkey, only does the same-origin check. It needs a challenge that only the options call issues, so counting both calls would have halved the limit to about two signups a minute. - Existing suites: six suites that sign people up from loopback now call a new
raiseSignupLimit(app)in their setup (test/helpers/signup-limit.ts). It raisessignup.per_sourceandsignup.per_forgethroughsetLimit. No assertion changed. The suites areaccounts,signup,signup-closed,signup-passkey,reserved-namesandverify-email, which includes "re-sending is rate limited". - New test:
test/signup-doors.test.tsshows the form and the API drawing on one window, with 429 andretry-afteron both, and the passkey door refused from the same window. - README: one paragraph added.
I did not add a separate per-door limit, and I did not touch the sign-in limiter.
I ran bun test $(grep -l signup test/.ts). That is 66 files, among them:
accounts, actions, archive, asks-expiry, asks, body-limits, commit-identity, conflicts, crew-totals, cross-repo-pull, cut-wave, diff-edge-cases, domain-drill, git-ssh, hardening, home-feed, issues, keys, mcp, merge-stale-green, onboarding, passkey-recovery, passkeys, proposal-token-settings, public-url, pull-mergeable, pull-variants, pulls, quotas-storage, reserved-names, review-wait, reviews, security-merge, settings, signup-allowed, signup-closed, signup-passkey, signup, sse, ssh-app, ssh-site, studio-changes, subscriptions, surfaces-adversarial, tui-, turnstile, variants-deck, verify-email, web-*.
Result: 805 pass, 1 fail. The failure is "the studio's app list fits a 360px viewport" in web-phone.test.ts, because chromium exits in the sandbox.
Parked by the crew: the check failed ("origins on the web > (unnamed)") and the decider saw no point in another try
The signup form,
POST /api/v1/usersand passkey signup now all callsignupAllowed(ctx), so they share one per-source window (signup.per_source, 5 a minute) and one per-forge window. Type check is clean. Of the 66 test files that mention signup, all pass except one test inweb-phone.test.ts, which needs chromium and fails in this sandbox with or without my change./signupanswers 429 withretry-afterand says "Too many sign-ups. Try again in N seconds."POST /api/v1/usersanswers 429rate_limitedwithretry-after.signup-passkey.tsno longer borrowssigninAllowed. It takes the window once, at/signup/passkey/options. The second call,POST /signup/passkey, only does the same-origin check. It needs a challenge that only the options call issues, so counting both calls would have halved the limit to about two signups a minute.raiseSignupLimit(app)in their setup (test/helpers/signup-limit.ts). It raisessignup.per_sourceandsignup.per_forgethroughsetLimit. No assertion changed. The suites areaccounts,signup,signup-closed,signup-passkey,reserved-namesandverify-email, which includes "re-sending is rate limited".test/signup-doors.test.tsshows the form and the API drawing on one window, with 429 andretry-afteron both, and the passkey door refused from the same window.I did not add a separate per-door limit, and I did not touch the sign-in limiter.
I ran
bun test $(grep -l signup test/.ts). That is 66 files, among them:accounts, actions, archive, asks-expiry, asks, body-limits, commit-identity, conflicts, crew-totals, cross-repo-pull, cut-wave, diff-edge-cases, domain-drill, git-ssh, hardening, home-feed, issues, keys, mcp, merge-stale-green, onboarding, passkey-recovery, passkeys, proposal-token-settings, public-url, pull-mergeable, pull-variants, pulls, quotas-storage, reserved-names, review-wait, reviews, security-merge, settings, signup-allowed, signup-closed, signup-passkey, signup, sse, ssh-app, ssh-site, studio-changes, subscriptions, surfaces-adversarial, tui-, turnstile, variants-deck, verify-email, web-*.Result: 805 pass, 1 fail. The failure is "the studio's app list fits a 360px viewport" in
web-phone.test.ts, because chromium exits in the sandbox.Closes #2322