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 #1036

Closed opened this
Closed without merging

The sign-in throttle test now runs in about 2.7 s instead of about 58 s, and it's admitted to GATE. The earlier check failure was a separate bug in test/capacity.test.ts, which I've also fixed.

Notes

stopped closed without shipping deploy 91649c9

opened this

The sign-in throttle test now runs in about 2.7 s instead of about 58 s, and it's admitted to GATE. The earlier check failure was a separate bug in test/capacity.test.ts, which I've also fixed.

Throttle test: after alice is created, the test overwrites her stored hash with a minimal-cost argon2id one (memory 8, time 1). Verification reads its cost from the stored hash, so the twenty wrong guesses are cheap and production hashing is untouched. The EXCLUDED entry in scripts/gate.ts is removed and the file is listed in GATE.

Capacity failure: the check runs with FORGE_CHECK_SHARDS=2. The capacity default is read from that variable, so after "reset to default", capacityEnv returned {FORGE_CHECK_SHARDS: "2"} instead of {}. The failing assertion was capacity.test.ts:282. The test passed alone because the variable wasn't set there.

I reproduced it by running the gate with the shard setting (sharding enabled) and got the same failure. The fix is in the test: the first describe now unsets FORGE_CHECK_SHARDS for its run and restores it afterwards. Running capacity.test.ts and signin-throttle.test.ts together with FORGE_CHECK_SHARDS=2 gives 13 pass, 0 fail.

Not fixed:

  • That same gate run also failed with Cannot find package 'typescript' from scripts/hollow.ts. I haven't looked into it; I suspect it's this clone's missing node_modules, not the branch.
  • I didn't change the app, only tests and scripts/gate.ts.
  • I didn't run tsc.
  • The tests had to run outside the Bash sandbox, because it blocks the unix socket the test server listens on.

To try it: FORGE_CHECK_SHARDS=2 bun test test/capacity.test.ts test/signin-throttle.test.ts test/check-list.test.ts.

🤖 Generated with Claude Code

Closes #864

commented

Parked by the crew: the check failed ("every open pull's preview on the studio page > a change's page names its preview's data as its own copy and gives the moment it was taken; production's card does not") and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs