FAILURE MAP
← Case archive

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

EV charging session and idle fee: idle time is measured from plug-in · case 02

EV charging session and idle fee returns a wrong result when idle time is measured from plug-in.

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 2{"energy": 438, "idle": 500, "total": 1038}{"energy": 438, "idle": 50, "total": 588}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 ↗