{"abstract":"Changes timestamped before the period start produce prorations larger than the period price.","category":"Subscription proration billing","checks":8,"contract":"Input {start, end, initial price, changes: [[t, price]]}. Changes are ordered by time; at equal times only the last applies. A change outside [start, end) or to the current price is ignored. Each effective change emits a credit line -(current*(end-t)/span) and a debit line new*(end-t)/span, magnitudes half-up, and the new price becomes current. Return the list of line amounts.","evaluation_group":"w2-subscription-proration-sequential-plan-changes","failed_approach":"The attempt ignores early changes but prorates a change at the period end into zero-value lines.","family":"w2-subscription-proration-sequential-plan-changes-change-window","id":"FA-59621","implementations":{"attempt":{"sha256":"dccab3d03ba2d66158960d7715049dbaba7626da6aed4ee6bfa075571fef54ad","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    span = x['end'] - x['start']\n    ch = sorted(x['changes'], key=lambda c: c[0])\n    dedup = []\n    for t, p in ch:\n        if dedup and dedup[-1][0] == t:\n            dedup[-1] = [t, p]\n        else:\n            dedup.append([t, p])\n    cur = x['initial']\n    lines = []\n    for t, p in dedup:\n        if t < x['start'] or t > x['end'] or p == cur:\n            continue\n        left = x['end'] - t\n        lines.append(-((cur * left * 2 + span) // (2 * span)))\n        lines.append((p * left * 2 + span) // (2 * span))\n        cur = p\n    return lines\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression', {'start': 968, 'end': 1333, 'initial': 1000, 'changes': [[1333, 1000], [965, 5000], [1171, 2000]]}, [-444, 888]), ('regression', {'start': 925, 'end': 955, 'initial': 1000, 'changes': [[940, 1000], [922, 5000]]}, []), ('partial-repair probe', {'start': 670, 'end': 700, 'initial': 2000, 'changes': [[678, 520], [700, 1000], [691, 5000]]}, [-1467, 381, -156, 1500]), ('partial-repair probe', {'start': 796, 'end': 827, 'initial': 2000, 'changes': [[819, 2000], [827, 2383], [799, 1000], [827, 1000]]}, [-1806, 903, -258, 516]), ('normal control', {'start': 526, 'end': 557, 'initial': 5000, 'changes': []}, []), ('normal control', {'start': 534, 'end': 565, 'initial': 5000, 'changes': [[565, 1007], [565, 1000], [539, 1000], [537, 2000]]}, [-4516, 1806, -1677, 839]), ('normal control', {'start': 382, 'end': 747, 'initial': 2000, 'changes': [[508, 5000]]}, [-1310, 3274]), ('normal control', {'start': 414, 'end': 445, 'initial': 2000, 'changes': [[445, 1000], [434, 1000], [431, 8555]]}, [-903, 3864, -3036, 355])], [('regression', {'start': 87, 'end': 117, 'initial': 5000, 'changes': [[117, 1000], [103, 2000], [84, 1000], [84, 1000]]}, [-2333, 933]), ('regression', {'start': 984, 'end': 1015, 'initial': 2000, 'changes': [[1001, 5000], [1014, 3956], [981, 1000]]}, [-903, 2258, -161, 128]), ('partial-repair probe', {'start': 796, 'end': 827, 'initial': 2000, 'changes': [[819, 2000], [827, 2383], [799, 1000], [827, 1000]]}, [-1806, 903, -258, 516]), ('partial-repair probe', {'start': 918, 'end': 948, 'initial': 1000, 'changes': [[920, 4137], [928, 1000], [948, 1000], [948, 7000]]}, [-933, 3861, -2758, 667]), ('normal control', {'start': 677, 'end': 1042, 'initial': 5000, 'changes': [[1042, 5000], [1042, 5000]]}, []), ('normal control', {'start': 201, 'end': 232, 'initial': 2000, 'changes': [[219, 5000], [221, 899]]}, [-839, 2097, -1774, 319]), ('normal control', {'start': 690, 'end': 1055, 'initial': 5000, 'changes': [[702, 2000]]}, [-4836, 1934]), ('normal control', {'start': 347, 'end': 712, 'initial': 5000, 'changes': [[355, 1000], [367, 2000], [712, 1000], [712, 2000]]}, [-4890, 978, -945, 1890])], [('regression', {'start': 818, 'end': 848, 'initial': 2000, 'changes': [[822, 4662], [848, 5000], [815, 5000], [832, 2000], [832, 7000]]}, [-1733, 4040, -2486, 3733]), ('regression', {'start': 605, 'end': 636, 'initial': 1000, 'changes': [[610, 1000], [625, 5000], [602, 1000], [602, 2000]]}, [-355, 1774]), ('partial-repair probe', {'start': 925, 'end': 956, 'initial': 2000, 'changes': [[935, 95], [925, 5000], [956, 1000], [956, 1000]]}, [-2000, 5000, -3387, 64]), ('partial-repair probe', {'start': 398, 'end': 429, 'initial': 5000, 'changes': [[429, 4572], [429, 1000]]}, []), ('normal control', {'start': 239, 'end': 270, 'initial': 5000, 'changes': []}, []), ('normal control', {'start': 843, 'end': 1208, 'initial': 2000, 'changes': [[1208, 2000], [1208, 5000], [877, 5000]]}, [-1814, 4534]), ('normal control', {'start': 887, 'end': 918, 'initial': 5000, 'changes': []}, []), ('normal control', {'start': 983, 'end': 1348, 'initial': 2000, 'changes': [[1164, 5000], [1164, 7000]]}, [-1008, 3529])], [('regression', {'start': 314, 'end': 345, 'initial': 5000, 'changes': [[345, 5000], [311, 2000], [337, 1000], [340, 768], [340, 7000]]}, [-1290, 258, -161, 1129]), ('regression', {'start': 446, 'end': 811, 'initial': 2000, 'changes': [[443, 5000]]}, []), ('partial-repair probe', {'start': 849, 'end': 879, 'initial': 5000, 'changes': [[879, 7238], [846, 4596], [846, 5000], [863, 2000]]}, [-2667, 1067]), ('partial-repair probe', {'start': 841, 'end': 872, 'initial': 5000, 'changes': [[872, 2000], [872, 2000]]}, []), ('normal control', {'start': 849, 'end': 1214, 'initial': 2000, 'changes': []}, []), ('normal control', {'start': 206, 'end': 571, 'initial': 1000, 'changes': [[274, 5000], [273, 2000]]}, [-816, 1633, -1627, 4068]), ('normal control', {'start': 74, 'end': 439, 'initial': 5000, 'changes': [[185, 5000]]}, []), ('normal control', {'start': 658, 'end': 1023, 'initial': 1000, 'changes': [[979, 6197]]}, [-121, 747])], [('regression', {'start': 647, 'end': 677, 'initial': 5000, 'changes': [[677, 2000], [675, 2000], [677, 5000], [644, 1000]]}, [-333, 133]), ('regression', {'start': 968, 'end': 1333, 'initial': 1000, 'changes': [[1333, 1000], [965, 5000], [1171, 2000]]}, [-444, 888]), ('partial-repair probe', {'start': 3, 'end': 34, 'initial': 5000, 'changes': [[34, 2000], [14, 5000], [14, 2000], [16, 5000]]}, [-3226, 1290, -1161, 2903]), ('partial-repair probe', {'start': 766, 'end': 797, 'initial': 5000, 'changes': [[797, 5000], [795, 7904], [770, 1230], [797, 1000], [797, 1000]]}, [-4355, 1071, -79, 510]), ('normal control', {'start': 489, 'end': 854, 'initial': 5000, 'changes': [[486, 1000], [766, 6565], [486, 5000], [680, 5000]]}, [-1205, 1583]), ('normal control', {'start': 657, 'end': 1022, 'initial': 1000, 'changes': []}, []), ('normal control', {'start': 91, 'end': 121, 'initial': 2000, 'changes': []}, []), ('normal control', {'start': 400, 'end': 430, 'initial': 5000, 'changes': [[411, 2000], [430, 2000]]}, [-3167, 1267])]]\nfor i, (label, args, expected) in enumerate(fixtures[N-1]):\n    check(\"%s %d\" % (label, i), 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":"0f90cb52f5128d98c9f6f1efd14a159d76b42815ad6cad722fc3a906e22d13a9","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    span = x['end'] - x['start']\n    ch = sorted(x['changes'], key=lambda c: c[0])\n    dedup = []\n    for t, p in ch:\n        if dedup and dedup[-1][0] == t:\n            dedup[-1] = [t, p]\n        else:\n            dedup.append([t, p])\n    cur = x['initial']\n    lines = []\n    for t, p in dedup:\n        if t >= x['end'] or p == cur:\n            continue\n        left = x['end'] - t\n        lines.append(-((cur * left * 2 + span) // (2 * span)))\n        lines.append((p * left * 2 + span) // (2 * span))\n        cur = p\n    return lines\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression', {'start': 968, 'end': 1333, 'initial': 1000, 'changes': [[1333, 1000], [965, 5000], [1171, 2000]]}, [-444, 888]), ('regression', {'start': 925, 'end': 955, 'initial': 1000, 'changes': [[940, 1000], [922, 5000]]}, []), ('partial-repair probe', {'start': 670, 'end': 700, 'initial': 2000, 'changes': [[678, 520], [700, 1000], [691, 5000]]}, [-1467, 381, -156, 1500]), ('partial-repair probe', {'start': 796, 'end': 827, 'initial': 2000, 'changes': [[819, 2000], [827, 2383], [799, 1000], [827, 1000]]}, [-1806, 903, -258, 516]), ('normal control', {'start': 526, 'end': 557, 'initial': 5000, 'changes': []}, []), ('normal control', {'start': 534, 'end': 565, 'initial': 5000, 'changes': [[565, 1007], [565, 1000], [539, 1000], [537, 2000]]}, [-4516, 1806, -1677, 839]), ('normal control', {'start': 382, 'end': 747, 'initial': 2000, 'changes': [[508, 5000]]}, [-1310, 3274]), ('normal control', {'start': 414, 'end': 445, 'initial': 2000, 'changes': [[445, 1000], [434, 1000], [431, 8555]]}, [-903, 3864, -3036, 355])], [('regression', {'start': 87, 'end': 117, 'initial': 5000, 'changes': [[117, 1000], [103, 2000], [84, 1000], [84, 1000]]}, [-2333, 933]), ('regression', {'start': 984, 'end': 1015, 'initial': 2000, 'changes': [[1001, 5000], [1014, 3956], [981, 1000]]}, [-903, 2258, -161, 128]), ('partial-repair probe', {'start': 796, 'end': 827, 'initial': 2000, 'changes': [[819, 2000], [827, 2383], [799, 1000], [827, 1000]]}, [-1806, 903, -258, 516]), ('partial-repair probe', {'start': 918, 'end': 948, 'initial': 1000, 'changes': [[920, 4137], [928, 1000], [948, 1000], [948, 7000]]}, [-933, 3861, -2758, 667]), ('normal control', {'start': 677, 'end': 1042, 'initial': 5000, 'changes': [[1042, 5000], [1042, 5000]]}, []), ('normal control', {'start': 201, 'end': 232, 'initial': 2000, 'changes': [[219, 5000], [221, 899]]}, [-839, 2097, -1774, 319]), ('normal control', {'start': 690, 'end': 1055, 'initial': 5000, 'changes': [[702, 2000]]}, [-4836, 1934]), ('normal control', {'start': 347, 'end': 712, 'initial': 5000, 'changes': [[355, 1000], [367, 2000], [712, 1000], [712, 2000]]}, [-4890, 978, -945, 1890])], [('regression', {'start': 818, 'end': 848, 'initial': 2000, 'changes': [[822, 4662], [848, 5000], [815, 5000], [832, 2000], [832, 7000]]}, [-1733, 4040, -2486, 3733]), ('regression', {'start': 605, 'end': 636, 'initial': 1000, 'changes': [[610, 1000], [625, 5000], [602, 1000], [602, 2000]]}, [-355, 1774]), ('partial-repair probe', {'start': 925, 'end': 956, 'initial': 2000, 'changes': [[935, 95], [925, 5000], [956, 1000], [956, 1000]]}, [-2000, 5000, -3387, 64]), ('partial-repair probe', {'start': 398, 'end': 429, 'initial': 5000, 'changes': [[429, 4572], [429, 1000]]}, []), ('normal control', {'start': 239, 'end': 270, 'initial': 5000, 'changes': []}, []), ('normal control', {'start': 843, 'end': 1208, 'initial': 2000, 'changes': [[1208, 2000], [1208, 5000], [877, 5000]]}, [-1814, 4534]), ('normal control', {'start': 887, 'end': 918, 'initial': 5000, 'changes': []}, []), ('normal control', {'start': 983, 'end': 1348, 'initial': 2000, 'changes': [[1164, 5000], [1164, 7000]]}, [-1008, 3529])], [('regression', {'start': 314, 'end': 345, 'initial': 5000, 'changes': [[345, 5000], [311, 2000], [337, 1000], [340, 768], [340, 7000]]}, [-1290, 258, -161, 1129]), ('regression', {'start': 446, 'end': 811, 'initial': 2000, 'changes': [[443, 5000]]}, []), ('partial-repair probe', {'start': 849, 'end': 879, 'initial': 5000, 'changes': [[879, 7238], [846, 4596], [846, 5000], [863, 2000]]}, [-2667, 1067]), ('partial-repair probe', {'start': 841, 'end': 872, 'initial': 5000, 'changes': [[872, 2000], [872, 2000]]}, []), ('normal control', {'start': 849, 'end': 1214, 'initial': 2000, 'changes': []}, []), ('normal control', {'start': 206, 'end': 571, 'initial': 1000, 'changes': [[274, 5000], [273, 2000]]}, [-816, 1633, -1627, 4068]), ('normal control', {'start': 74, 'end': 439, 'initial': 5000, 'changes': [[185, 5000]]}, []), ('normal control', {'start': 658, 'end': 1023, 'initial': 1000, 'changes': [[979, 6197]]}, [-121, 747])], [('regression', {'start': 647, 'end': 677, 'initial': 5000, 'changes': [[677, 2000], [675, 2000], [677, 5000], [644, 1000]]}, [-333, 133]), ('regression', {'start': 968, 'end': 1333, 'initial': 1000, 'changes': [[1333, 1000], [965, 5000], [1171, 2000]]}, [-444, 888]), ('partial-repair probe', {'start': 3, 'end': 34, 'initial': 5000, 'changes': [[34, 2000], [14, 5000], [14, 2000], [16, 5000]]}, [-3226, 1290, -1161, 2903]), ('partial-repair probe', {'start': 766, 'end': 797, 'initial': 5000, 'changes': [[797, 5000], [795, 7904], [770, 1230], [797, 1000], [797, 1000]]}, [-4355, 1071, -79, 510]), ('normal control', {'start': 489, 'end': 854, 'initial': 5000, 'changes': [[486, 1000], [766, 6565], [486, 5000], [680, 5000]]}, [-1205, 1583]), ('normal control', {'start': 657, 'end': 1022, 'initial': 1000, 'changes': []}, []), ('normal control', {'start': 91, 'end': 121, 'initial': 2000, 'changes': []}, []), ('normal control', {'start': 400, 'end': 430, 'initial': 5000, 'changes': [[411, 2000], [430, 2000]]}, [-3167, 1267])]]\nfor i, (label, args, expected) in enumerate(fixtures[N-1]):\n    check(\"%s %d\" % (label, i), 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":"06e64e7e00f43012744961cb9f4ca79008f71aa3d160499c64b6bac870714c25","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    span = x['end'] - x['start']\n    ch = sorted(x['changes'], key=lambda c: c[0])\n    dedup = []\n    for t, p in ch:\n        if dedup and dedup[-1][0] == t:\n            dedup[-1] = [t, p]\n        else:\n            dedup.append([t, p])\n    cur = x['initial']\n    lines = []\n    for t, p in dedup:\n        if t < x['start'] or t >= x['end'] or p == cur:\n            continue\n        left = x['end'] - t\n        lines.append(-((cur * left * 2 + span) // (2 * span)))\n        lines.append((p * left * 2 + span) // (2 * span))\n        cur = p\n    return lines\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression', {'start': 968, 'end': 1333, 'initial': 1000, 'changes': [[1333, 1000], [965, 5000], [1171, 2000]]}, [-444, 888]), ('regression', {'start': 925, 'end': 955, 'initial': 1000, 'changes': [[940, 1000], [922, 5000]]}, []), ('partial-repair probe', {'start': 670, 'end': 700, 'initial': 2000, 'changes': [[678, 520], [700, 1000], [691, 5000]]}, [-1467, 381, -156, 1500]), ('partial-repair probe', {'start': 796, 'end': 827, 'initial': 2000, 'changes': [[819, 2000], [827, 2383], [799, 1000], [827, 1000]]}, [-1806, 903, -258, 516]), ('normal control', {'start': 526, 'end': 557, 'initial': 5000, 'changes': []}, []), ('normal control', {'start': 534, 'end': 565, 'initial': 5000, 'changes': [[565, 1007], [565, 1000], [539, 1000], [537, 2000]]}, [-4516, 1806, -1677, 839]), ('normal control', {'start': 382, 'end': 747, 'initial': 2000, 'changes': [[508, 5000]]}, [-1310, 3274]), ('normal control', {'start': 414, 'end': 445, 'initial': 2000, 'changes': [[445, 1000], [434, 1000], [431, 8555]]}, [-903, 3864, -3036, 355])], [('regression', {'start': 87, 'end': 117, 'initial': 5000, 'changes': [[117, 1000], [103, 2000], [84, 1000], [84, 1000]]}, [-2333, 933]), ('regression', {'start': 984, 'end': 1015, 'initial': 2000, 'changes': [[1001, 5000], [1014, 3956], [981, 1000]]}, [-903, 2258, -161, 128]), ('partial-repair probe', {'start': 796, 'end': 827, 'initial': 2000, 'changes': [[819, 2000], [827, 2383], [799, 1000], [827, 1000]]}, [-1806, 903, -258, 516]), ('partial-repair probe', {'start': 918, 'end': 948, 'initial': 1000, 'changes': [[920, 4137], [928, 1000], [948, 1000], [948, 7000]]}, [-933, 3861, -2758, 667]), ('normal control', {'start': 677, 'end': 1042, 'initial': 5000, 'changes': [[1042, 5000], [1042, 5000]]}, []), ('normal control', {'start': 201, 'end': 232, 'initial': 2000, 'changes': [[219, 5000], [221, 899]]}, [-839, 2097, -1774, 319]), ('normal control', {'start': 690, 'end': 1055, 'initial': 5000, 'changes': [[702, 2000]]}, [-4836, 1934]), ('normal control', {'start': 347, 'end': 712, 'initial': 5000, 'changes': [[355, 1000], [367, 2000], [712, 1000], [712, 2000]]}, [-4890, 978, -945, 1890])], [('regression', {'start': 818, 'end': 848, 'initial': 2000, 'changes': [[822, 4662], [848, 5000], [815, 5000], [832, 2000], [832, 7000]]}, [-1733, 4040, -2486, 3733]), ('regression', {'start': 605, 'end': 636, 'initial': 1000, 'changes': [[610, 1000], [625, 5000], [602, 1000], [602, 2000]]}, [-355, 1774]), ('partial-repair probe', {'start': 925, 'end': 956, 'initial': 2000, 'changes': [[935, 95], [925, 5000], [956, 1000], [956, 1000]]}, [-2000, 5000, -3387, 64]), ('partial-repair probe', {'start': 398, 'end': 429, 'initial': 5000, 'changes': [[429, 4572], [429, 1000]]}, []), ('normal control', {'start': 239, 'end': 270, 'initial': 5000, 'changes': []}, []), ('normal control', {'start': 843, 'end': 1208, 'initial': 2000, 'changes': [[1208, 2000], [1208, 5000], [877, 5000]]}, [-1814, 4534]), ('normal control', {'start': 887, 'end': 918, 'initial': 5000, 'changes': []}, []), ('normal control', {'start': 983, 'end': 1348, 'initial': 2000, 'changes': [[1164, 5000], [1164, 7000]]}, [-1008, 3529])], [('regression', {'start': 314, 'end': 345, 'initial': 5000, 'changes': [[345, 5000], [311, 2000], [337, 1000], [340, 768], [340, 7000]]}, [-1290, 258, -161, 1129]), ('regression', {'start': 446, 'end': 811, 'initial': 2000, 'changes': [[443, 5000]]}, []), ('partial-repair probe', {'start': 849, 'end': 879, 'initial': 5000, 'changes': [[879, 7238], [846, 4596], [846, 5000], [863, 2000]]}, [-2667, 1067]), ('partial-repair probe', {'start': 841, 'end': 872, 'initial': 5000, 'changes': [[872, 2000], [872, 2000]]}, []), ('normal control', {'start': 849, 'end': 1214, 'initial': 2000, 'changes': []}, []), ('normal control', {'start': 206, 'end': 571, 'initial': 1000, 'changes': [[274, 5000], [273, 2000]]}, [-816, 1633, -1627, 4068]), ('normal control', {'start': 74, 'end': 439, 'initial': 5000, 'changes': [[185, 5000]]}, []), ('normal control', {'start': 658, 'end': 1023, 'initial': 1000, 'changes': [[979, 6197]]}, [-121, 747])], [('regression', {'start': 647, 'end': 677, 'initial': 5000, 'changes': [[677, 2000], [675, 2000], [677, 5000], [644, 1000]]}, [-333, 133]), ('regression', {'start': 968, 'end': 1333, 'initial': 1000, 'changes': [[1333, 1000], [965, 5000], [1171, 2000]]}, [-444, 888]), ('partial-repair probe', {'start': 3, 'end': 34, 'initial': 5000, 'changes': [[34, 2000], [14, 5000], [14, 2000], [16, 5000]]}, [-3226, 1290, -1161, 2903]), ('partial-repair probe', {'start': 766, 'end': 797, 'initial': 5000, 'changes': [[797, 5000], [795, 7904], [770, 1230], [797, 1000], [797, 1000]]}, [-4355, 1071, -79, 510]), ('normal control', {'start': 489, 'end': 854, 'initial': 5000, 'changes': [[486, 1000], [766, 6565], [486, 5000], [680, 5000]]}, [-1205, 1583]), ('normal control', {'start': 657, 'end': 1022, 'initial': 1000, 'changes': []}, []), ('normal control', {'start': 91, 'end': 121, 'initial': 2000, 'changes': []}, []), ('normal control', {'start': 400, 'end': 430, 'initial': 5000, 'changes': [[411, 2000], [430, 2000]]}, [-3167, 1267])]]\nfor i, (label, args, expected) in enumerate(fixtures[N-1]):\n    check(\"%s %d\" % (label, i), 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":"A deterministic teaching model of a stipulated billing rule. It makes no claim to reproduce any billing provider's exact behaviour and is not billing software. 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-subscription-proration-sequential-plan-changes-change-window","generated_at":"2026-09-29T14:46:38.091124+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Customers who change plans several times in a cycle must be credited for the plan they actually had at each change.","repair":"Restore the contract rule at the change window step: use `if t < x['start'] or t >= x['end']`.","root_cause":"Changes before the period start are not ignored.","sha256":"3727ab63197e2139585f84d6c114977d2e5ea312a53dc2d577c1c3bf0ada56f6","title":"Sequential plan changes within one cycle: change window · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":41.392,"exit_code":1,"observations":[{"actual":[-444,888,0,0],"check":"regression 0","expected":[-444,888],"passed":false},{"actual":[],"check":"regression 1","expected":[],"passed":true},{"actual":[-1467,381,-156,1500,0,0],"check":"partial-repair probe 2","expected":[-1467,381,-156,1500],"passed":false},{"actual":[-1806,903,-258,516,0,0],"check":"partial-repair probe 3","expected":[-1806,903,-258,516],"passed":false},{"actual":[],"check":"normal control 4","expected":[],"passed":true},{"actual":[-4516,1806,-1677,839],"check":"normal control 5","expected":[-4516,1806,-1677,839],"passed":true},{"actual":[-1310,3274],"check":"normal control 6","expected":[-1310,3274],"passed":true},{"actual":[-903,3864,-3036,355],"check":"normal control 7","expected":[-903,3864,-3036,355],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression 0\", \"actual\": [-444, 888, 0, 0], \"expected\": [-444, 888], \"passed\": false}, {\"check\": \"regression 1\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"partial-repair probe 2\", \"actual\": [-1467, 381, -156, 1500, 0, 0], \"expected\": [-1467, 381, -156, 1500], \"passed\": false}, {\"check\": \"partial-repair probe 3\", \"actual\": [-1806, 903, -258, 516, 0, 0], \"expected\": [-1806, 903, -258, 516], \"passed\": false}, {\"check\": \"normal control 4\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"normal control 5\", \"actual\": [-4516, 1806, -1677, 839], \"expected\": [-4516, 1806, -1677, 839], \"passed\": true}, {\"check\": \"normal control 6\", \"actual\": [-1310, 3274], \"expected\": [-1310, 3274], \"passed\": true}, {\"check\": \"normal control 7\", \"actual\": [-903, 3864, -3036, 355], \"expected\": [-903, 3864, -3036, 355], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.093,"exit_code":1,"observations":[{"actual":[-1008,5041,-2219,888],"check":"regression 0","expected":[-444,888],"passed":false},{"actual":[-1100,5500,-2500,500],"check":"regression 1","expected":[],"passed":false},{"actual":[-1467,381,-156,1500],"check":"partial-repair probe 2","expected":[-1467,381,-156,1500],"passed":true},{"actual":[-1806,903,-258,516],"check":"partial-repair probe 3","expected":[-1806,903,-258,516],"passed":true},{"actual":[],"check":"normal control 4","expected":[],"passed":true},{"actual":[-4516,1806,-1677,839],"check":"normal control 5","expected":[-4516,1806,-1677,839],"passed":true},{"actual":[-1310,3274],"check":"normal control 6","expected":[-1310,3274],"passed":true},{"actual":[-903,3864,-3036,355],"check":"normal control 7","expected":[-903,3864,-3036,355],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression 0\", \"actual\": [-1008, 5041, -2219, 888], \"expected\": [-444, 888], \"passed\": false}, {\"check\": \"regression 1\", \"actual\": [-1100, 5500, -2500, 500], \"expected\": [], \"passed\": false}, {\"check\": \"partial-repair probe 2\", \"actual\": [-1467, 381, -156, 1500], \"expected\": [-1467, 381, -156, 1500], \"passed\": true}, {\"check\": \"partial-repair probe 3\", \"actual\": [-1806, 903, -258, 516], \"expected\": [-1806, 903, -258, 516], \"passed\": true}, {\"check\": \"normal control 4\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"normal control 5\", \"actual\": [-4516, 1806, -1677, 839], \"expected\": [-4516, 1806, -1677, 839], \"passed\": true}, {\"check\": \"normal control 6\", \"actual\": [-1310, 3274], \"expected\": [-1310, 3274], \"passed\": true}, {\"check\": \"normal control 7\", \"actual\": [-903, 3864, -3036, 355], \"expected\": [-903, 3864, -3036, 355], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":40.141,"exit_code":0,"observations":[{"actual":[-444,888],"check":"regression 0","expected":[-444,888],"passed":true},{"actual":[],"check":"regression 1","expected":[],"passed":true},{"actual":[-1467,381,-156,1500],"check":"partial-repair probe 2","expected":[-1467,381,-156,1500],"passed":true},{"actual":[-1806,903,-258,516],"check":"partial-repair probe 3","expected":[-1806,903,-258,516],"passed":true},{"actual":[],"check":"normal control 4","expected":[],"passed":true},{"actual":[-4516,1806,-1677,839],"check":"normal control 5","expected":[-4516,1806,-1677,839],"passed":true},{"actual":[-1310,3274],"check":"normal control 6","expected":[-1310,3274],"passed":true},{"actual":[-903,3864,-3036,355],"check":"normal control 7","expected":[-903,3864,-3036,355],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression 0\", \"actual\": [-444, 888], \"expected\": [-444, 888], \"passed\": true}, {\"check\": \"regression 1\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"partial-repair probe 2\", \"actual\": [-1467, 381, -156, 1500], \"expected\": [-1467, 381, -156, 1500], \"passed\": true}, {\"check\": \"partial-repair probe 3\", \"actual\": [-1806, 903, -258, 516], \"expected\": [-1806, 903, -258, 516], \"passed\": true}, {\"check\": \"normal control 4\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"normal control 5\", \"actual\": [-4516, 1806, -1677, 839], \"expected\": [-4516, 1806, -1677, 839], \"passed\": true}, {\"check\": \"normal control 6\", \"actual\": [-1310, 3274], \"expected\": [-1310, 3274], \"passed\": true}, {\"check\": \"normal control 7\", \"actual\": [-903, 3864, -3036, 355], \"expected\": [-903, 3864, -3036, 355], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}