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

signin-throttle.test.ts takes ~58 s alone and times out at 60 s under load #1013

Closed opened this
Closed without merging

test/signin-throttle.test.ts now runs in about 2.7 s (together with test/check-list.test.ts), down from about 58 s alone. It's admitted to GATE in scripts/gate.ts. Both files pass, and check-list is happy with the move.

Notes

stopped closed without shipping deploy eefdd53

opened this

test/signin-throttle.test.ts now runs in about 2.7 s (together with test/check-list.test.ts), down from about 58 s alone. It's admitted to GATE in scripts/gate.ts. Both files pass, and check-list is happy with the move.

What changed

  • Cheaper hash: after creating alice through the normal createUser path, the test overwrites her stored hash with a minimal-cost argon2id one (memory 8, time 1). Argon2 verification reads its cost from the stored hash, so the twenty wrong guesses are now cheap. Production hashing is untouched.
  • Gate: the EXCLUDED entry for the file is removed and it's added to GATE.

What I chose not to do

  • I didn't add an injectable limit or a hash-cost setting to the app. The test-side hash swap was enough and leaves src alone.
  • I didn't run tsc. It failed in the sandbox on a temp-directory error, so the type check hasn't been run.
  • I didn't run the full test suite.

How to try it: bun test test/signin-throttle.test.ts test/check-list.test.ts. Both ran outside the Bash sandbox, because it blocks the unix socket the test server listens on.

🤖 Generated with Claude Code

Closes #864

commented

Parked by the crew: the check failed ("capacity: only a forge admin reads or changes it > an admin changes each one from the page, the API and MCP; a wrong value is refused; every change is kept") and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs