test(login): stop the backoff-guard test racing its own one-second lock #145
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/login-backoff-flake"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This is the red check on #144, and it is not that slice's fault.
PR Checks / server-testsfailed there onbackoffGuard returns a generic 429 while locked out— the only failure in 741 tests, in a file the slice does not touch. #144 was merged before this landed, so it needs its own PR.A single
recordFailure()locks an IP forBASE_MS * 2 ** 0— exactly one second — and the test then does a real HTTP round trip against that lock. On the runner the round trip took 1,456 ms, the lock had expired, and the guard correctly answered 200:Five failures lock for sixteen seconds, which is not a race any runner hiccup wins. What the test is actually about — the guard's answer while locked out: generic 429, no username/password hint, a
Retry-Afterheader — is unchanged.It has presumably been latent since the test was written and only shows up when the suite is under enough parallel load; slice 3 added three test files, which is very likely what tipped it over. Green locally (7/7 in that file, 741/741 overall).
AI disclosure
🤖 Generated with Claude Code