{"abstract":"BYMONTHDAY=31,-1 emits the 31st twice in long months.","category":"Calendar recurrence rules","checks":7,"contract":"FREQ=MONTHLY with a BYMONTHDAY list. Positive values count from the first day, negative values from the last day (-1 is the last day). A value that does not exist in a month is skipped for that month, never clamped. Months step by interval from the dtstart month; instances before dtstart are dropped; coinciding values yield one instance. Return the first count ISO dates in chronological order.","evaluation_group":"w2-calendar-recurrence-rules-monthly-bymonthday","failed_approach":"The partial repair `list(dict.fromkeys(days))` deduplicates but keeps list order, so a -1 listed before 1 is emitted out of chronological order.","family":"w2-calendar-recurrence-rules-monthly-bymonthday-dedupe-coinciding","id":"FA-76881","implementations":{"attempt":{"sha256":"f306b7f20d0b9a172e0e05ff607957bf902e74118263c7ebfedfeb6e26ae57c5","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport datetime as dt\nimport calendar\nN = 1\nobservations = []\ndef solve(dtstart, interval, monthdays, count):\n    start = dt.date.fromisoformat(dtstart)\n    out = []\n    for k in range(400):\n        mi = start.month - 1 + k * interval\n        y, m = start.year + mi // 12, mi % 12 + 1\n        dim = calendar.monthrange(y, m)[1]\n        days = []\n        for md in monthdays:\n            day = md if md > 0 else dim + md + 1\n            if 1 <= day <= dim:\n                days.append(day)\n        for day in list(dict.fromkeys(days)):\n            d = dt.date(y, m, day)\n            if d < start:\n                continue\n            if len(out) >= count:\n                return out\n            out.append(d.isoformat())\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: 31st skips short months',\n   ['2024-01-31', 1, [31], 5],\n   ['2024-01-31', '2024-03-31', '2024-05-31', '2024-07-31', '2024-08-31']),\n  ('last day of month', ['2024-01-15', 1, [-1], 4], ['2024-01-31', '2024-02-29', '2024-03-31', '2024-04-30']),\n  ('31 and -1 coincide',\n   ['2024-01-01', 1, [31, -1], 4],\n   ['2024-01-31', '2024-02-29', '2024-03-31', '2024-04-30']),\n  ('first and last listed last-first',\n   ['2024-03-10', 1, [-1, 1], 5],\n   ['2024-03-31', '2024-04-01', '2024-04-30', '2024-05-01', '2024-05-31']),\n  ('crossing december interval 2',\n   ['2024-11-05', 2, [5], 4],\n   ['2024-11-05', '2025-01-05', '2025-03-05', '2025-05-05']),\n  ('december start interval 1',\n   ['2024-12-10', 1, [10, -3], 4],\n   ['2024-12-10', '2024-12-29', '2025-01-10', '2025-01-29']),\n  ('dtstart after listed day',\n   ['2024-05-20', 1, [3, 25], 4],\n   ['2024-05-25', '2024-06-03', '2024-06-25', '2024-07-03'])],\n [('31 and -1 coincide',\n   ['2024-01-01', 1, [31, -1], 4],\n   ['2024-01-31', '2024-02-29', '2024-03-31', '2024-04-30']),\n  ('first and last listed last-first',\n   ['2024-03-10', 1, [-1, 1], 5],\n   ['2024-03-31', '2024-04-01', '2024-04-30', '2024-05-01', '2024-05-31']),\n  ('crossing december interval 2',\n   ['2024-11-05', 2, [5], 4],\n   ['2024-11-05', '2025-01-05', '2025-03-05', '2025-05-05']),\n  ('december start interval 1',\n   ['2024-12-10', 1, [10, -3], 4],\n   ['2024-12-10', '2024-12-29', '2025-01-10', '2025-01-29']),\n  ('dtstart after listed day',\n   ['2024-05-20', 1, [3, 25], 4],\n   ['2024-05-25', '2024-06-03', '2024-06-25', '2024-07-03']),\n  ('negative beyond month',\n   ['2023-02-01', 1, [-30], 4],\n   ['2023-03-02', '2023-04-01', '2023-05-02', '2023-06-01']),\n  ('interval 3 from october',\n   ['2023-10-15', 3, [15, -1], 5],\n   ['2023-10-15', '2023-10-31', '2024-01-15', '2024-01-31', '2024-04-15'])],\n [('crossing december interval 2',\n   ['2024-11-05', 2, [5], 4],\n   ['2024-11-05', '2025-01-05', '2025-03-05', '2025-05-05']),\n  ('december start interval 1',\n   ['2024-12-10', 1, [10, -3], 4],\n   ['2024-12-10', '2024-12-29', '2025-01-10', '2025-01-29']),\n  ('dtstart after listed day',\n   ['2024-05-20', 1, [3, 25], 4],\n   ['2024-05-25', '2024-06-03', '2024-06-25', '2024-07-03']),\n  ('negative beyond month',\n   ['2023-02-01', 1, [-30], 4],\n   ['2023-03-02', '2023-04-01', '2023-05-02', '2023-06-01']),\n  ('interval 3 from october',\n   ['2023-10-15', 3, [15, -1], 5],\n   ['2023-10-15', '2023-10-31', '2024-01-15', '2024-01-31', '2024-04-15']),\n  ('count zero', ['2024-01-01', 1, [1], 0], []),\n  ('leap february 29', ['2023-12-29', 2, [29], 4], ['2023-12-29', '2024-02-29', '2024-04-29', '2024-06-29']),\n  ('dtstart equals listed day',\n   ['2024-06-30', 1, [30, 1], 4],\n   ['2024-06-30', '2024-07-01', '2024-07-30', '2024-08-01']),\n  ('31 and -1 coincide',\n   ['2024-01-01', 1, [31, -1], 4],\n   ['2024-01-31', '2024-02-29', '2024-03-31', '2024-04-30'])],\n [('dtstart after listed day',\n   ['2024-05-20', 1, [3, 25], 4],\n   ['2024-05-25', '2024-06-03', '2024-06-25', '2024-07-03']),\n  ('negative beyond month',\n   ['2023-02-01', 1, [-30], 4],\n   ['2023-03-02', '2023-04-01', '2023-05-02', '2023-06-01']),\n  ('interval 3 from october',\n   ['2023-10-15', 3, [15, -1], 5],\n   ['2023-10-15', '2023-10-31', '2024-01-15', '2024-01-31', '2024-04-15']),\n  ('count zero', ['2024-01-01', 1, [1], 0], []),\n  ('leap february 29', ['2023-12-29', 2, [29], 4], ['2023-12-29', '2024-02-29', '2024-04-29', '2024-06-29']),\n  ('dtstart equals listed day',\n   ['2024-06-30', 1, [30, 1], 4],\n   ['2024-06-30', '2024-07-01', '2024-07-30', '2024-08-01']),\n  ('regression: 31st skips short months',\n   ['2024-01-31', 1, [31], 5],\n   ['2024-01-31', '2024-03-31', '2024-05-31', '2024-07-31', '2024-08-31']),\n  ('31 and -1 coincide',\n   ['2024-01-01', 1, [31, -1], 4],\n   ['2024-01-31', '2024-02-29', '2024-03-31', '2024-04-30'])],\n [('interval 3 from october',\n   ['2023-10-15', 3, [15, -1], 5],\n   ['2023-10-15', '2023-10-31', '2024-01-15', '2024-01-31', '2024-04-15']),\n  ('count zero', ['2024-01-01', 1, [1], 0], []),\n  ('leap february 29', ['2023-12-29', 2, [29], 4], ['2023-12-29', '2024-02-29', '2024-04-29', '2024-06-29']),\n  ('dtstart equals listed day',\n   ['2024-06-30', 1, [30, 1], 4],\n   ['2024-06-30', '2024-07-01', '2024-07-30', '2024-08-01']),\n  ('regression: 31st skips short months',\n   ['2024-01-31', 1, [31], 5],\n   ['2024-01-31', '2024-03-31', '2024-05-31', '2024-07-31', '2024-08-31']),\n  ('last day of month', ['2024-01-15', 1, [-1], 4], ['2024-01-31', '2024-02-29', '2024-03-31', '2024-04-30']),\n  ('31 and -1 coincide',\n   ['2024-01-01', 1, [31, -1], 4],\n   ['2024-01-31', '2024-02-29', '2024-03-31', '2024-04-30'])]]\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":"6bce13447b688b7214cee4846160b87ce6c0656e58dac6bb52bd9bc9a1c2567e","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport datetime as dt\nimport calendar\nN = 1\nobservations = []\ndef solve(dtstart, interval, monthdays, count):\n    start = dt.date.fromisoformat(dtstart)\n    out = []\n    for k in range(400):\n        mi = start.month - 1 + k * interval\n        y, m = start.year + mi // 12, mi % 12 + 1\n        dim = calendar.monthrange(y, m)[1]\n        days = []\n        for md in monthdays:\n            day = md if md > 0 else dim + md + 1\n            if 1 <= day <= dim:\n                days.append(day)\n        for day in sorted(days):\n            d = dt.date(y, m, day)\n            if d < start:\n                continue\n            if len(out) >= count:\n                return out\n            out.append(d.isoformat())\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: 31st skips short months',\n   ['2024-01-31', 1, [31], 5],\n   ['2024-01-31', '2024-03-31', '2024-05-31', '2024-07-31', '2024-08-31']),\n  ('last day of month', ['2024-01-15', 1, [-1], 4], ['2024-01-31', '2024-02-29', '2024-03-31', '2024-04-30']),\n  ('31 and -1 coincide',\n   ['2024-01-01', 1, [31, -1], 4],\n   ['2024-01-31', '2024-02-29', '2024-03-31', '2024-04-30']),\n  ('first and last listed last-first',\n   ['2024-03-10', 1, [-1, 1], 5],\n   ['2024-03-31', '2024-04-01', '2024-04-30', '2024-05-01', '2024-05-31']),\n  ('crossing december interval 2',\n   ['2024-11-05', 2, [5], 4],\n   ['2024-11-05', '2025-01-05', '2025-03-05', '2025-05-05']),\n  ('december start interval 1',\n   ['2024-12-10', 1, [10, -3], 4],\n   ['2024-12-10', '2024-12-29', '2025-01-10', '2025-01-29']),\n  ('dtstart after listed day',\n   ['2024-05-20', 1, [3, 25], 4],\n   ['2024-05-25', '2024-06-03', '2024-06-25', '2024-07-03'])],\n [('31 and -1 coincide',\n   ['2024-01-01', 1, [31, -1], 4],\n   ['2024-01-31', '2024-02-29', '2024-03-31', '2024-04-30']),\n  ('first and last listed last-first',\n   ['2024-03-10', 1, [-1, 1], 5],\n   ['2024-03-31', '2024-04-01', '2024-04-30', '2024-05-01', '2024-05-31']),\n  ('crossing december interval 2',\n   ['2024-11-05', 2, [5], 4],\n   ['2024-11-05', '2025-01-05', '2025-03-05', '2025-05-05']),\n  ('december start interval 1',\n   ['2024-12-10', 1, [10, -3], 4],\n   ['2024-12-10', '2024-12-29', '2025-01-10', '2025-01-29']),\n  ('dtstart after listed day',\n   ['2024-05-20', 1, [3, 25], 4],\n   ['2024-05-25', '2024-06-03', '2024-06-25', '2024-07-03']),\n  ('negative beyond month',\n   ['2023-02-01', 1, [-30], 4],\n   ['2023-03-02', '2023-04-01', '2023-05-02', '2023-06-01']),\n  ('interval 3 from october',\n   ['2023-10-15', 3, [15, -1], 5],\n   ['2023-10-15', '2023-10-31', '2024-01-15', '2024-01-31', '2024-04-15'])],\n [('crossing december interval 2',\n   ['2024-11-05', 2, [5], 4],\n   ['2024-11-05', '2025-01-05', '2025-03-05', '2025-05-05']),\n  ('december start interval 1',\n   ['2024-12-10', 1, [10, -3], 4],\n   ['2024-12-10', '2024-12-29', '2025-01-10', '2025-01-29']),\n  ('dtstart after listed day',\n   ['2024-05-20', 1, [3, 25], 4],\n   ['2024-05-25', '2024-06-03', '2024-06-25', '2024-07-03']),\n  ('negative beyond month',\n   ['2023-02-01', 1, [-30], 4],\n   ['2023-03-02', '2023-04-01', '2023-05-02', '2023-06-01']),\n  ('interval 3 from october',\n   ['2023-10-15', 3, [15, -1], 5],\n   ['2023-10-15', '2023-10-31', '2024-01-15', '2024-01-31', '2024-04-15']),\n  ('count zero', ['2024-01-01', 1, [1], 0], []),\n  ('leap february 29', ['2023-12-29', 2, [29], 4], ['2023-12-29', '2024-02-29', '2024-04-29', '2024-06-29']),\n  ('dtstart equals listed day',\n   ['2024-06-30', 1, [30, 1], 4],\n   ['2024-06-30', '2024-07-01', '2024-07-30', '2024-08-01']),\n  ('31 and -1 coincide',\n   ['2024-01-01', 1, [31, -1], 4],\n   ['2024-01-31', '2024-02-29', '2024-03-31', '2024-04-30'])],\n [('dtstart after listed day',\n   ['2024-05-20', 1, [3, 25], 4],\n   ['2024-05-25', '2024-06-03', '2024-06-25', '2024-07-03']),\n  ('negative beyond month',\n   ['2023-02-01', 1, [-30], 4],\n   ['2023-03-02', '2023-04-01', '2023-05-02', '2023-06-01']),\n  ('interval 3 from october',\n   ['2023-10-15', 3, [15, -1], 5],\n   ['2023-10-15', '2023-10-31', '2024-01-15', '2024-01-31', '2024-04-15']),\n  ('count zero', ['2024-01-01', 1, [1], 0], []),\n  ('leap february 29', ['2023-12-29', 2, [29], 4], ['2023-12-29', '2024-02-29', '2024-04-29', '2024-06-29']),\n  ('dtstart equals listed day',\n   ['2024-06-30', 1, [30, 1], 4],\n   ['2024-06-30', '2024-07-01', '2024-07-30', '2024-08-01']),\n  ('regression: 31st skips short months',\n   ['2024-01-31', 1, [31], 5],\n   ['2024-01-31', '2024-03-31', '2024-05-31', '2024-07-31', '2024-08-31']),\n  ('31 and -1 coincide',\n   ['2024-01-01', 1, [31, -1], 4],\n   ['2024-01-31', '2024-02-29', '2024-03-31', '2024-04-30'])],\n [('interval 3 from october',\n   ['2023-10-15', 3, [15, -1], 5],\n   ['2023-10-15', '2023-10-31', '2024-01-15', '2024-01-31', '2024-04-15']),\n  ('count zero', ['2024-01-01', 1, [1], 0], []),\n  ('leap february 29', ['2023-12-29', 2, [29], 4], ['2023-12-29', '2024-02-29', '2024-04-29', '2024-06-29']),\n  ('dtstart equals listed day',\n   ['2024-06-30', 1, [30, 1], 4],\n   ['2024-06-30', '2024-07-01', '2024-07-30', '2024-08-01']),\n  ('regression: 31st skips short months',\n   ['2024-01-31', 1, [31], 5],\n   ['2024-01-31', '2024-03-31', '2024-05-31', '2024-07-31', '2024-08-31']),\n  ('last day of month', ['2024-01-15', 1, [-1], 4], ['2024-01-31', '2024-02-29', '2024-03-31', '2024-04-30']),\n  ('31 and -1 coincide',\n   ['2024-01-01', 1, [31, -1], 4],\n   ['2024-01-31', '2024-02-29', '2024-03-31', '2024-04-30'])]]\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":"8815dadd4bdd580b72cbe68ac4e70d53fe193c8c080b8db64810cbd41f404d8c","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport datetime as dt\nimport calendar\nN = 1\nobservations = []\ndef solve(dtstart, interval, monthdays, count):\n    start = dt.date.fromisoformat(dtstart)\n    out = []\n    for k in range(400):\n        mi = start.month - 1 + k * interval\n        y, m = start.year + mi // 12, mi % 12 + 1\n        dim = calendar.monthrange(y, m)[1]\n        days = []\n        for md in monthdays:\n            day = md if md > 0 else dim + md + 1\n            if 1 <= day <= dim:\n                days.append(day)\n        for day in sorted(set(days)):\n            d = dt.date(y, m, day)\n            if d < start:\n                continue\n            if len(out) >= count:\n                return out\n            out.append(d.isoformat())\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: 31st skips short months',\n   ['2024-01-31', 1, [31], 5],\n   ['2024-01-31', '2024-03-31', '2024-05-31', '2024-07-31', '2024-08-31']),\n  ('last day of month', ['2024-01-15', 1, [-1], 4], ['2024-01-31', '2024-02-29', '2024-03-31', '2024-04-30']),\n  ('31 and -1 coincide',\n   ['2024-01-01', 1, [31, -1], 4],\n   ['2024-01-31', '2024-02-29', '2024-03-31', '2024-04-30']),\n  ('first and last listed last-first',\n   ['2024-03-10', 1, [-1, 1], 5],\n   ['2024-03-31', '2024-04-01', '2024-04-30', '2024-05-01', '2024-05-31']),\n  ('crossing december interval 2',\n   ['2024-11-05', 2, [5], 4],\n   ['2024-11-05', '2025-01-05', '2025-03-05', '2025-05-05']),\n  ('december start interval 1',\n   ['2024-12-10', 1, [10, -3], 4],\n   ['2024-12-10', '2024-12-29', '2025-01-10', '2025-01-29']),\n  ('dtstart after listed day',\n   ['2024-05-20', 1, [3, 25], 4],\n   ['2024-05-25', '2024-06-03', '2024-06-25', '2024-07-03'])],\n [('31 and -1 coincide',\n   ['2024-01-01', 1, [31, -1], 4],\n   ['2024-01-31', '2024-02-29', '2024-03-31', '2024-04-30']),\n  ('first and last listed last-first',\n   ['2024-03-10', 1, [-1, 1], 5],\n   ['2024-03-31', '2024-04-01', '2024-04-30', '2024-05-01', '2024-05-31']),\n  ('crossing december interval 2',\n   ['2024-11-05', 2, [5], 4],\n   ['2024-11-05', '2025-01-05', '2025-03-05', '2025-05-05']),\n  ('december start interval 1',\n   ['2024-12-10', 1, [10, -3], 4],\n   ['2024-12-10', '2024-12-29', '2025-01-10', '2025-01-29']),\n  ('dtstart after listed day',\n   ['2024-05-20', 1, [3, 25], 4],\n   ['2024-05-25', '2024-06-03', '2024-06-25', '2024-07-03']),\n  ('negative beyond month',\n   ['2023-02-01', 1, [-30], 4],\n   ['2023-03-02', '2023-04-01', '2023-05-02', '2023-06-01']),\n  ('interval 3 from october',\n   ['2023-10-15', 3, [15, -1], 5],\n   ['2023-10-15', '2023-10-31', '2024-01-15', '2024-01-31', '2024-04-15'])],\n [('crossing december interval 2',\n   ['2024-11-05', 2, [5], 4],\n   ['2024-11-05', '2025-01-05', '2025-03-05', '2025-05-05']),\n  ('december start interval 1',\n   ['2024-12-10', 1, [10, -3], 4],\n   ['2024-12-10', '2024-12-29', '2025-01-10', '2025-01-29']),\n  ('dtstart after listed day',\n   ['2024-05-20', 1, [3, 25], 4],\n   ['2024-05-25', '2024-06-03', '2024-06-25', '2024-07-03']),\n  ('negative beyond month',\n   ['2023-02-01', 1, [-30], 4],\n   ['2023-03-02', '2023-04-01', '2023-05-02', '2023-06-01']),\n  ('interval 3 from october',\n   ['2023-10-15', 3, [15, -1], 5],\n   ['2023-10-15', '2023-10-31', '2024-01-15', '2024-01-31', '2024-04-15']),\n  ('count zero', ['2024-01-01', 1, [1], 0], []),\n  ('leap february 29', ['2023-12-29', 2, [29], 4], ['2023-12-29', '2024-02-29', '2024-04-29', '2024-06-29']),\n  ('dtstart equals listed day',\n   ['2024-06-30', 1, [30, 1], 4],\n   ['2024-06-30', '2024-07-01', '2024-07-30', '2024-08-01']),\n  ('31 and -1 coincide',\n   ['2024-01-01', 1, [31, -1], 4],\n   ['2024-01-31', '2024-02-29', '2024-03-31', '2024-04-30'])],\n [('dtstart after listed day',\n   ['2024-05-20', 1, [3, 25], 4],\n   ['2024-05-25', '2024-06-03', '2024-06-25', '2024-07-03']),\n  ('negative beyond month',\n   ['2023-02-01', 1, [-30], 4],\n   ['2023-03-02', '2023-04-01', '2023-05-02', '2023-06-01']),\n  ('interval 3 from october',\n   ['2023-10-15', 3, [15, -1], 5],\n   ['2023-10-15', '2023-10-31', '2024-01-15', '2024-01-31', '2024-04-15']),\n  ('count zero', ['2024-01-01', 1, [1], 0], []),\n  ('leap february 29', ['2023-12-29', 2, [29], 4], ['2023-12-29', '2024-02-29', '2024-04-29', '2024-06-29']),\n  ('dtstart equals listed day',\n   ['2024-06-30', 1, [30, 1], 4],\n   ['2024-06-30', '2024-07-01', '2024-07-30', '2024-08-01']),\n  ('regression: 31st skips short months',\n   ['2024-01-31', 1, [31], 5],\n   ['2024-01-31', '2024-03-31', '2024-05-31', '2024-07-31', '2024-08-31']),\n  ('31 and -1 coincide',\n   ['2024-01-01', 1, [31, -1], 4],\n   ['2024-01-31', '2024-02-29', '2024-03-31', '2024-04-30'])],\n [('interval 3 from october',\n   ['2023-10-15', 3, [15, -1], 5],\n   ['2023-10-15', '2023-10-31', '2024-01-15', '2024-01-31', '2024-04-15']),\n  ('count zero', ['2024-01-01', 1, [1], 0], []),\n  ('leap february 29', ['2023-12-29', 2, [29], 4], ['2023-12-29', '2024-02-29', '2024-04-29', '2024-06-29']),\n  ('dtstart equals listed day',\n   ['2024-06-30', 1, [30, 1], 4],\n   ['2024-06-30', '2024-07-01', '2024-07-30', '2024-08-01']),\n  ('regression: 31st skips short months',\n   ['2024-01-31', 1, [31], 5],\n   ['2024-01-31', '2024-03-31', '2024-05-31', '2024-07-31', '2024-08-31']),\n  ('last day of month', ['2024-01-15', 1, [-1], 4], ['2024-01-31', '2024-02-29', '2024-03-31', '2024-04-30']),\n  ('31 and -1 coincide',\n   ['2024-01-01', 1, [31, -1], 4],\n   ['2024-01-31', '2024-02-29', '2024-03-31', '2024-04-30'])]]\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":"Stipulated, bounded recurrence-expansion model evaluated offline on explicit fixtures; it is not a complete iCalendar implementation and makes no claim of standards conformance. 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-calendar-recurrence-rules-monthly-bymonthday-dedupe-coinciding","generated_at":"2026-09-29T14:49:20.368658+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Recurring calendar series are expanded into concrete instances for display, reminders and conflict checks.","repair":"At the dedupe coinciding decision use `sorted(set(days))`, leaving the other decision sites of the model unchanged.","root_cause":"Month-day values that resolve to the same date are not merged.","sha256":"9d2f37db4b9298a0b42d49fe2ba14c0dc8c2a8f8f994eb0d89a0765253a26fb6","title":"Monthly BYMONTHDAY expansion with negative and invalid days: dedupe coinciding · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":39.44,"exit_code":1,"observations":[{"actual":["2024-01-31","2024-03-31","2024-05-31","2024-07-31","2024-08-31"],"check":"regression: 31st skips short months","expected":["2024-01-31","2024-03-31","2024-05-31","2024-07-31","2024-08-31"],"passed":true},{"actual":["2024-01-31","2024-02-29","2024-03-31","2024-04-30"],"check":"last day of month","expected":["2024-01-31","2024-02-29","2024-03-31","2024-04-30"],"passed":true},{"actual":["2024-01-31","2024-02-29","2024-03-31","2024-04-30"],"check":"31 and -1 coincide","expected":["2024-01-31","2024-02-29","2024-03-31","2024-04-30"],"passed":true},{"actual":["2024-03-31","2024-04-30","2024-04-01","2024-05-31","2024-05-01"],"check":"first and last listed last-first","expected":["2024-03-31","2024-04-01","2024-04-30","2024-05-01","2024-05-31"],"passed":false},{"actual":["2024-11-05","2025-01-05","2025-03-05","2025-05-05"],"check":"crossing december interval 2","expected":["2024-11-05","2025-01-05","2025-03-05","2025-05-05"],"passed":true},{"actual":["2024-12-10","2024-12-29","2025-01-10","2025-01-29"],"check":"december start interval 1","expected":["2024-12-10","2024-12-29","2025-01-10","2025-01-29"],"passed":true},{"actual":["2024-05-25","2024-06-03","2024-06-25","2024-07-03"],"check":"dtstart after listed day","expected":["2024-05-25","2024-06-03","2024-06-25","2024-07-03"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: 31st skips short months\", \"actual\": [\"2024-01-31\", \"2024-03-31\", \"2024-05-31\", \"2024-07-31\", \"2024-08-31\"], \"expected\": [\"2024-01-31\", \"2024-03-31\", \"2024-05-31\", \"2024-07-31\", \"2024-08-31\"], \"passed\": true}, {\"check\": \"last day of month\", \"actual\": [\"2024-01-31\", \"2024-02-29\", \"2024-03-31\", \"2024-04-30\"], \"expected\": [\"2024-01-31\", \"2024-02-29\", \"2024-03-31\", \"2024-04-30\"], \"passed\": true}, {\"check\": \"31 and -1 coincide\", \"actual\": [\"2024-01-31\", \"2024-02-29\", \"2024-03-31\", \"2024-04-30\"], \"expected\": [\"2024-01-31\", \"2024-02-29\", \"2024-03-31\", \"2024-04-30\"], \"passed\": true}, {\"check\": \"first and last listed last-first\", \"actual\": [\"2024-03-31\", \"2024-04-30\", \"2024-04-01\", \"2024-05-31\", \"2024-05-01\"], \"expected\": [\"2024-03-31\", \"2024-04-01\", \"2024-04-30\", \"2024-05-01\", \"2024-05-31\"], \"passed\": false}, {\"check\": \"crossing december interval 2\", \"actual\": [\"2024-11-05\", \"2025-01-05\", \"2025-03-05\", \"2025-05-05\"], \"expected\": [\"2024-11-05\", \"2025-01-05\", \"2025-03-05\", \"2025-05-05\"], \"passed\": true}, {\"check\": \"december start interval 1\", \"actual\": [\"2024-12-10\", \"2024-12-29\", \"2025-01-10\", \"2025-01-29\"], \"expected\": [\"2024-12-10\", \"2024-12-29\", \"2025-01-10\", \"2025-01-29\"], \"passed\": true}, {\"check\": \"dtstart after listed day\", \"actual\": [\"2024-05-25\", \"2024-06-03\", \"2024-06-25\", \"2024-07-03\"], \"expected\": [\"2024-05-25\", \"2024-06-03\", \"2024-06-25\", \"2024-07-03\"], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.108,"exit_code":1,"observations":[{"actual":["2024-01-31","2024-03-31","2024-05-31","2024-07-31","2024-08-31"],"check":"regression: 31st skips short months","expected":["2024-01-31","2024-03-31","2024-05-31","2024-07-31","2024-08-31"],"passed":true},{"actual":["2024-01-31","2024-02-29","2024-03-31","2024-04-30"],"check":"last day of month","expected":["2024-01-31","2024-02-29","2024-03-31","2024-04-30"],"passed":true},{"actual":["2024-01-31","2024-01-31","2024-02-29","2024-03-31"],"check":"31 and -1 coincide","expected":["2024-01-31","2024-02-29","2024-03-31","2024-04-30"],"passed":false},{"actual":["2024-03-31","2024-04-01","2024-04-30","2024-05-01","2024-05-31"],"check":"first and last listed last-first","expected":["2024-03-31","2024-04-01","2024-04-30","2024-05-01","2024-05-31"],"passed":true},{"actual":["2024-11-05","2025-01-05","2025-03-05","2025-05-05"],"check":"crossing december interval 2","expected":["2024-11-05","2025-01-05","2025-03-05","2025-05-05"],"passed":true},{"actual":["2024-12-10","2024-12-29","2025-01-10","2025-01-29"],"check":"december start interval 1","expected":["2024-12-10","2024-12-29","2025-01-10","2025-01-29"],"passed":true},{"actual":["2024-05-25","2024-06-03","2024-06-25","2024-07-03"],"check":"dtstart after listed day","expected":["2024-05-25","2024-06-03","2024-06-25","2024-07-03"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: 31st skips short months\", \"actual\": [\"2024-01-31\", \"2024-03-31\", \"2024-05-31\", \"2024-07-31\", \"2024-08-31\"], \"expected\": [\"2024-01-31\", \"2024-03-31\", \"2024-05-31\", \"2024-07-31\", \"2024-08-31\"], \"passed\": true}, {\"check\": \"last day of month\", \"actual\": [\"2024-01-31\", \"2024-02-29\", \"2024-03-31\", \"2024-04-30\"], \"expected\": [\"2024-01-31\", \"2024-02-29\", \"2024-03-31\", \"2024-04-30\"], \"passed\": true}, {\"check\": \"31 and -1 coincide\", \"actual\": [\"2024-01-31\", \"2024-01-31\", \"2024-02-29\", \"2024-03-31\"], \"expected\": [\"2024-01-31\", \"2024-02-29\", \"2024-03-31\", \"2024-04-30\"], \"passed\": false}, {\"check\": \"first and last listed last-first\", \"actual\": [\"2024-03-31\", \"2024-04-01\", \"2024-04-30\", \"2024-05-01\", \"2024-05-31\"], \"expected\": [\"2024-03-31\", \"2024-04-01\", \"2024-04-30\", \"2024-05-01\", \"2024-05-31\"], \"passed\": true}, {\"check\": \"crossing december interval 2\", \"actual\": [\"2024-11-05\", \"2025-01-05\", \"2025-03-05\", \"2025-05-05\"], \"expected\": [\"2024-11-05\", \"2025-01-05\", \"2025-03-05\", \"2025-05-05\"], \"passed\": true}, {\"check\": \"december start interval 1\", \"actual\": [\"2024-12-10\", \"2024-12-29\", \"2025-01-10\", \"2025-01-29\"], \"expected\": [\"2024-12-10\", \"2024-12-29\", \"2025-01-10\", \"2025-01-29\"], \"passed\": true}, {\"check\": \"dtstart after listed day\", \"actual\": [\"2024-05-25\", \"2024-06-03\", \"2024-06-25\", \"2024-07-03\"], \"expected\": [\"2024-05-25\", \"2024-06-03\", \"2024-06-25\", \"2024-07-03\"], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":41.742,"exit_code":0,"observations":[{"actual":["2024-01-31","2024-03-31","2024-05-31","2024-07-31","2024-08-31"],"check":"regression: 31st skips short months","expected":["2024-01-31","2024-03-31","2024-05-31","2024-07-31","2024-08-31"],"passed":true},{"actual":["2024-01-31","2024-02-29","2024-03-31","2024-04-30"],"check":"last day of month","expected":["2024-01-31","2024-02-29","2024-03-31","2024-04-30"],"passed":true},{"actual":["2024-01-31","2024-02-29","2024-03-31","2024-04-30"],"check":"31 and -1 coincide","expected":["2024-01-31","2024-02-29","2024-03-31","2024-04-30"],"passed":true},{"actual":["2024-03-31","2024-04-01","2024-04-30","2024-05-01","2024-05-31"],"check":"first and last listed last-first","expected":["2024-03-31","2024-04-01","2024-04-30","2024-05-01","2024-05-31"],"passed":true},{"actual":["2024-11-05","2025-01-05","2025-03-05","2025-05-05"],"check":"crossing december interval 2","expected":["2024-11-05","2025-01-05","2025-03-05","2025-05-05"],"passed":true},{"actual":["2024-12-10","2024-12-29","2025-01-10","2025-01-29"],"check":"december start interval 1","expected":["2024-12-10","2024-12-29","2025-01-10","2025-01-29"],"passed":true},{"actual":["2024-05-25","2024-06-03","2024-06-25","2024-07-03"],"check":"dtstart after listed day","expected":["2024-05-25","2024-06-03","2024-06-25","2024-07-03"],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: 31st skips short months\", \"actual\": [\"2024-01-31\", \"2024-03-31\", \"2024-05-31\", \"2024-07-31\", \"2024-08-31\"], \"expected\": [\"2024-01-31\", \"2024-03-31\", \"2024-05-31\", \"2024-07-31\", \"2024-08-31\"], \"passed\": true}, {\"check\": \"last day of month\", \"actual\": [\"2024-01-31\", \"2024-02-29\", \"2024-03-31\", \"2024-04-30\"], \"expected\": [\"2024-01-31\", \"2024-02-29\", \"2024-03-31\", \"2024-04-30\"], \"passed\": true}, {\"check\": \"31 and -1 coincide\", \"actual\": [\"2024-01-31\", \"2024-02-29\", \"2024-03-31\", \"2024-04-30\"], \"expected\": [\"2024-01-31\", \"2024-02-29\", \"2024-03-31\", \"2024-04-30\"], \"passed\": true}, {\"check\": \"first and last listed last-first\", \"actual\": [\"2024-03-31\", \"2024-04-01\", \"2024-04-30\", \"2024-05-01\", \"2024-05-31\"], \"expected\": [\"2024-03-31\", \"2024-04-01\", \"2024-04-30\", \"2024-05-01\", \"2024-05-31\"], \"passed\": true}, {\"check\": \"crossing december interval 2\", \"actual\": [\"2024-11-05\", \"2025-01-05\", \"2025-03-05\", \"2025-05-05\"], \"expected\": [\"2024-11-05\", \"2025-01-05\", \"2025-03-05\", \"2025-05-05\"], \"passed\": true}, {\"check\": \"december start interval 1\", \"actual\": [\"2024-12-10\", \"2024-12-29\", \"2025-01-10\", \"2025-01-29\"], \"expected\": [\"2024-12-10\", \"2024-12-29\", \"2025-01-10\", \"2025-01-29\"], \"passed\": true}, {\"check\": \"dtstart after listed day\", \"actual\": [\"2024-05-25\", \"2024-06-03\", \"2024-06-25\", \"2024-07-03\"], \"expected\": [\"2024-05-25\", \"2024-06-03\", \"2024-06-25\", \"2024-07-03\"], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}