{"abstract":"Drivers are billed idle time for minutes during which the car was still charging.","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].","evaluation_group":"w2-ev_charging_session_scheduling-idle-occupancy-fee","failed_approach":"Taking the later of plug+grace and done forgets the grace after completion.","family":"w2-ev_charging_session_scheduling-idle-occupancy-fee-grace-anchor","id":"FA-92876","implementations":{"attempt":{"sha256":"4a68eec62eb3775c273395bffc22c94e357fe2492afdaa896d1ce5cf7202055c","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 = plug + grace if plug + grace > done else done\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: grace anchor', [267, 472, 501, 15, 5, None, 10], [14, 10]],\n  ['regression: grace anchor (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: grace anchor', [1177, 1392, 1440, 15, 5, 300, 10], [0, 0]],\n  ['regression: grace anchor (partial repair)', [935, 1103, 1359, 15, 25, 0, 15], [202, 0]],\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: grace anchor', [1262, 1395, 1440, 0, 40, None, 5], [0, 0]],\n  ['regression: grace anchor (partial repair)', [1142, 1227, 1440, 10, 25, 0, 1], [83, 0]],\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: grace anchor', [240, 384, 858, 0, 40, None, 15], [474, 1280]],\n  ['regression: grace anchor (partial repair)', [306, 373, 739, 10, 25, None, 10], [356, 900]],\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: grace anchor', [1177, 1189, 1440, 15, 5, 1000, 5], [116, 120]],\n  ['regression: grace anchor (partial repair)', [808, 1193, 1387, 15, 5, None, 1], [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":"d8925f67b48fdfe9708dee3fc226875ab15bbd1a4ac18d41027056eeafd6adff","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 = plug + 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: grace anchor', [267, 472, 501, 15, 5, None, 10], [14, 10]],\n  ['regression: grace anchor (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: grace anchor', [1177, 1392, 1440, 15, 5, 300, 10], [0, 0]],\n  ['regression: grace anchor (partial repair)', [935, 1103, 1359, 15, 25, 0, 15], [202, 0]],\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: grace anchor', [1262, 1395, 1440, 0, 40, None, 5], [0, 0]],\n  ['regression: grace anchor (partial repair)', [1142, 1227, 1440, 10, 25, 0, 1], [83, 0]],\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: grace anchor', [240, 384, 858, 0, 40, None, 15], [474, 1280]],\n  ['regression: grace anchor (partial repair)', [306, 373, 739, 10, 25, None, 10], [356, 900]],\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: grace anchor', [1177, 1189, 1440, 15, 5, 1000, 5], [116, 120]],\n  ['regression: grace anchor (partial repair)', [808, 1193, 1387, 15, 5, None, 1], [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"},"fixed":{"sha256":"b3d121bc7a7cea8d47778c09c924bc804d83af5f422bfe2635a1deb24b34579d","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: grace anchor', [267, 472, 501, 15, 5, None, 10], [14, 10]],\n  ['regression: grace anchor (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: grace anchor', [1177, 1392, 1440, 15, 5, 300, 10], [0, 0]],\n  ['regression: grace anchor (partial repair)', [935, 1103, 1359, 15, 25, 0, 15], [202, 0]],\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: grace anchor', [1262, 1395, 1440, 0, 40, None, 5], [0, 0]],\n  ['regression: grace anchor (partial repair)', [1142, 1227, 1440, 10, 25, 0, 1], [83, 0]],\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: grace anchor', [240, 384, 858, 0, 40, None, 15], [474, 1280]],\n  ['regression: grace anchor (partial repair)', [306, 373, 739, 10, 25, None, 10], [356, 900]],\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: grace anchor', [1177, 1189, 1440, 15, 5, 1000, 5], [116, 120]],\n  ['regression: grace anchor (partial repair)', [808, 1193, 1387, 15, 5, None, 1], [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-grace-anchor","generated_at":"2026-09-29T14:51:49.927547+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.","repair":"Start idle time at done + grace.","root_cause":"The grace period is measured from plug-in instead of from charge completion.","sha256":"b38fcf50cf3beeab01f1ac46fb2dbc35eefaba14b129b4f6046a7638ebf52529","title":"Post-charge idle occupancy fee: grace anchor · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":41.004,"exit_code":1,"observations":[{"actual":[10,50],"check":"boundary: unplugged inside grace","expected":[0,0],"passed":false},{"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":[29,15],"check":"regression: grace anchor","expected":[14,10],"passed":false},{"actual":[32,280],"check":"regression: grace anchor (partial repair)","expected":[2,40],"passed":false},{"actual":[289,1000],"check":"control 1","expected":[285,1000],"passed":false},{"actual":[398,135],"check":"control 2","expected":[388,130],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"boundary: unplugged inside grace\", \"actual\": [10, 50], \"expected\": [0, 0], \"passed\": false}, {\"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: grace anchor\", \"actual\": [29, 15], \"expected\": [14, 10], \"passed\": false}, {\"check\": \"regression: grace anchor (partial repair)\", \"actual\": [32, 280], \"expected\": [2, 40], \"passed\": false}, {\"check\": \"control 1\", \"actual\": [289, 1000], \"expected\": [285, 1000], \"passed\": false}, {\"check\": \"control 2\", \"actual\": [398, 135], \"expected\": [388, 130], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":38.076,"exit_code":1,"observations":[{"actual":[95,475],"check":"boundary: unplugged inside grace","expected":[0,0],"passed":false},{"actual":[0,0],"check":"boundary: never finished","expected":[0,0],"passed":true},{"actual":[120,1200],"check":"boundary: idle crosses night waiver","expected":[20,200],"passed":false},{"actual":[141,75],"check":"regression: grace anchor","expected":[14,10],"passed":false},{"actual":[80,640],"check":"regression: grace anchor (partial repair)","expected":[2,40],"passed":false},{"actual":[289,1000],"check":"control 1","expected":[285,1000],"passed":false},{"actual":[685,230],"check":"control 2","expected":[388,130],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"boundary: unplugged inside grace\", \"actual\": [95, 475], \"expected\": [0, 0], \"passed\": false}, {\"check\": \"boundary: never finished\", \"actual\": [0, 0], \"expected\": [0, 0], \"passed\": true}, {\"check\": \"boundary: idle crosses night waiver\", \"actual\": [120, 1200], \"expected\": [20, 200], \"passed\": false}, {\"check\": \"regression: grace anchor\", \"actual\": [141, 75], \"expected\": [14, 10], \"passed\": false}, {\"check\": \"regression: grace anchor (partial repair)\", \"actual\": [80, 640], \"expected\": [2, 40], \"passed\": false}, {\"check\": \"control 1\", \"actual\": [289, 1000], \"expected\": [285, 1000], \"passed\": false}, {\"check\": \"control 2\", \"actual\": [685, 230], \"expected\": [388, 130], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":41.738,"exit_code":0,"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,10],"check":"regression: grace anchor","expected":[14,10],"passed":true},{"actual":[2,40],"check":"regression: grace anchor (partial repair)","expected":[2,40],"passed":true},{"actual":[285,1000],"check":"control 1","expected":[285,1000],"passed":true},{"actual":[388,130],"check":"control 2","expected":[388,130],"passed":true}],"passed":true,"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: grace anchor\", \"actual\": [14, 10], \"expected\": [14, 10], \"passed\": true}, {\"check\": \"regression: grace anchor (partial repair)\", \"actual\": [2, 40], \"expected\": [2, 40], \"passed\": true}, {\"check\": \"control 1\", \"actual\": [285, 1000], \"expected\": [285, 1000], \"passed\": true}, {\"check\": \"control 2\", \"actual\": [388, 130], \"expected\": [388, 130], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}