A login attempt limit has a key, a threshold and a time window. An off-by-one comparison admits an extra attempt. Ignoring the window can lock out an account after the restriction should have expired. Choosing the wrong key can let an attacker reset the restriction just by changing a source address.
Read the policy for each lab before writing the condition. Some use an account key; one uses an account and source-address pair. The attempts table records earlier failures so you can test the boundary with one request. It stands in for a real rate limiter. It doesn't model atomic increments, distributed storage, concurrent requests or denial-of-service tradeoffs. The client-ip fixture represents a trusted proxy decision, not an arbitrary internet header. Preserve verification below the limit and after the window expires.
Enforce a seeded attempt limit without extending expired lockouts.