{"abstract":"The profile repeats the same power level at every breakpoint.","category":"EV charging session scheduling","checks":7,"contract":"plan holds [start, end, kw] charging intervals ([start, end), zero-length ignored). Build the site profile as change points [[t, total_kw]] over the interval breakpoints, merging equal consecutive levels, and close with [last breakpoint, 0] unless the profile already ends at 0. Also return the start points of segments whose total exceeds site_max. Return [profile, overloads].","contract_signature":"plan, site_max","evaluation_group":"w2-ev_charging_session_scheduling-plan-power-profile","failed_approach":"Comparing with the first change point merges non-adjacent levels and drops real changes.","family":"w2-ev_charging_session_scheduling-plan-power-profile-merge-equal-levels","id":"FA-93326","implementations":{"attempt":{"sha256":"d774526a307f6005a9bb5c59e48e324b11b2adccf806c9f33f75736194ef682c","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(plan, site_max):\n    pts = sorted({t for s, e, _ in plan for t in (s, e) if e > s})\n    out = []\n    over = []\n    for a, b in zip(pts, pts[1:]):\n        kw = sum(k for s, e, k in plan if s <= a and b <= e)\n        if out and out[0][1] == kw:\n            continue\n        out.append([a, kw])\n        if kw > site_max:\n            over.append(a)\n    if pts:\n        if not out or out[-1][1] != 0:\n            out.append([pts[-1], 0])\n    return [out, over]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['boundary: zero-length interval before plan', [[[5, 5, 7], [10, 20, 11]], 11],\n   [[[10, 11], [20, 0]], []]],\n  ['boundary: exact site limit', [[[0, 10, 7], [0, 10, 4]], 11], [[[0, 11], [10, 0]], []]],\n  ['boundary: empty plan', [[], 11], [[], []]],\n  ['regression: merge equal levels',\n   [[[23, 28, 11], [8, 13, 0], [15, 20, 0], [24, 24, 4], [16, 16, 0]], 15],\n   [[[8, 0], [23, 11], [28, 0]], []]],\n  ['regression: merge equal levels (partial repair)', [[[4, 14, 11], [0, 2, 0], [16, 18, 0]], 11],\n   [[[0, 0], [4, 11], [14, 0]], []]],\n  ['control 1', [[[23, 38, 0], [0, 5, 4], [18, 18, 11]], 15], [[[0, 4], [5, 0]], []]],\n  ['control 2', [[[6, 8, 7]], 22], [[[6, 7], [8, 0]], []]]],\n [['boundary: zero-length interval before plan', [[[5, 5, 7], [10, 20, 11]], 11],\n   [[[10, 11], [20, 0]], []]],\n  ['boundary: exact site limit', [[[0, 10, 7], [0, 10, 4]], 11], [[[0, 11], [10, 0]], []]],\n  ['boundary: empty plan', [[], 11], [[], []]],\n  ['regression: merge equal levels', [[[11, 13, 4], [13, 28, 0], [17, 22, 0], [9, 11, 4]], 22],\n   [[[9, 4], [13, 0]], []]],\n  ['regression: merge equal levels (partial repair)',\n   [[[11, 16, 0], [11, 16, 7], [19, 21, 11], [8, 18, 11], [16, 16, 0]], 15],\n   [[[8, 11], [11, 18], [16, 11], [18, 0], [19, 11], [21, 0]], [11]]],\n  ['control 1', [[[12, 12, 4], [7, 12, 11], [27, 37, 4]], 22],\n   [[[7, 11], [12, 0], [27, 4], [37, 0]], []]],\n  ['control 2', [[], 18], [[], []]]],\n [['boundary: zero-length interval before plan', [[[5, 5, 7], [10, 20, 11]], 11],\n   [[[10, 11], [20, 0]], []]],\n  ['boundary: exact site limit', [[[0, 10, 7], [0, 10, 4]], 11], [[[0, 11], [10, 0]], []]],\n  ['boundary: empty plan', [[], 11], [[], []]],\n  ['regression: merge equal levels', [[[9, 14, 0], [6, 8, 7]], 7], [[[6, 7], [8, 0]], []]],\n  ['regression: merge equal levels (partial repair)',\n   [[[19, 19, 11], [6, 6, 7], [15, 25, 11], [8, 23, 0], [27, 32, 4]], 22],\n   [[[8, 0], [15, 11], [25, 0], [27, 4], [32, 0]], []]],\n  ['control 1', [[[21, 31, 11], [23, 33, 7], [0, 10, 7], [25, 25, 0], [28, 43, 7]], 15],\n   [[[0, 7], [10, 0], [21, 11], [23, 18], [28, 25], [31, 14], [33, 7], [43, 0]], [23, 28]]],\n  ['control 2', [[[17, 27, 11], [22, 37, 11], [10, 10, 7], [19, 29, 11]], 7],\n   [[[17, 11], [19, 22], [22, 33], [27, 22], [29, 11], [37, 0]], [17, 19, 22, 27, 29]]]],\n [['boundary: zero-length interval before plan', [[[5, 5, 7], [10, 20, 11]], 11],\n   [[[10, 11], [20, 0]], []]],\n  ['boundary: exact site limit', [[[0, 10, 7], [0, 10, 4]], 11], [[[0, 11], [10, 0]], []]],\n  ['boundary: empty plan', [[], 11], [[], []]],\n  ['regression: merge equal levels',\n   [[[10, 12, 7], [3, 8, 0], [29, 39, 11], [6, 11, 7], [13, 23, 7]], 11],\n   [[[3, 0], [6, 7], [10, 14], [11, 7], [12, 0], [13, 7], [23, 0], [29, 11], [39, 0]], [10]]],\n  ['regression: merge equal levels (partial repair)',\n   [[[19, 21, 11], [15, 30, 7], [30, 45, 11]], 22],\n   [[[15, 7], [19, 18], [21, 7], [30, 11], [45, 0]], []]],\n  ['control 1', [[], 22], [[], []]], ['control 2', [[], 22], [[], []]]],\n [['boundary: zero-length interval before plan', [[[5, 5, 7], [10, 20, 11]], 11],\n   [[[10, 11], [20, 0]], []]],\n  ['boundary: exact site limit', [[[0, 10, 7], [0, 10, 4]], 11], [[[0, 11], [10, 0]], []]],\n  ['boundary: empty plan', [[], 11], [[], []]],\n  ['regression: merge equal levels',\n   [[[26, 36, 11], [11, 26, 11], [19, 24, 11], [13, 23, 11], [0, 0, 4]], 18],\n   [[[11, 11], [13, 22], [19, 33], [23, 22], [24, 11], [36, 0]], [13, 19, 23]]],\n  ['regression: merge equal levels (partial repair)', [[[30, 32, 0], [6, 16, 11], [18, 28, 7]], 11],\n   [[[6, 11], [16, 0], [18, 7], [28, 0]], []]],\n  ['control 1', [[[8, 8, 11], [0, 0, 11], [7, 17, 7]], 7], [[[7, 7], [17, 0]], []]],\n  ['control 2', [[[22, 22, 11], [5, 5, 4], [10, 15, 11], [22, 32, 11], [14, 14, 0]], 11],\n   [[[10, 11], [15, 0], [22, 11], [32, 0]], []]]]]\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":"3fdd015b5f06aed0b5b83b83e96b6923a33ebecb3e2a19ba6cddec34499f35f4","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(plan, site_max):\n    pts = sorted({t for s, e, _ in plan for t in (s, e) if e > s})\n    out = []\n    over = []\n    for a, b in zip(pts, pts[1:]):\n        kw = sum(k for s, e, k in plan if s <= a and b <= e)\n        out.append([a, kw])\n        if kw > site_max:\n            over.append(a)\n    if pts:\n        if not out or out[-1][1] != 0:\n            out.append([pts[-1], 0])\n    return [out, over]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['boundary: zero-length interval before plan', [[[5, 5, 7], [10, 20, 11]], 11],\n   [[[10, 11], [20, 0]], []]],\n  ['boundary: exact site limit', [[[0, 10, 7], [0, 10, 4]], 11], [[[0, 11], [10, 0]], []]],\n  ['boundary: empty plan', [[], 11], [[], []]],\n  ['regression: merge equal levels',\n   [[[23, 28, 11], [8, 13, 0], [15, 20, 0], [24, 24, 4], [16, 16, 0]], 15],\n   [[[8, 0], [23, 11], [28, 0]], []]],\n  ['regression: merge equal levels (partial repair)', [[[4, 14, 11], [0, 2, 0], [16, 18, 0]], 11],\n   [[[0, 0], [4, 11], [14, 0]], []]],\n  ['control 1', [[[23, 38, 0], [0, 5, 4], [18, 18, 11]], 15], [[[0, 4], [5, 0]], []]],\n  ['control 2', [[[6, 8, 7]], 22], [[[6, 7], [8, 0]], []]]],\n [['boundary: zero-length interval before plan', [[[5, 5, 7], [10, 20, 11]], 11],\n   [[[10, 11], [20, 0]], []]],\n  ['boundary: exact site limit', [[[0, 10, 7], [0, 10, 4]], 11], [[[0, 11], [10, 0]], []]],\n  ['boundary: empty plan', [[], 11], [[], []]],\n  ['regression: merge equal levels', [[[11, 13, 4], [13, 28, 0], [17, 22, 0], [9, 11, 4]], 22],\n   [[[9, 4], [13, 0]], []]],\n  ['regression: merge equal levels (partial repair)',\n   [[[11, 16, 0], [11, 16, 7], [19, 21, 11], [8, 18, 11], [16, 16, 0]], 15],\n   [[[8, 11], [11, 18], [16, 11], [18, 0], [19, 11], [21, 0]], [11]]],\n  ['control 1', [[[12, 12, 4], [7, 12, 11], [27, 37, 4]], 22],\n   [[[7, 11], [12, 0], [27, 4], [37, 0]], []]],\n  ['control 2', [[], 18], [[], []]]],\n [['boundary: zero-length interval before plan', [[[5, 5, 7], [10, 20, 11]], 11],\n   [[[10, 11], [20, 0]], []]],\n  ['boundary: exact site limit', [[[0, 10, 7], [0, 10, 4]], 11], [[[0, 11], [10, 0]], []]],\n  ['boundary: empty plan', [[], 11], [[], []]],\n  ['regression: merge equal levels', [[[9, 14, 0], [6, 8, 7]], 7], [[[6, 7], [8, 0]], []]],\n  ['regression: merge equal levels (partial repair)',\n   [[[19, 19, 11], [6, 6, 7], [15, 25, 11], [8, 23, 0], [27, 32, 4]], 22],\n   [[[8, 0], [15, 11], [25, 0], [27, 4], [32, 0]], []]],\n  ['control 1', [[[21, 31, 11], [23, 33, 7], [0, 10, 7], [25, 25, 0], [28, 43, 7]], 15],\n   [[[0, 7], [10, 0], [21, 11], [23, 18], [28, 25], [31, 14], [33, 7], [43, 0]], [23, 28]]],\n  ['control 2', [[[17, 27, 11], [22, 37, 11], [10, 10, 7], [19, 29, 11]], 7],\n   [[[17, 11], [19, 22], [22, 33], [27, 22], [29, 11], [37, 0]], [17, 19, 22, 27, 29]]]],\n [['boundary: zero-length interval before plan', [[[5, 5, 7], [10, 20, 11]], 11],\n   [[[10, 11], [20, 0]], []]],\n  ['boundary: exact site limit', [[[0, 10, 7], [0, 10, 4]], 11], [[[0, 11], [10, 0]], []]],\n  ['boundary: empty plan', [[], 11], [[], []]],\n  ['regression: merge equal levels',\n   [[[10, 12, 7], [3, 8, 0], [29, 39, 11], [6, 11, 7], [13, 23, 7]], 11],\n   [[[3, 0], [6, 7], [10, 14], [11, 7], [12, 0], [13, 7], [23, 0], [29, 11], [39, 0]], [10]]],\n  ['regression: merge equal levels (partial repair)',\n   [[[19, 21, 11], [15, 30, 7], [30, 45, 11]], 22],\n   [[[15, 7], [19, 18], [21, 7], [30, 11], [45, 0]], []]],\n  ['control 1', [[], 22], [[], []]], ['control 2', [[], 22], [[], []]]],\n [['boundary: zero-length interval before plan', [[[5, 5, 7], [10, 20, 11]], 11],\n   [[[10, 11], [20, 0]], []]],\n  ['boundary: exact site limit', [[[0, 10, 7], [0, 10, 4]], 11], [[[0, 11], [10, 0]], []]],\n  ['boundary: empty plan', [[], 11], [[], []]],\n  ['regression: merge equal levels',\n   [[[26, 36, 11], [11, 26, 11], [19, 24, 11], [13, 23, 11], [0, 0, 4]], 18],\n   [[[11, 11], [13, 22], [19, 33], [23, 22], [24, 11], [36, 0]], [13, 19, 23]]],\n  ['regression: merge equal levels (partial repair)', [[[30, 32, 0], [6, 16, 11], [18, 28, 7]], 11],\n   [[[6, 11], [16, 0], [18, 7], [28, 0]], []]],\n  ['control 1', [[[8, 8, 11], [0, 0, 11], [7, 17, 7]], 7], [[[7, 7], [17, 0]], []]],\n  ['control 2', [[[22, 22, 11], [5, 5, 4], [10, 15, 11], [22, 32, 11], [14, 14, 0]], 11],\n   [[[10, 11], [15, 0], [22, 11], [32, 0]], []]]]]\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-plan-power-profile-merge-equal-levels","generated_at":"2026-09-29T14:51:54.231790+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":"Consecutive segments with equal power are not merged.","sha256":"852b979e1a0346f2fb232400a81ecb252e7c1ca7d3a0de148682473948066237","title":"Site power profile from charge plans: merge equal levels · 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":38.469,"exit_code":1,"observations":[{"actual":[[[10,11],[20,0]],[]],"check":"boundary: zero-length interval before plan","expected":[[[10,11],[20,0]],[]],"passed":true},{"actual":[[[0,11],[10,0]],[]],"check":"boundary: exact site limit","expected":[[[0,11],[10,0]],[]],"passed":true},{"actual":[[],[]],"check":"boundary: empty plan","expected":[[],[]],"passed":true},{"actual":[[[8,0],[23,11],[28,0]],[]],"check":"regression: merge equal levels","expected":[[[8,0],[23,11],[28,0]],[]],"passed":true},{"actual":[[[0,0],[4,11],[18,0]],[]],"check":"regression: merge equal levels (partial repair)","expected":[[[0,0],[4,11],[14,0]],[]],"passed":false},{"actual":[[[0,4],[5,0],[23,0]],[]],"check":"control 1","expected":[[[0,4],[5,0]],[]],"passed":false},{"actual":[[[6,7],[8,0]],[]],"check":"control 2","expected":[[[6,7],[8,0]],[]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"boundary: zero-length interval before plan\", \"actual\": [[[10, 11], [20, 0]], []], \"expected\": [[[10, 11], [20, 0]], []], \"passed\": true}, {\"check\": \"boundary: exact site limit\", \"actual\": [[[0, 11], [10, 0]], []], \"expected\": [[[0, 11], [10, 0]], []], \"passed\": true}, {\"check\": \"boundary: empty plan\", \"actual\": [[], []], \"expected\": [[], []], \"passed\": true}, {\"check\": \"regression: merge equal levels\", \"actual\": [[[8, 0], [23, 11], [28, 0]], []], \"expected\": [[[8, 0], [23, 11], [28, 0]], []], \"passed\": true}, {\"check\": \"regression: merge equal levels (partial repair)\", \"actual\": [[[0, 0], [4, 11], [18, 0]], []], \"expected\": [[[0, 0], [4, 11], [14, 0]], []], \"passed\": false}, {\"check\": \"control 1\", \"actual\": [[[0, 4], [5, 0], [23, 0]], []], \"expected\": [[[0, 4], [5, 0]], []], \"passed\": false}, {\"check\": \"control 2\", \"actual\": [[[6, 7], [8, 0]], []], \"expected\": [[[6, 7], [8, 0]], []], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.457,"exit_code":1,"observations":[{"actual":[[[10,11],[20,0]],[]],"check":"boundary: zero-length interval before plan","expected":[[[10,11],[20,0]],[]],"passed":true},{"actual":[[[0,11],[10,0]],[]],"check":"boundary: exact site limit","expected":[[[0,11],[10,0]],[]],"passed":true},{"actual":[[],[]],"check":"boundary: empty plan","expected":[[],[]],"passed":true},{"actual":[[[8,0],[13,0],[15,0],[20,0],[23,11],[28,0]],[]],"check":"regression: merge equal levels","expected":[[[8,0],[23,11],[28,0]],[]],"passed":false},{"actual":[[[0,0],[2,0],[4,11],[14,0],[16,0]],[]],"check":"regression: merge equal levels (partial repair)","expected":[[[0,0],[4,11],[14,0]],[]],"passed":false},{"actual":[[[0,4],[5,0],[23,0]],[]],"check":"control 1","expected":[[[0,4],[5,0]],[]],"passed":false},{"actual":[[[6,7],[8,0]],[]],"check":"control 2","expected":[[[6,7],[8,0]],[]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"boundary: zero-length interval before plan\", \"actual\": [[[10, 11], [20, 0]], []], \"expected\": [[[10, 11], [20, 0]], []], \"passed\": true}, {\"check\": \"boundary: exact site limit\", \"actual\": [[[0, 11], [10, 0]], []], \"expected\": [[[0, 11], [10, 0]], []], \"passed\": true}, {\"check\": \"boundary: empty plan\", \"actual\": [[], []], \"expected\": [[], []], \"passed\": true}, {\"check\": \"regression: merge equal levels\", \"actual\": [[[8, 0], [13, 0], [15, 0], [20, 0], [23, 11], [28, 0]], []], \"expected\": [[[8, 0], [23, 11], [28, 0]], []], \"passed\": false}, {\"check\": \"regression: merge equal levels (partial repair)\", \"actual\": [[[0, 0], [2, 0], [4, 11], [14, 0], [16, 0]], []], \"expected\": [[[0, 0], [4, 11], [14, 0]], []], \"passed\": false}, {\"check\": \"control 1\", \"actual\": [[[0, 4], [5, 0], [23, 0]], []], \"expected\": [[[0, 4], [5, 0]], []], \"passed\": false}, {\"check\": \"control 2\", \"actual\": [[[6, 7], [8, 0]], []], \"expected\": [[[6, 7], [8, 0]], []], \"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."}}