Request
Larch Point Support supplies nonnegative clock ticks, positive window width and a positive limit. Each key has an independent fixed-window count.
Result
Deliver a local limiter whose Allow method admits at most limit requests per key per window. A boundary tick starts a new window. Cleanup removes buckets older than the current window.
Larch Point Support needs a fixed-window request limiter for a local service. You will build it with a caller-supplied integer clock so the tests never sleep. A window starts at a multiple of width, and every key owns an independent count in that window. A request exactly on a boundary belongs to the new window. Keep state from each completed step as you add bucket calculation, state refresh, admission, cleanup and batch evaluation. The final deliverable is a deterministic local limiter, not a distributed service. It does not claim to coordinate across machines or survive a process restart. The fictional request counts are test fixtures. Explain which function owns state and why an already full bucket must refuse without increasing its admitted count.
Use the start of the containing window.