{"abstract":"The opening minute of an overnight window is refused.","category":"EV charging session scheduling","checks":7,"contract":"rules are [day_mask, start, end] with bit 0 = Monday .. bit 6 = Sunday. start < end is a same-day window [start, end); start == end means the whole selected day; start > end crosses midnight and belongs to its start day (Sunday continues into Monday). Return the sorted indices of rules allowing charging at (day 0..6, minute 0..1439).","evaluation_group":"w2-ev_charging_session_scheduling-weekly-charging-windows","failed_approach":"Excluding 23:59 cuts the last minute before midnight.","family":"w2-ev_charging_session_scheduling-weekly-charging-windows-overnight-head-start","id":"FA-93146","implementations":{"attempt":{"sha256":"047551fda5b6fe9ff6a9265411e99e9173502b29594b11d10d6ada1d6c57d315","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(rules, day, minute):\n    hits = []\n    for i, (mask, s, e) in enumerate(rules):\n        today = mask >> day & 1\n        yday = mask >> (day - 1) % 7 & 1\n        if s == e:\n            if today:\n                hits.append(i)\n        elif s < e:\n            if today and s <= minute < e:\n                hits.append(i)\n        elif (today and minute >= s and minute < 1439) or (yday and minute < e):\n            hits.append(i)\n    return hits\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['boundary: Monday morning after Sunday night window', [[[64, 1320, 360]], 0, 100], [0]],\n  ['boundary: same-day window end minute', [[[127, 60, 360]], 3, 360], []],\n  ['boundary: whole-day rule', [[[4, 420, 420]], 2, 5], [0]],\n  ['regression: overnight head start', [[[96, 60, 1380], [57, 1080, 60], [60, 0, 1320]], 4, 1080],\n   [1, 2]],\n  ['regression: overnight head start (partial repair)',\n   [[[80, 1380, 60], [124, 1380, 1320], [58, 1080, 420]], 4, 1439], [0, 1, 2]],\n  ['control 1', [[[75, 1380, 360]], 0, 1379], []],\n  ['control 2', [[[26, 1380, 420], [118, 360, 0], [104, 1080, 1080]], 3, 0], [2]]],\n [['boundary: Monday morning after Sunday night window', [[[64, 1320, 360]], 0, 100], [0]],\n  ['boundary: same-day window end minute', [[[127, 60, 360]], 3, 360], []],\n  ['boundary: whole-day rule', [[[4, 420, 420]], 2, 5], [0]],\n  ['regression: overnight head start', [[[63, 360, 360], [35, 60, 0], [120, 1080, 420]], 5, 1080],\n   [0, 1, 2]],\n  ['regression: overnight head start (partial repair)',\n   [[[113, 1320, 0], [95, 0, 0], [95, 1320, 0], [124, 1380, 60]], 0, 1439], [0, 1, 2]],\n  ['control 1', [[[18, 60, 0], [118, 1080, 0], [124, 60, 360], [93, 1080, 60]], 4, 0], [3]],\n  ['control 2', [[[28, 1320, 1080], [123, 420, 1380], [9, 1380, 0]], 6, 359], []]],\n [['boundary: Monday morning after Sunday night window', [[[64, 1320, 360]], 0, 100], [0]],\n  ['boundary: same-day window end minute', [[[127, 60, 360]], 3, 360], []],\n  ['boundary: whole-day rule', [[[4, 420, 420]], 2, 5], [0]],\n  ['regression: overnight head start', [[[59, 360, 60], [45, 420, 60]], 5, 360], [0]],\n  ['regression: overnight head start (partial repair)',\n   [[[58, 0, 1080], [124, 1320, 1080], [79, 0, 0], [46, 1380, 60]], 1, 1439], [2, 3]],\n  ['control 1', [[[103, 0, 360], [65, 360, 1380], [37, 1080, 1080]], 4, 60], []],\n  ['control 2', [[[52, 420, 1320], [97, 1080, 360]], 0, 0], [1]]],\n [['boundary: Monday morning after Sunday night window', [[[64, 1320, 360]], 0, 100], [0]],\n  ['boundary: same-day window end minute', [[[127, 60, 360]], 3, 360], []],\n  ['boundary: whole-day rule', [[[4, 420, 420]], 2, 5], [0]],\n  ['regression: overnight head start',\n   [[[92, 360, 60], [95, 420, 1080], [89, 0, 360], [2, 360, 420]], 6, 360], [0]],\n  ['regression: overnight head start (partial repair)',\n   [[[69, 0, 420], [105, 420, 1380], [94, 360, 0]], 3, 1439], [2]],\n  ['control 1', [[[105, 420, 360], [31, 1380, 1320], [47, 1080, 1320]], 4, 60], [0, 1]],\n  ['control 2', [[[59, 360, 60], [45, 420, 60]], 5, 360], [0]]],\n [['boundary: Monday morning after Sunday night window', [[[64, 1320, 360]], 0, 100], [0]],\n  ['boundary: same-day window end minute', [[[127, 60, 360]], 3, 360], []],\n  ['boundary: whole-day rule', [[[4, 420, 420]], 2, 5], [0]],\n  ['regression: overnight head start',\n   [[[20, 420, 1080], [44, 1320, 60], [78, 1080, 360]], 1, 1080], [2]],\n  ['regression: overnight head start (partial repair)',\n   [[[69, 0, 420], [105, 420, 1380], [94, 360, 0]], 3, 1439], [2]],\n  ['control 1', [[[51, 360, 60], [78, 1080, 1080], [25, 1320, 360], [11, 360, 0]], 2, 1380], [1]],\n  ['control 2', [[[16, 1380, 0]], 1, 360], []]]]\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":"16cd064173525151aed393989db8dad7e76676876de5427e5985cc1c61829156","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(rules, day, minute):\n    hits = []\n    for i, (mask, s, e) in enumerate(rules):\n        today = mask >> day & 1\n        yday = mask >> (day - 1) % 7 & 1\n        if s == e:\n            if today:\n                hits.append(i)\n        elif s < e:\n            if today and s <= minute < e:\n                hits.append(i)\n        elif (today and minute > s) or (yday and minute < e):\n            hits.append(i)\n    return hits\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['boundary: Monday morning after Sunday night window', [[[64, 1320, 360]], 0, 100], [0]],\n  ['boundary: same-day window end minute', [[[127, 60, 360]], 3, 360], []],\n  ['boundary: whole-day rule', [[[4, 420, 420]], 2, 5], [0]],\n  ['regression: overnight head start', [[[96, 60, 1380], [57, 1080, 60], [60, 0, 1320]], 4, 1080],\n   [1, 2]],\n  ['regression: overnight head start (partial repair)',\n   [[[80, 1380, 60], [124, 1380, 1320], [58, 1080, 420]], 4, 1439], [0, 1, 2]],\n  ['control 1', [[[75, 1380, 360]], 0, 1379], []],\n  ['control 2', [[[26, 1380, 420], [118, 360, 0], [104, 1080, 1080]], 3, 0], [2]]],\n [['boundary: Monday morning after Sunday night window', [[[64, 1320, 360]], 0, 100], [0]],\n  ['boundary: same-day window end minute', [[[127, 60, 360]], 3, 360], []],\n  ['boundary: whole-day rule', [[[4, 420, 420]], 2, 5], [0]],\n  ['regression: overnight head start', [[[63, 360, 360], [35, 60, 0], [120, 1080, 420]], 5, 1080],\n   [0, 1, 2]],\n  ['regression: overnight head start (partial repair)',\n   [[[113, 1320, 0], [95, 0, 0], [95, 1320, 0], [124, 1380, 60]], 0, 1439], [0, 1, 2]],\n  ['control 1', [[[18, 60, 0], [118, 1080, 0], [124, 60, 360], [93, 1080, 60]], 4, 0], [3]],\n  ['control 2', [[[28, 1320, 1080], [123, 420, 1380], [9, 1380, 0]], 6, 359], []]],\n [['boundary: Monday morning after Sunday night window', [[[64, 1320, 360]], 0, 100], [0]],\n  ['boundary: same-day window end minute', [[[127, 60, 360]], 3, 360], []],\n  ['boundary: whole-day rule', [[[4, 420, 420]], 2, 5], [0]],\n  ['regression: overnight head start', [[[59, 360, 60], [45, 420, 60]], 5, 360], [0]],\n  ['regression: overnight head start (partial repair)',\n   [[[58, 0, 1080], [124, 1320, 1080], [79, 0, 0], [46, 1380, 60]], 1, 1439], [2, 3]],\n  ['control 1', [[[103, 0, 360], [65, 360, 1380], [37, 1080, 1080]], 4, 60], []],\n  ['control 2', [[[52, 420, 1320], [97, 1080, 360]], 0, 0], [1]]],\n [['boundary: Monday morning after Sunday night window', [[[64, 1320, 360]], 0, 100], [0]],\n  ['boundary: same-day window end minute', [[[127, 60, 360]], 3, 360], []],\n  ['boundary: whole-day rule', [[[4, 420, 420]], 2, 5], [0]],\n  ['regression: overnight head start',\n   [[[92, 360, 60], [95, 420, 1080], [89, 0, 360], [2, 360, 420]], 6, 360], [0]],\n  ['regression: overnight head start (partial repair)',\n   [[[69, 0, 420], [105, 420, 1380], [94, 360, 0]], 3, 1439], [2]],\n  ['control 1', [[[105, 420, 360], [31, 1380, 1320], [47, 1080, 1320]], 4, 60], [0, 1]],\n  ['control 2', [[[59, 360, 60], [45, 420, 60]], 5, 360], [0]]],\n [['boundary: Monday morning after Sunday night window', [[[64, 1320, 360]], 0, 100], [0]],\n  ['boundary: same-day window end minute', [[[127, 60, 360]], 3, 360], []],\n  ['boundary: whole-day rule', [[[4, 420, 420]], 2, 5], [0]],\n  ['regression: overnight head start',\n   [[[20, 420, 1080], [44, 1320, 60], [78, 1080, 360]], 1, 1080], [2]],\n  ['regression: overnight head start (partial repair)',\n   [[[69, 0, 420], [105, 420, 1380], [94, 360, 0]], 3, 1439], [2]],\n  ['control 1', [[[51, 360, 60], [78, 1080, 1080], [25, 1320, 360], [11, 360, 0]], 2, 1380], [1]],\n  ['control 2', [[[16, 1380, 0]], 1, 360], []]]]\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":"bfbc13306be60d26a6ef0d241f1248f6f86f4c14c5e0ff37f612130fe3283d79","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(rules, day, minute):\n    hits = []\n    for i, (mask, s, e) in enumerate(rules):\n        today = mask >> day & 1\n        yday = mask >> (day - 1) % 7 & 1\n        if s == e:\n            if today:\n                hits.append(i)\n        elif s < e:\n            if today and s <= minute < e:\n                hits.append(i)\n        elif (today and minute >= s) or (yday and minute < e):\n            hits.append(i)\n    return hits\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['boundary: Monday morning after Sunday night window', [[[64, 1320, 360]], 0, 100], [0]],\n  ['boundary: same-day window end minute', [[[127, 60, 360]], 3, 360], []],\n  ['boundary: whole-day rule', [[[4, 420, 420]], 2, 5], [0]],\n  ['regression: overnight head start', [[[96, 60, 1380], [57, 1080, 60], [60, 0, 1320]], 4, 1080],\n   [1, 2]],\n  ['regression: overnight head start (partial repair)',\n   [[[80, 1380, 60], [124, 1380, 1320], [58, 1080, 420]], 4, 1439], [0, 1, 2]],\n  ['control 1', [[[75, 1380, 360]], 0, 1379], []],\n  ['control 2', [[[26, 1380, 420], [118, 360, 0], [104, 1080, 1080]], 3, 0], [2]]],\n [['boundary: Monday morning after Sunday night window', [[[64, 1320, 360]], 0, 100], [0]],\n  ['boundary: same-day window end minute', [[[127, 60, 360]], 3, 360], []],\n  ['boundary: whole-day rule', [[[4, 420, 420]], 2, 5], [0]],\n  ['regression: overnight head start', [[[63, 360, 360], [35, 60, 0], [120, 1080, 420]], 5, 1080],\n   [0, 1, 2]],\n  ['regression: overnight head start (partial repair)',\n   [[[113, 1320, 0], [95, 0, 0], [95, 1320, 0], [124, 1380, 60]], 0, 1439], [0, 1, 2]],\n  ['control 1', [[[18, 60, 0], [118, 1080, 0], [124, 60, 360], [93, 1080, 60]], 4, 0], [3]],\n  ['control 2', [[[28, 1320, 1080], [123, 420, 1380], [9, 1380, 0]], 6, 359], []]],\n [['boundary: Monday morning after Sunday night window', [[[64, 1320, 360]], 0, 100], [0]],\n  ['boundary: same-day window end minute', [[[127, 60, 360]], 3, 360], []],\n  ['boundary: whole-day rule', [[[4, 420, 420]], 2, 5], [0]],\n  ['regression: overnight head start', [[[59, 360, 60], [45, 420, 60]], 5, 360], [0]],\n  ['regression: overnight head start (partial repair)',\n   [[[58, 0, 1080], [124, 1320, 1080], [79, 0, 0], [46, 1380, 60]], 1, 1439], [2, 3]],\n  ['control 1', [[[103, 0, 360], [65, 360, 1380], [37, 1080, 1080]], 4, 60], []],\n  ['control 2', [[[52, 420, 1320], [97, 1080, 360]], 0, 0], [1]]],\n [['boundary: Monday morning after Sunday night window', [[[64, 1320, 360]], 0, 100], [0]],\n  ['boundary: same-day window end minute', [[[127, 60, 360]], 3, 360], []],\n  ['boundary: whole-day rule', [[[4, 420, 420]], 2, 5], [0]],\n  ['regression: overnight head start',\n   [[[92, 360, 60], [95, 420, 1080], [89, 0, 360], [2, 360, 420]], 6, 360], [0]],\n  ['regression: overnight head start (partial repair)',\n   [[[69, 0, 420], [105, 420, 1380], [94, 360, 0]], 3, 1439], [2]],\n  ['control 1', [[[105, 420, 360], [31, 1380, 1320], [47, 1080, 1320]], 4, 60], [0, 1]],\n  ['control 2', [[[59, 360, 60], [45, 420, 60]], 5, 360], [0]]],\n [['boundary: Monday morning after Sunday night window', [[[64, 1320, 360]], 0, 100], [0]],\n  ['boundary: same-day window end minute', [[[127, 60, 360]], 3, 360], []],\n  ['boundary: whole-day rule', [[[4, 420, 420]], 2, 5], [0]],\n  ['regression: overnight head start',\n   [[[20, 420, 1080], [44, 1320, 60], [78, 1080, 360]], 1, 1080], [2]],\n  ['regression: overnight head start (partial repair)',\n   [[[69, 0, 420], [105, 420, 1380], [94, 360, 0]], 3, 1439], [2]],\n  ['control 1', [[[51, 360, 60], [78, 1080, 1080], [25, 1320, 360], [11, 360, 0]], 2, 1380], [1]],\n  ['control 2', [[[16, 1380, 0]], 1, 360], []]]]\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-weekly-charging-windows-overnight-head-start","generated_at":"2026-09-29T14:51:52.424193+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":"Allow minutes >= start on the start day.","root_cause":"The overnight head uses a strict comparison with the start minute.","sha256":"4fb628f513fe821e811fffd0ed7b3f3f35c1d2c53b34adb5e6e827c9dac44e51","title":"Weekly recurring charging windows: overnight head start · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":41.264,"exit_code":1,"observations":[{"actual":[0],"check":"boundary: Monday morning after Sunday night window","expected":[0],"passed":true},{"actual":[],"check":"boundary: same-day window end minute","expected":[],"passed":true},{"actual":[0],"check":"boundary: whole-day rule","expected":[0],"passed":true},{"actual":[1,2],"check":"regression: overnight head start","expected":[1,2],"passed":true},{"actual":[],"check":"regression: overnight head start (partial repair)","expected":[0,1,2],"passed":false},{"actual":[],"check":"control 1","expected":[],"passed":true},{"actual":[2],"check":"control 2","expected":[2],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"boundary: Monday morning after Sunday night window\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"boundary: same-day window end minute\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"boundary: whole-day rule\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"regression: overnight head start\", \"actual\": [1, 2], \"expected\": [1, 2], \"passed\": true}, {\"check\": \"regression: overnight head start (partial repair)\", \"actual\": [], \"expected\": [0, 1, 2], \"passed\": false}, {\"check\": \"control 1\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"control 2\", \"actual\": [2], \"expected\": [2], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.172,"exit_code":1,"observations":[{"actual":[0],"check":"boundary: Monday morning after Sunday night window","expected":[0],"passed":true},{"actual":[],"check":"boundary: same-day window end minute","expected":[],"passed":true},{"actual":[0],"check":"boundary: whole-day rule","expected":[0],"passed":true},{"actual":[2],"check":"regression: overnight head start","expected":[1,2],"passed":false},{"actual":[0,1,2],"check":"regression: overnight head start (partial repair)","expected":[0,1,2],"passed":true},{"actual":[],"check":"control 1","expected":[],"passed":true},{"actual":[2],"check":"control 2","expected":[2],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"boundary: Monday morning after Sunday night window\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"boundary: same-day window end minute\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"boundary: whole-day rule\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"regression: overnight head start\", \"actual\": [2], \"expected\": [1, 2], \"passed\": false}, {\"check\": \"regression: overnight head start (partial repair)\", \"actual\": [0, 1, 2], \"expected\": [0, 1, 2], \"passed\": true}, {\"check\": \"control 1\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"control 2\", \"actual\": [2], \"expected\": [2], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":43.99,"exit_code":0,"observations":[{"actual":[0],"check":"boundary: Monday morning after Sunday night window","expected":[0],"passed":true},{"actual":[],"check":"boundary: same-day window end minute","expected":[],"passed":true},{"actual":[0],"check":"boundary: whole-day rule","expected":[0],"passed":true},{"actual":[1,2],"check":"regression: overnight head start","expected":[1,2],"passed":true},{"actual":[0,1,2],"check":"regression: overnight head start (partial repair)","expected":[0,1,2],"passed":true},{"actual":[],"check":"control 1","expected":[],"passed":true},{"actual":[2],"check":"control 2","expected":[2],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"boundary: Monday morning after Sunday night window\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"boundary: same-day window end minute\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"boundary: whole-day rule\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"regression: overnight head start\", \"actual\": [1, 2], \"expected\": [1, 2], \"passed\": true}, {\"check\": \"regression: overnight head start (partial repair)\", \"actual\": [0, 1, 2], \"expected\": [0, 1, 2], \"passed\": true}, {\"check\": \"control 1\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"control 2\", \"actual\": [2], \"expected\": [2], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}