{"abstract":"Charging is pulled forward even when the staggered start would still finish in time.","category":"EV charging session scheduling","checks":7,"contract":"To avoid a demand spike at a tariff switch each charger delays its start by delay = sum((i+1)*ord(c) for i, c in enumerate(cid)) % (max_delay+1) minutes after max(tariff_start, now). If that start is later than depart - dur it is pulled back to max(depart - dur, now). Status is 'ok' when start + dur <= depart else 'late'. Return [start, delay, status].","contract_signature":"cid, tariff_start, now, depart, dur, max_delay","evaluation_group":"w2-ev_charging_session_scheduling-staggered-tariff-start","failed_approach":"Using depart as the latest start lets sessions finish after departure.","family":"w2-ev_charging_session_scheduling-staggered-tariff-start-latest-start-derivation","id":"FA-93311","implementations":{"attempt":{"sha256":"5db70cc4095800c6fd517692e61f2fd88198c59516986ba939fff859bb808a92","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(cid, tariff_start, now, depart, dur, max_delay):\n    delay = sum((i + 1) * ord(c) for i, c in enumerate(cid)) % (max_delay + 1)\n    start = max(tariff_start, now) + delay\n    latest = depart\n    if start > latest:\n        start = max(latest, now)\n    status = 'ok' if start + dur <= depart else 'late'\n    return [start, delay, status]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['boundary: no stagger configured', ['CP7', 100, 50, 400, 60, 0], [100, 0, 'ok']],\n  ['boundary: deadline forces immediate start', ['CP12', 100, 50, 120, 70, 30], [50, 16, 'ok']],\n  ['boundary: tariff already active', ['CP3', 10, 50, 400, 60, 10], [56, 6, 'ok']],\n  ['regression: latest start derivation', ['CP929', 258, 12, 235, 31, 30], [204, 15, 'ok']],\n  ['regression: latest start derivation (partial repair)', ['CP495', 117, 47, 359, 266, 0],\n   [93, 0, 'ok']],\n  ['control 1', ['CP310', 208, 18, 199, 159, 0], [40, 0, 'ok']],\n  ['control 2', ['CP766', 294, 150, 208, 201, 30], [150, 10, 'late']]],\n [['boundary: no stagger configured', ['CP7', 100, 50, 400, 60, 0], [100, 0, 'ok']],\n  ['boundary: deadline forces immediate start', ['CP12', 100, 50, 120, 70, 30], [50, 16, 'ok']],\n  ['boundary: tariff already active', ['CP3', 10, 50, 400, 60, 10], [56, 6, 'ok']],\n  ['regression: latest start derivation', ['CP990', 237, 16, 437, 299, 30], [138, 29, 'ok']],\n  ['regression: latest start derivation (partial repair)', ['CP272', 217, 184, 482, 298, 15],\n   [184, 15, 'ok']],\n  ['control 1', ['CP883', 235, 120, 211, 80, 5], [131, 4, 'ok']],\n  ['control 2', ['CP742', 19, 177, 199, 247, 10], [177, 3, 'late']]],\n [['boundary: no stagger configured', ['CP7', 100, 50, 400, 60, 0], [100, 0, 'ok']],\n  ['boundary: deadline forces immediate start', ['CP12', 100, 50, 120, 70, 30], [50, 16, 'ok']],\n  ['boundary: tariff already active', ['CP3', 10, 50, 400, 60, 10], [56, 6, 'ok']],\n  ['regression: latest start derivation', ['CP466', 247, 123, 302, 127, 5], [175, 5, 'ok']],\n  ['regression: latest start derivation (partial repair)', ['CP803', 164, 112, 215, 145, 5],\n   [112, 2, 'late']],\n  ['control 1', ['CP783', 204, 99, 341, 202, 5], [139, 1, 'ok']],\n  ['control 2', ['CP490', 211, 107, 512, 167, 10], [215, 4, 'ok']]],\n [['boundary: no stagger configured', ['CP7', 100, 50, 400, 60, 0], [100, 0, 'ok']],\n  ['boundary: deadline forces immediate start', ['CP12', 100, 50, 120, 70, 30], [50, 16, 'ok']],\n  ['boundary: tariff already active', ['CP3', 10, 50, 400, 60, 10], [56, 6, 'ok']],\n  ['regression: latest start derivation', ['CP873', 194, 7, 146, 117, 15], [29, 6, 'ok']],\n  ['regression: latest start derivation (partial repair)', ['CP174', 226, 53, 139, 171, 5],\n   [53, 2, 'late']],\n  ['control 1', ['CP137', 10, 19, 66, 6, 15], [24, 5, 'ok']],\n  ['control 2', ['CP783', 210, 193, 350, 267, 30], [193, 3, 'late']]],\n [['boundary: no stagger configured', ['CP7', 100, 50, 400, 60, 0], [100, 0, 'ok']],\n  ['boundary: deadline forces immediate start', ['CP12', 100, 50, 120, 70, 30], [50, 16, 'ok']],\n  ['boundary: tariff already active', ['CP3', 10, 50, 400, 60, 10], [56, 6, 'ok']],\n  ['regression: latest start derivation', ['CP353', 241, 118, 320, 150, 5], [170, 1, 'ok']],\n  ['regression: latest start derivation (partial repair)', ['CP776', 104, 179, 210, 259, 30],\n   [179, 14, 'late']],\n  ['control 1', ['CP873', 194, 7, 146, 117, 15], [29, 6, 'ok']],\n  ['control 2', ['CP733', 56, 136, 418, 4, 0], [136, 0, 'ok']]]]\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":"0a55184984bc27f18437f57b8fddc8a2ba3bb8c69ced805fd61c0578e372d2d7","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(cid, tariff_start, now, depart, dur, max_delay):\n    delay = sum((i + 1) * ord(c) for i, c in enumerate(cid)) % (max_delay + 1)\n    start = max(tariff_start, now) + delay\n    latest = depart - dur - delay\n    if start > latest:\n        start = max(latest, now)\n    status = 'ok' if start + dur <= depart else 'late'\n    return [start, delay, status]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['boundary: no stagger configured', ['CP7', 100, 50, 400, 60, 0], [100, 0, 'ok']],\n  ['boundary: deadline forces immediate start', ['CP12', 100, 50, 120, 70, 30], [50, 16, 'ok']],\n  ['boundary: tariff already active', ['CP3', 10, 50, 400, 60, 10], [56, 6, 'ok']],\n  ['regression: latest start derivation', ['CP929', 258, 12, 235, 31, 30], [204, 15, 'ok']],\n  ['regression: latest start derivation (partial repair)', ['CP495', 117, 47, 359, 266, 0],\n   [93, 0, 'ok']],\n  ['control 1', ['CP310', 208, 18, 199, 159, 0], [40, 0, 'ok']],\n  ['control 2', ['CP766', 294, 150, 208, 201, 30], [150, 10, 'late']]],\n [['boundary: no stagger configured', ['CP7', 100, 50, 400, 60, 0], [100, 0, 'ok']],\n  ['boundary: deadline forces immediate start', ['CP12', 100, 50, 120, 70, 30], [50, 16, 'ok']],\n  ['boundary: tariff already active', ['CP3', 10, 50, 400, 60, 10], [56, 6, 'ok']],\n  ['regression: latest start derivation', ['CP990', 237, 16, 437, 299, 30], [138, 29, 'ok']],\n  ['regression: latest start derivation (partial repair)', ['CP272', 217, 184, 482, 298, 15],\n   [184, 15, 'ok']],\n  ['control 1', ['CP883', 235, 120, 211, 80, 5], [131, 4, 'ok']],\n  ['control 2', ['CP742', 19, 177, 199, 247, 10], [177, 3, 'late']]],\n [['boundary: no stagger configured', ['CP7', 100, 50, 400, 60, 0], [100, 0, 'ok']],\n  ['boundary: deadline forces immediate start', ['CP12', 100, 50, 120, 70, 30], [50, 16, 'ok']],\n  ['boundary: tariff already active', ['CP3', 10, 50, 400, 60, 10], [56, 6, 'ok']],\n  ['regression: latest start derivation', ['CP466', 247, 123, 302, 127, 5], [175, 5, 'ok']],\n  ['regression: latest start derivation (partial repair)', ['CP803', 164, 112, 215, 145, 5],\n   [112, 2, 'late']],\n  ['control 1', ['CP783', 204, 99, 341, 202, 5], [139, 1, 'ok']],\n  ['control 2', ['CP490', 211, 107, 512, 167, 10], [215, 4, 'ok']]],\n [['boundary: no stagger configured', ['CP7', 100, 50, 400, 60, 0], [100, 0, 'ok']],\n  ['boundary: deadline forces immediate start', ['CP12', 100, 50, 120, 70, 30], [50, 16, 'ok']],\n  ['boundary: tariff already active', ['CP3', 10, 50, 400, 60, 10], [56, 6, 'ok']],\n  ['regression: latest start derivation', ['CP873', 194, 7, 146, 117, 15], [29, 6, 'ok']],\n  ['regression: latest start derivation (partial repair)', ['CP174', 226, 53, 139, 171, 5],\n   [53, 2, 'late']],\n  ['control 1', ['CP137', 10, 19, 66, 6, 15], [24, 5, 'ok']],\n  ['control 2', ['CP783', 210, 193, 350, 267, 30], [193, 3, 'late']]],\n [['boundary: no stagger configured', ['CP7', 100, 50, 400, 60, 0], [100, 0, 'ok']],\n  ['boundary: deadline forces immediate start', ['CP12', 100, 50, 120, 70, 30], [50, 16, 'ok']],\n  ['boundary: tariff already active', ['CP3', 10, 50, 400, 60, 10], [56, 6, 'ok']],\n  ['regression: latest start derivation', ['CP353', 241, 118, 320, 150, 5], [170, 1, 'ok']],\n  ['regression: latest start derivation (partial repair)', ['CP776', 104, 179, 210, 259, 30],\n   [179, 14, 'late']],\n  ['control 1', ['CP873', 194, 7, 146, 117, 15], [29, 6, 'ok']],\n  ['control 2', ['CP733', 56, 136, 418, 4, 0], [136, 0, 'ok']]]]\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-staggered-tariff-start-latest-start-derivation","generated_at":"2026-09-29T14:51:53.985328+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 latest start subtracts the stagger delay a second time.","sha256":"75629762df11bf30ba012f833870eef48e29601d8807d66868b14a015f2b34f7","title":"Staggered start after tariff switch: latest start derivation · 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":42.622,"exit_code":1,"observations":[{"actual":[100,0,"ok"],"check":"boundary: no stagger configured","expected":[100,0,"ok"],"passed":true},{"actual":[116,16,"late"],"check":"boundary: deadline forces immediate start","expected":[50,16,"ok"],"passed":false},{"actual":[56,6,"ok"],"check":"boundary: tariff already active","expected":[56,6,"ok"],"passed":true},{"actual":[235,15,"late"],"check":"regression: latest start derivation","expected":[204,15,"ok"],"passed":false},{"actual":[117,0,"late"],"check":"regression: latest start derivation (partial repair)","expected":[93,0,"ok"],"passed":false},{"actual":[199,0,"late"],"check":"control 1","expected":[40,0,"ok"],"passed":false},{"actual":[208,10,"late"],"check":"control 2","expected":[150,10,"late"],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"boundary: no stagger configured\", \"actual\": [100, 0, \"ok\"], \"expected\": [100, 0, \"ok\"], \"passed\": true}, {\"check\": \"boundary: deadline forces immediate start\", \"actual\": [116, 16, \"late\"], \"expected\": [50, 16, \"ok\"], \"passed\": false}, {\"check\": \"boundary: tariff already active\", \"actual\": [56, 6, \"ok\"], \"expected\": [56, 6, \"ok\"], \"passed\": true}, {\"check\": \"regression: latest start derivation\", \"actual\": [235, 15, \"late\"], \"expected\": [204, 15, \"ok\"], \"passed\": false}, {\"check\": \"regression: latest start derivation (partial repair)\", \"actual\": [117, 0, \"late\"], \"expected\": [93, 0, \"ok\"], \"passed\": false}, {\"check\": \"control 1\", \"actual\": [199, 0, \"late\"], \"expected\": [40, 0, \"ok\"], \"passed\": false}, {\"check\": \"control 2\", \"actual\": [208, 10, \"late\"], \"expected\": [150, 10, \"late\"], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.184,"exit_code":1,"observations":[{"actual":[100,0,"ok"],"check":"boundary: no stagger configured","expected":[100,0,"ok"],"passed":true},{"actual":[50,16,"ok"],"check":"boundary: deadline forces immediate start","expected":[50,16,"ok"],"passed":true},{"actual":[56,6,"ok"],"check":"boundary: tariff already active","expected":[56,6,"ok"],"passed":true},{"actual":[189,15,"ok"],"check":"regression: latest start derivation","expected":[204,15,"ok"],"passed":false},{"actual":[93,0,"ok"],"check":"regression: latest start derivation (partial repair)","expected":[93,0,"ok"],"passed":true},{"actual":[40,0,"ok"],"check":"control 1","expected":[40,0,"ok"],"passed":true},{"actual":[150,10,"late"],"check":"control 2","expected":[150,10,"late"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"boundary: no stagger configured\", \"actual\": [100, 0, \"ok\"], \"expected\": [100, 0, \"ok\"], \"passed\": true}, {\"check\": \"boundary: deadline forces immediate start\", \"actual\": [50, 16, \"ok\"], \"expected\": [50, 16, \"ok\"], \"passed\": true}, {\"check\": \"boundary: tariff already active\", \"actual\": [56, 6, \"ok\"], \"expected\": [56, 6, \"ok\"], \"passed\": true}, {\"check\": \"regression: latest start derivation\", \"actual\": [189, 15, \"ok\"], \"expected\": [204, 15, \"ok\"], \"passed\": false}, {\"check\": \"regression: latest start derivation (partial repair)\", \"actual\": [93, 0, \"ok\"], \"expected\": [93, 0, \"ok\"], \"passed\": true}, {\"check\": \"control 1\", \"actual\": [40, 0, \"ok\"], \"expected\": [40, 0, \"ok\"], \"passed\": true}, {\"check\": \"control 2\", \"actual\": [150, 10, \"late\"], \"expected\": [150, 10, \"late\"], \"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."}}