FAILURE MAP
← Case archive

FA-68463 / Toll and parking fee computation / Member archive

Street meter time purchase: a new purchase ignores the remaining paid time · case 03

Street meter time purchase returns a wrong result when a new purchase ignores the remaining paid time.

Member previewVariant 3 · 3 implementations · 8 checks per implementation

Case contract

Input {now, expiry (or null), paid_cents, rate_per_hour, max_minutes, enf_start, enf_end, increment}. Only whole increments are credited. At or after enforcement end nothing is sold: [null, 0]. Paid time starts at the later of now, enforcement start and any unexpired expiry; it ends at the earliest of start + purchased minutes (floor), max(now, enf_start) + max_minutes, and enf_end. Accepted cents = min(credited, ceil(used minutes * rate/60)). Return [new expiry, accepted cents].

Why this case matters

Fee engines bill customers in integer cents; a wrong boundary, rounding stage or cap scope silently over- or under-charges.

One recorded failure

Sample boundary fixture

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

Boundary fixtureActualExpectedOutcome
fee oracle 4[651, 10][670, 10]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 ↗