FAILURE MAP
← Case archive

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

EV charging session and idle fee: the grace period is only a threshold · case 04

EV charging session and idle fee returns a wrong result when the grace period is only a threshold.

Member previewVariant 4 · 3 implementations · 8 checks per implementation

Case contract

Input {plug_in, charge_end, unplug (minutes), wh, price_per_kwh, idle_grace, idle_rate (per started 10 min), idle_cap, session_fee, min_fee}. Energy = ceil(wh*price/1000). Idle minutes = max(0, unplug - charge_end - grace); idle fee = min(idle_cap, started 10-minute blocks * idle_rate). Total = max(min_fee, session_fee + energy + idle). Return {energy, idle, total}.

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 0{"energy": 1400, "idle": 200, "total": 1600}{"energy": 1400, "idle": 100, "total": 1500}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 ↗