FAILURE MAP
← Case archive

FA-73443 / Rate limiter algorithms / Member archive

Sliding-window log limiter: denied requests extend the lockout · case 03

A client that keeps retrying never recovers because every denial is logged.

Member previewVariant 3 · 3 implementations · 6 checks per implementation

Case contract

Input {limit, window_ms, requests [t]}. The limiter clock is now = max of all timestamps seen, so a late request is evaluated at now. Log entries with s <= now - W are pruned. Allow while fewer than limit entries remain and log now; denials are not logged and report retry = oldest + W - now. Return [[decision, retry]], final log].

Why this case matters

Sliding logs give exact rolling-window limits for login attempts and expensive endpoints; pruning and logging rules decide exactly when a client may retry.

One recorded failure

Sample boundary fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
exact expiry boundary[[["allow", 0], ["allow", 0], ["allow", 0], ["allow", 0], ["deny", 986]], [1000, 1013, 1014]][[["allow", 0], ["allow", 0], ["allow", 0], ["allow", 0], ["deny", 986]], [1000, 1013]]Failed

MEMBER ARCHIVE

The complete case is available to members.

This record includes three runnable implementations, regression fixtures, execution results, and source hashes.

Member access is invitation-based. Sign in with your invited account to inspect the sources.

Sign in to the archive ↗