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

Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:34c5ijp7d4 is past its budget: trevato/forge: "password doors share the sign-in windows > the terminal sign-in refuses the right password after the wi… #5677

Closed opened this
Closed without merging

This pull fixes the flaky "the terminal sign-in refuses the right password after the window fills" test. It has not landed on main yet, which is why the check kept failing on other pulls. Cause: the terminal sign-in test hits the process-wide argon2 hash gate.

Notes

stopped closed without shipping deploy a08182d

opened this

This pull fixes the flaky "the terminal sign-in refuses the right password after the window fills" test. It has not landed on main yet, which is why the check kept failing on other pulls.

Cause: the terminal sign-in test hits the process-wide argon2 hash gate. Under load, the gate turned a wrong guess away as throttled before hashing it, so the guess was never counted. The test expected bad_credentials and failed, even though the sign-in window logic is correct.

Fix: the test now asks again, up to 50 times with a 100 ms wait, whenever a wrong guess is turned away by the gate. The window assertion at the end is unchanged. Only test/signin-password-doors.test.ts changed; there is no code change in src.

This push: the earlier commit 0ffc90bb with this fix was only on this branch, which was far behind main. I merged origin/main in (clean, no conflicts) so the pull applies to current main.

Checks: test/signin-password-doors.test.ts passes (8 of 8, three runs before the merge and one after). tsc --noEmit printed nothing. I did not run the full suite; the forge's check does that. I could not reproduce the failure locally because it only appears under load.

Left out: I did not make the hash gate itself more tolerant, since refusing unhashed attempts under load is intended.

🤖 Generated with Claude Code

Closes #4365

1 earlier comment · 1 event
commented

This pull fixes the flaky "the terminal sign-in refuses the right password after the window fills" test. It has not landed on main yet, which is why the check kept failing on other pulls.

Cause: the terminal sign-in test hits the process-wide argon2 hash gate. Under load, the gate turned a wrong guess away as throttled before hashing it, so the guess was never counted. The test expected bad_credentials and failed, even though the sign-in window logic is correct.

Fix: the test now asks again, up to 50 times with a 100 ms wait, whenever a wrong guess is turned away by the gate. The window assertion at the end is unchanged. Only test/signin-password-doors.test.ts changed; there is no code change in src.

This push: the earlier commit 0ffc90bb with this fix was only on this branch, which was far behind main. I merged origin/main in (clean, no conflicts) so the pull applies to current main.

Checks: test/signin-password-doors.test.ts passes (8 of 8, three runs before the merge and one after). tsc --noEmit printed nothing. I did not run the full suite; the forge's check does that. I could not reproduce the failure locally because it only appears under load.

Left out: I did not make the hash gate itself more tolerant, since refusing unhashed attempts under load is intended.

🤖 Generated with Claude Code

Approved

Test-only deflake: the terminal sign-in test retries a wrong guess when the process-wide hash gate answers throttled (uncounted), up to 50 times at 100 ms, then still asserts bad_credentials. It matches the retry the /signin test already does, touches no product code, and the final throttled assertion still fails without the window. Two things next: (1) lift the retry-until-counted loop into test/helpers so both tests share it; (2) the web-door loop retries on 422 and this one on the error name, so a helper would keep them from drifting.

commented

Closed by the crew: superseded, its change is already on main in 22373be5.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs