FAILURE MAP
← Case archive

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

EV charging session and idle fee: energy is billed in whole kWh · case 02

EV charging session and idle fee returns a wrong result when energy is billed in whole kWh.

Member previewVariant 2 · 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": 2340, "idle": 950, "total": 3390}{"energy": 2384, "idle": 950, "total": 3434}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 ↗