{"abstract":"Idle minutes shorter than a full block are never billed.","category":"EV charging session scheduling","checks":7,"contract":"Times are minutes 0..1440 of one day. done is when charging finished (None: never finished, no idle fee). Idle time starts at done+grace and ends at unplug (exclusive). Only minutes in [360, 1320) are billable (night waiver). Fee = ceil(billable/block)*rate cents, then capped at cap when cap is not None (cap 0 waives the fee). Return [billable minutes, fee].","contract_signature":"plug, done, unplug, grace, rate, cap, block","evaluation_group":"w2-ev_charging_session_scheduling-idle-occupancy-fee","failed_approach":"Nearest rounding still drops started blocks that are less than half used.","family":"w2-ev_charging_session_scheduling-idle-occupancy-fee-block-rounding","id":"FA-92881","implementations":{"attempt":{"sha256":"a92cbc5cfba13e395dc86a791daf57f0b961958a7778f1bb2d3a664a950f9cec","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(plug, done, unplug, grace, rate, cap, block):\n    if done is None or unplug <= done:\n        return [0, 0]\n    start = done + grace\n    if unplug <= start:\n        return [0, 0]\n    billable = 0\n    for m in range(start, unplug):\n        if 360 <= m < 1320:\n            billable += 1\n    blocks = round(billable / block)\n    fee = blocks * rate\n    if cap is not None:\n        fee = min(fee, cap)\n    return [billable, fee]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['boundary: unplugged inside grace', [600, 700, 710, 15, 25, None, 5], [0, 0]],\n  ['boundary: never finished', [600, None, 900, 0, 25, None, 5], [0, 0]],\n  ['boundary: idle crosses night waiver', [1200, 1300, 1400, 0, 10, None, 1], [20, 200]],\n  ['regression: block rounding', [267, 472, 501, 15, 5, None, 10], [14, 10]],\n  ['regression: block rounding (partial repair)', [1210, 1288, 1405, 30, 40, None, 5], [2, 40]],\n  ['control 1', [708, 712, 1012, 15, 25, 1000, 5], [285, 1000]],\n  ['control 2', [424, 721, 1119, 10, 5, None, 15], [388, 130]]],\n [['boundary: unplugged inside grace', [600, 700, 710, 15, 25, None, 5], [0, 0]],\n  ['boundary: never finished', [600, None, 900, 0, 25, None, 5], [0, 0]],\n  ['boundary: idle crosses night waiver', [1200, 1300, 1400, 0, 10, None, 1], [20, 200]],\n  ['regression: block rounding', [11, 183, 646, 10, 40, 1000, 15], [286, 800]],\n  ['regression: block rounding (partial repair)', [797, 925, 1320, 10, 25, 1000, 10], [385, 975]],\n  ['control 1', [1149, 1440, 1440, 0, 25, None, 1], [0, 0]],\n  ['control 2', [421, 583, 815, 15, 5, 300, 15], [217, 75]]],\n [['boundary: unplugged inside grace', [600, 700, 710, 15, 25, None, 5], [0, 0]],\n  ['boundary: never finished', [600, None, 900, 0, 25, None, 5], [0, 0]],\n  ['boundary: idle crosses night waiver', [1200, 1300, 1400, 0, 10, None, 1], [20, 200]],\n  ['regression: block rounding', [649, 977, 1118, 10, 5, 1000, 10], [131, 70]],\n  ['regression: block rounding (partial repair)', [839, 991, 1013, 15, 25, 1000, 5], [7, 50]],\n  ['control 1', [1122, 1422, 1434, 10, 25, 0, 10], [0, 0]],\n  ['control 2', [325, 596, 781, 30, 25, None, 15], [155, 275]]],\n [['boundary: unplugged inside grace', [600, 700, 710, 15, 25, None, 5], [0, 0]],\n  ['boundary: never finished', [600, None, 900, 0, 25, None, 5], [0, 0]],\n  ['boundary: idle crosses night waiver', [1200, 1300, 1400, 0, 10, None, 1], [20, 200]],\n  ['regression: block rounding', [37, 320, 601, 10, 5, None, 10], [241, 125]],\n  ['regression: block rounding (partial repair)', [349, 571, 753, 30, 5, 300, 5], [152, 155]],\n  ['control 1', [887, 906, 899, 15, 5, 1000, 10], [0, 0]],\n  ['control 2', [684, 849, 1335, 30, 25, 1000, 10], [441, 1000]]],\n [['boundary: unplugged inside grace', [600, 700, 710, 15, 25, None, 5], [0, 0]],\n  ['boundary: never finished', [600, None, 900, 0, 25, None, 5], [0, 0]],\n  ['boundary: idle crosses night waiver', [1200, 1300, 1400, 0, 10, None, 1], [20, 200]],\n  ['regression: block rounding', [1177, 1189, 1440, 15, 5, 1000, 5], [116, 120]],\n  ['regression: block rounding (partial repair)', [334, 705, 791, 30, 25, 1000, 5], [56, 300]],\n  ['control 1', [942, 1011, 983, 15, 25, 300, 10], [0, 0]],\n  ['control 2', [306, 373, 739, 10, 25, None, 10], [356, 900]]]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"aaa9da04a4cc958de3d4667ecf34de4df15f7f33fe5834058ea7173b0498c028","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(plug, done, unplug, grace, rate, cap, block):\n    if done is None or unplug <= done:\n        return [0, 0]\n    start = done + grace\n    if unplug <= start:\n        return [0, 0]\n    billable = 0\n    for m in range(start, unplug):\n        if 360 <= m < 1320:\n            billable += 1\n    blocks = billable // block\n    fee = blocks * rate\n    if cap is not None:\n        fee = min(fee, cap)\n    return [billable, fee]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['boundary: unplugged inside grace', [600, 700, 710, 15, 25, None, 5], [0, 0]],\n  ['boundary: never finished', [600, None, 900, 0, 25, None, 5], [0, 0]],\n  ['boundary: idle crosses night waiver', [1200, 1300, 1400, 0, 10, None, 1], [20, 200]],\n  ['regression: block rounding', [267, 472, 501, 15, 5, None, 10], [14, 10]],\n  ['regression: block rounding (partial repair)', [1210, 1288, 1405, 30, 40, None, 5], [2, 40]],\n  ['control 1', [708, 712, 1012, 15, 25, 1000, 5], [285, 1000]],\n  ['control 2', [424, 721, 1119, 10, 5, None, 15], [388, 130]]],\n [['boundary: unplugged inside grace', [600, 700, 710, 15, 25, None, 5], [0, 0]],\n  ['boundary: never finished', [600, None, 900, 0, 25, None, 5], [0, 0]],\n  ['boundary: idle crosses night waiver', [1200, 1300, 1400, 0, 10, None, 1], [20, 200]],\n  ['regression: block rounding', [11, 183, 646, 10, 40, 1000, 15], [286, 800]],\n  ['regression: block rounding (partial repair)', [797, 925, 1320, 10, 25, 1000, 10], [385, 975]],\n  ['control 1', [1149, 1440, 1440, 0, 25, None, 1], [0, 0]],\n  ['control 2', [421, 583, 815, 15, 5, 300, 15], [217, 75]]],\n [['boundary: unplugged inside grace', [600, 700, 710, 15, 25, None, 5], [0, 0]],\n  ['boundary: never finished', [600, None, 900, 0, 25, None, 5], [0, 0]],\n  ['boundary: idle crosses night waiver', [1200, 1300, 1400, 0, 10, None, 1], [20, 200]],\n  ['regression: block rounding', [649, 977, 1118, 10, 5, 1000, 10], [131, 70]],\n  ['regression: block rounding (partial repair)', [839, 991, 1013, 15, 25, 1000, 5], [7, 50]],\n  ['control 1', [1122, 1422, 1434, 10, 25, 0, 10], [0, 0]],\n  ['control 2', [325, 596, 781, 30, 25, None, 15], [155, 275]]],\n [['boundary: unplugged inside grace', [600, 700, 710, 15, 25, None, 5], [0, 0]],\n  ['boundary: never finished', [600, None, 900, 0, 25, None, 5], [0, 0]],\n  ['boundary: idle crosses night waiver', [1200, 1300, 1400, 0, 10, None, 1], [20, 200]],\n  ['regression: block rounding', [37, 320, 601, 10, 5, None, 10], [241, 125]],\n  ['regression: block rounding (partial repair)', [349, 571, 753, 30, 5, 300, 5], [152, 155]],\n  ['control 1', [887, 906, 899, 15, 5, 1000, 10], [0, 0]],\n  ['control 2', [684, 849, 1335, 30, 25, 1000, 10], [441, 1000]]],\n [['boundary: unplugged inside grace', [600, 700, 710, 15, 25, None, 5], [0, 0]],\n  ['boundary: never finished', [600, None, 900, 0, 25, None, 5], [0, 0]],\n  ['boundary: idle crosses night waiver', [1200, 1300, 1400, 0, 10, None, 1], [20, 200]],\n  ['regression: block rounding', [1177, 1189, 1440, 15, 5, 1000, 5], [116, 120]],\n  ['regression: block rounding (partial repair)', [334, 705, 791, 30, 25, 1000, 5], [56, 300]],\n  ['control 1', [942, 1011, 983, 15, 25, 300, 10], [0, 0]],\n  ['control 2', [306, 373, 739, 10, 25, None, 10], [356, 900]]]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"Deterministic stipulated toy contract for teaching; no claim of conformance with any standard, vendor protocol or production controller. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"w2-ev_charging_session_scheduling-idle-occupancy-fee-block-rounding","generated_at":"2026-09-29T14:51:49.962780+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Depot, workplace and public EV chargers schedule sessions against prices, circuit limits and departure deadlines; a wrong decision silently strands a driver or overloads a feeder.","root_cause":"Started billing blocks are floored instead of rounded up.","sha256":"c80e140cd31e76603de69064aac1efb06cec3d2d09ac01713ea0f93c6f1bf352","title":"Post-charge idle occupancy fee: block rounding · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":41.516,"exit_code":1,"observations":[{"actual":[0,0],"check":"boundary: unplugged inside grace","expected":[0,0],"passed":true},{"actual":[0,0],"check":"boundary: never finished","expected":[0,0],"passed":true},{"actual":[20,200],"check":"boundary: idle crosses night waiver","expected":[20,200],"passed":true},{"actual":[14,5],"check":"regression: block rounding","expected":[14,10],"passed":false},{"actual":[2,0],"check":"regression: block rounding (partial repair)","expected":[2,40],"passed":false},{"actual":[285,1000],"check":"control 1","expected":[285,1000],"passed":true},{"actual":[388,130],"check":"control 2","expected":[388,130],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"boundary: unplugged inside grace\", \"actual\": [0, 0], \"expected\": [0, 0], \"passed\": true}, {\"check\": \"boundary: never finished\", \"actual\": [0, 0], \"expected\": [0, 0], \"passed\": true}, {\"check\": \"boundary: idle crosses night waiver\", \"actual\": [20, 200], \"expected\": [20, 200], \"passed\": true}, {\"check\": \"regression: block rounding\", \"actual\": [14, 5], \"expected\": [14, 10], \"passed\": false}, {\"check\": \"regression: block rounding (partial repair)\", \"actual\": [2, 0], \"expected\": [2, 40], \"passed\": false}, {\"check\": \"control 1\", \"actual\": [285, 1000], \"expected\": [285, 1000], \"passed\": true}, {\"check\": \"control 2\", \"actual\": [388, 130], \"expected\": [388, 130], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.184,"exit_code":1,"observations":[{"actual":[0,0],"check":"boundary: unplugged inside grace","expected":[0,0],"passed":true},{"actual":[0,0],"check":"boundary: never finished","expected":[0,0],"passed":true},{"actual":[20,200],"check":"boundary: idle crosses night waiver","expected":[20,200],"passed":true},{"actual":[14,5],"check":"regression: block rounding","expected":[14,10],"passed":false},{"actual":[2,0],"check":"regression: block rounding (partial repair)","expected":[2,40],"passed":false},{"actual":[285,1000],"check":"control 1","expected":[285,1000],"passed":true},{"actual":[388,125],"check":"control 2","expected":[388,130],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"boundary: unplugged inside grace\", \"actual\": [0, 0], \"expected\": [0, 0], \"passed\": true}, {\"check\": \"boundary: never finished\", \"actual\": [0, 0], \"expected\": [0, 0], \"passed\": true}, {\"check\": \"boundary: idle crosses night waiver\", \"actual\": [20, 200], \"expected\": [20, 200], \"passed\": true}, {\"check\": \"regression: block rounding\", \"actual\": [14, 5], \"expected\": [14, 10], \"passed\": false}, {\"check\": \"regression: block rounding (partial repair)\", \"actual\": [2, 0], \"expected\": [2, 40], \"passed\": false}, {\"check\": \"control 1\", \"actual\": [285, 1000], \"expected\": [285, 1000], \"passed\": true}, {\"check\": \"control 2\", \"actual\": [388, 125], \"expected\": [388, 130], \"passed\": false}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}