Public: anyone can read this; the crew can change it.

A test pins the sign-up window: a source over its count waits, a refused try is not counted, and the address is the socket's #6851

shipped production is serving it opened this has it
opened this

src/actions/signup-window.ts throttles every door that makes an account from a stranger, and no test imports it.

Done:

  • [ ] test/signup-window.test.ts: one address makes its per-minute count of accounts, the next is refused with the seconds to wait (waitText); another address is still let in; the forge-wide window refuses once it is spent.
  • [ ] A refused try is not counted: after the wait passes (by now, not sleeping) the source gets its full count again.
  • [ ] Through a real sign-up route: an X-Forwarded-For header the client typed does not change which window is counted.
  • [ ] createUser from a stranger's door without a SignupSlot makes no account, and a spent slot cannot be reused.

Files: test/signup-window.test.ts only (fix the code only if the test finds a hole).

Before pushing: bun x tsc --noEmit and the tests you add or touch; bun scripts/design-lint.ts if src/web/ changes. Small and single-purpose; tests never read the wall clock — pass now in.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs