FAILURE MAP
← Case archive

FA-73439 / Rate limiter algorithms / Member archive

Sliding-window log limiter: entry exactly one window old still counted · case 04

A client retrying exactly at the advertised time is denied again.

Member previewVariant 4 · 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], ["deny", 0], ["allow", 0], ["allow", 0]], [1014, 1015]][[["allow", 0], ["allow", 0], ["allow", 0], ["allow", 0], ["deny", 985]], [1000, 1014]]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 ↗