Found while profiling the Stacks action wrapper in Stacks #2451.
An initialized fixed-window limiter with a maximum of 3 rejects every call in a simultaneous burst of 10. It should admit 3 and reject 7. The wrapper's separate cold-construction race is tracked in Stacks #2451; this issue reproduces directly against the dependency.
const limiter = new RateLimiter({ maxRequests: 3, windowMs: 60000, algorithm: 'fixed-window' })
const results = await Promise.allSettled(Array.from({ length: 10 }, () => limiter.enforce('one-client')))
console.log(results.filter(result => result.status === 'fulfilled').length) // 0, expected 3Source at e7e1ded: MemoryStorage.increment() returns the internal mutable record both on creation and update. Subsequent synchronous increments change that same object's count before checkFixedWindow() resumes its await. Every concurrent caller therefore sees the final count of 10. Sliding-window consumption already has a per-call snapshot, but the fixed-window implementation does not.
Return a stable per-increment result using the actual recorded count and reset time, without sharing mutable storage records with callers. Verify direct MemoryStorage increments produce counts 1 through N, previously returned values remain stable, and concurrent fixed-window enforcement admits exactly the configured quota. Run existing limiter tests and benchmark the allocation/CPU effect. Do not serialize Stacks requests or change quota semantics to compensate.