{"abstract":"The first billable morning minute is waived and the first night minute is 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":"Making both ends inclusive still bills the 22:00 minute.","family":"w2-ev_charging_session_scheduling-idle-occupancy-fee-night-waiver-window-edges","id":"FA-92886","implementations":{"attempt":{"sha256":"142703d39a27862fe02dcdf5fee6d6eb1078641c20e6e46715b111a09cf66f1b","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: night waiver window edges', [745, 831, 1323, 0, 40, 1000, 10], [489, 1000]],\n  ['regression: night waiver window edges (partial repair)', [1210, 1288, 1405, 30, 40, None, 5],\n   [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: night waiver window edges', [935, 1103, 1359, 15, 25, 0, 15], [202, 0]],\n  ['regression: night waiver window edges (partial repair)', [937, 1179, 1382, 15, 40, None, 1],\n   [126, 5040]],\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: night waiver window edges', [1142, 1227, 1440, 10, 25, 0, 1], [83, 0]],\n  ['regression: night waiver window edges (partial repair)', [1042, 1241, 1388, 10, 25, 1000, 10],\n   [69, 175]],\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: night waiver window edges', [37, 320, 601, 10, 5, None, 10], [241, 125]],\n  ['regression: night waiver window edges (partial repair)', [926, 1191, 1440, 15, 25, None, 15],\n   [114, 200]],\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: night waiver window edges', [1177, 1189, 1440, 15, 5, 1000, 5], [116, 120]],\n  ['regression: night waiver window edges (partial repair)', [808, 1193, 1387, 15, 5, None, 1],\n   [112, 560]],\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":"2d0dda67a7c984ba996b4786cb2ad655c44e313cbe63de5f5a1c818b1f8b0d7d","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: night waiver window edges', [745, 831, 1323, 0, 40, 1000, 10], [489, 1000]],\n  ['regression: night waiver window edges (partial repair)', [1210, 1288, 1405, 30, 40, None, 5],\n   [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: night waiver window edges', [935, 1103, 1359, 15, 25, 0, 15], [202, 0]],\n  ['regression: night waiver window edges (partial repair)', [937, 1179, 1382, 15, 40, None, 1],\n   [126, 5040]],\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: night waiver window edges', [1142, 1227, 1440, 10, 25, 0, 1], [83, 0]],\n  ['regression: night waiver window edges (partial repair)', [1042, 1241, 1388, 10, 25, 1000, 10],\n   [69, 175]],\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: night waiver window edges', [37, 320, 601, 10, 5, None, 10], [241, 125]],\n  ['regression: night waiver window edges (partial repair)', [926, 1191, 1440, 15, 25, None, 15],\n   [114, 200]],\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: night waiver window edges', [1177, 1189, 1440, 15, 5, 1000, 5], [116, 120]],\n  ['regression: night waiver window edges (partial repair)', [808, 1193, 1387, 15, 5, None, 1],\n   [112, 560]],\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-night-waiver-window-edges","generated_at":"2026-09-29T14:51:50.006210+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":"The billable window bounds are shifted by one minute at both ends.","sha256":"7eca5c99a4bde28b416c87d82b04a602abe44731445b4059a26eff49151ac24f","title":"Post-charge idle occupancy fee: night waiver window edges · 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":44.537,"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":[21,210],"check":"boundary: idle crosses night waiver","expected":[20,200],"passed":false},{"actual":[490,1000],"check":"regression: night waiver window edges","expected":[489,1000],"passed":false},{"actual":[3,40],"check":"regression: night waiver window edges (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\": [21, 210], \"expected\": [20, 200], \"passed\": false}, {\"check\": \"regression: night waiver window edges\", \"actual\": [490, 1000], \"expected\": [489, 1000], \"passed\": false}, {\"check\": \"regression: night waiver window edges (partial repair)\", \"actual\": [3, 40], \"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":43.557,"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":[21,210],"check":"boundary: idle crosses night waiver","expected":[20,200],"passed":false},{"actual":[490,1000],"check":"regression: night waiver window edges","expected":[489,1000],"passed":false},{"actual":[3,40],"check":"regression: night waiver window edges (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\": [21, 210], \"expected\": [20, 200], \"passed\": false}, {\"check\": \"regression: night waiver window edges\", \"actual\": [490, 1000], \"expected\": [489, 1000], \"passed\": false}, {\"check\": \"regression: night waiver window edges (partial repair)\", \"actual\": [3, 40], \"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"}},"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."}}