FA-237 / Runtime and resources / Member archive
Frequent checks destroy a token bucket's fractional credit · case 02
The limiter admits too few or too many operations when fractional refills occur between requests.
Case contract
Capacity and initial balance are nonnegative integers with initial <= capacity; rate is nonnegative. Requests are [nondecreasing rational timestamp string,nonnegative integer cost]. Refill from time zero, cap at capacity, and accept iff sufficient credit exists. Return [acceptance flags,exact rational balance].
Why this case matters
Models token accounting under frequent polling without binary-float noise; timestamps are injected, so this experiment makes no claim about scheduler accuracy or concurrent atomic updates.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fraction survives consumption | [[true, false], "2"] | [[true, true], "0"] | 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 ↗