{"abstract":"A week with three leave days drags the average down.","category":"Shift rostering labor rules","checks":8,"contract":"Weeks [worked minutes, excluded leave/sick days]. The reference period needs ref counted weeks: weeks with any excluded day are skipped and replaced by following weeks. If fewer weeks are available, average the counted weeks. Return [counted weeks, floor average, average > limit] or [0, 0, False] when none count.","evaluation_group":"w2-shift-rostering-labor-rules-reference-period-average-hours","failed_approach":"A five-day threshold still keeps weeks with a few leave days.","family":"w2-shift-rostering-labor-rules-reference-period-average-hours-partial-week-exclusion","id":"FA-94271","implementations":{"attempt":{"sha256":"0300509b265d48e76ddf4ca0e166e6b8ae7091cefa527407bb61e8b4e4f5958c","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(weeks, ref, limit):\n    counted = []\n    for m, ex in weeks:\n        if len(counted) == ref:\n            break\n        if ex < 5:\n            counted.append(m)\n    if not counted:\n        return [0, 0, False]\n    avg = sum(counted) // len(counted)\n    return [len(counted), avg, avg > limit]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: partial week exclusion 1', [[[3000, 0], [1000, 2], [3000, 0], [3000, 0]], 3, 2880],\n   [3, 3000, True]),\n  ('regression variant: partial week exclusion 2',\n   [[[3000, 7], [3000, 5], [2400, 5], [2400, 5], [2881, 7], [2880, 7], [3000, 0], [3300, 3]], 4, 2880],\n   [1, 3000, True]),\n  ('partial repair guard 3',\n   [[[3300, 0], [3000, 5], [3300, 0], [0, 7], [0, 3], [1800, 0], [2400, 0], [0, 0], [2400, 7]], 3, 2880],\n   [3, 2800, False]),\n  ('boundary control 4', [[[2000, 1], [3000, 0]], 3, 2880], [1, 3000, True]),\n  ('boundary control 5', [[[2880, 0], [2880, 0], [2880, 0]], 3, 2880], [3, 2880, False]),\n  ('normal control 6',\n   [[[1800, 7], [2880, 5], [3000, 0], [2881, 0], [0, 0], [2400, 0], [0, 0], [2881, 3]], 4, 2880],\n   [4, 2070, False]),\n  ('normal control 7',\n   [[[3300, 7], [2880, 3], [0, 1], [3300, 0], [2880, 0], [3000, 1], [3000, 5], [2881, 3], [0, 3]], 3, 2880],\n   [2, 3090, True]),\n  ('normal control 8', [[[3300, 5], [2400, 5], [2400, 0], [2881, 5], [3000, 7], [2881, 0]], 4, 2880],\n   [2, 2640, False])],\n [('regression: partial week exclusion 1', [[[2000, 1], [3000, 0]], 3, 2880], [1, 3000, True]),\n  ('regression variant: partial week exclusion 2',\n   [[[0, 1], [2880, 0], [2880, 0], [0, 5], [1800, 3], [2400, 7], [3000, 1], [2881, 7], [2880, 5]], 3, 2880],\n   [2, 2880, False]),\n  ('partial repair guard 3',\n   [[[3300, 3], [0, 3], [0, 0], [2880, 5], [3000, 5], [1800, 3], [1800, 0], [2400, 0], [1800, 7]], 4, 2880],\n   [3, 1400, False]),\n  ('boundary control 4', [[[3000, 0], [1000, 2], [3000, 0], [3000, 0]], 3, 2880], [3, 3000, True]),\n  ('normal control 5', [[[2400, 5], [3300, 0], [0, 0], [0, 3], [1800, 0], [2881, 5], [2400, 7]], 3, 2880],\n   [3, 1700, False]),\n  ('normal control 6',\n   [[[3000, 3], [2880, 0], [2881, 0], [3000, 0], [2400, 0], [2880, 0], [2881, 5], [2880, 0]], 3, 2880],\n   [3, 2920, True]),\n  ('normal control 7',\n   [[[3300, 0], [2400, 0], [3300, 3], [3300, 1], [2880, 0], [3000, 0], [1800, 0], [2881, 1]], 3, 2880],\n   [3, 2860, False]),\n  ('normal control 8', [[[2880, 0], [0, 0], [2881, 0], [2880, 5], [3000, 3], [2400, 0]], 5, 2880],\n   [4, 2040, False])],\n [('regression: partial week exclusion 1', [[[2400, 1], [3000, 5], [3300, 1]], 3, 2880], [0, 0, False]),\n  ('regression variant: partial week exclusion 2',\n   [[[3000, 5], [1800, 0], [1800, 0], [3300, 3], [2400, 0], [2880, 0], [2881, 7], [3000, 7], [2400, 0]], 5,\n    2880],\n   [5, 2256, False]),\n  ('partial repair guard 3', [[[2400, 5], [3000, 1], [2400, 5]], 5, 2880], [0, 0, False]),\n  ('boundary control 4', [[[3000, 0], [0, 7], [2800, 0], [2900, 0]], 3, 2880], [3, 2900, True]),\n  ('boundary control 5', [[[3000, 0], [1000, 2], [3000, 0], [3000, 0]], 3, 2880], [3, 3000, True]),\n  ('normal control 6',\n   [[[2400, 0], [2881, 3], [3000, 5], [2400, 0], [0, 7], [2400, 1], [2881, 0], [2880, 5]], 3, 2880],\n   [3, 2560, False]),\n  ('normal control 7', [[[1800, 7], [2880, 1], [0, 0]], 3, 2880], [1, 0, False]),\n  ('normal control 8',\n   [[[3300, 0], [2400, 0], [3300, 3], [3300, 1], [2880, 0], [3000, 0], [1800, 0], [2881, 1]], 3, 2880],\n   [3, 2860, False])],\n [('regression: partial week exclusion 1',\n   [[[2400, 5], [3300, 0], [0, 0], [0, 3], [1800, 0], [2881, 5], [2400, 7]], 3, 2880], [3, 1700, False]),\n  ('regression variant: partial week exclusion 2',\n   [[[2880, 1], [3300, 0], [3000, 0], [2400, 1], [2400, 5], [2881, 3], [2881, 1], [1800, 0], [2880, 0]], 4,\n    2880],\n   [4, 2745, False]),\n  ('partial repair guard 3',\n   [[[3000, 1], [2400, 0], [1800, 1], [3300, 5], [1800, 5], [2881, 1], [1800, 1]], 3, 2880],\n   [1, 2400, False]),\n  ('boundary control 4', [[[2880, 0], [2880, 0], [2880, 0]], 3, 2880], [3, 2880, False]),\n  ('boundary control 5', [[[3000, 0], [0, 7], [2800, 0], [2900, 0]], 3, 2880], [3, 2900, True]),\n  ('normal control 6', [[[0, 5], [2881, 3], [2881, 1], [1800, 7], [1800, 1], [2880, 3], [3000, 1]], 5, 2880],\n   [0, 0, False]),\n  ('normal control 7', [[[0, 5], [0, 0], [1800, 7]], 4, 2880], [1, 0, False]),\n  ('normal control 8', [[[2881, 0], [1800, 5], [2880, 0], [0, 0], [1800, 0]], 4, 2880], [4, 1890, False])],\n [('regression: partial week exclusion 1', [[[2881, 3], [3300, 3], [3000, 0], [3000, 3], [2400, 7]], 4, 2880],\n   [1, 3000, True]),\n  ('regression variant: partial week exclusion 2',\n   [[[2400, 7], [3000, 7], [3300, 0], [2881, 7], [2400, 3], [2881, 1], [1800, 3], [1800, 7], [2881, 7]], 3,\n    2880],\n   [1, 3300, True]),\n  ('partial repair guard 3',\n   [[[2880, 1], [3300, 0], [3000, 0], [2400, 1], [2400, 5], [2881, 3], [2881, 1], [1800, 0], [2880, 0]], 4,\n    2880],\n   [4, 2745, False]),\n  ('boundary control 4', [[[2000, 1], [3000, 0]], 3, 2880], [1, 3000, True]),\n  ('boundary control 5', [[[2880, 0], [2880, 0], [2880, 0]], 3, 2880], [3, 2880, False]),\n  ('normal control 6', [[[2880, 7], [3000, 0], [2400, 0], [1800, 0], [1800, 7]], 4, 2880], [3, 2400, False]),\n  ('normal control 7', [[[3300, 5], [2881, 5], [0, 0], [0, 3]], 4, 2880], [1, 0, False]),\n  ('normal control 8', [[[2400, 5], [3300, 5], [2881, 0], [0, 5], [0, 0], [3300, 3], [2400, 7]], 5, 2880],\n   [2, 1440, False])]]\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":"b9c1e0abefc7dac2c9d2f6c687e0465a97c90686e5de468ceaf65ec2b04f68eb","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(weeks, ref, limit):\n    counted = []\n    for m, ex in weeks:\n        if len(counted) == ref:\n            break\n        if ex < 7:\n            counted.append(m)\n    if not counted:\n        return [0, 0, False]\n    avg = sum(counted) // len(counted)\n    return [len(counted), avg, avg > limit]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: partial week exclusion 1', [[[3000, 0], [1000, 2], [3000, 0], [3000, 0]], 3, 2880],\n   [3, 3000, True]),\n  ('regression variant: partial week exclusion 2',\n   [[[3000, 7], [3000, 5], [2400, 5], [2400, 5], [2881, 7], [2880, 7], [3000, 0], [3300, 3]], 4, 2880],\n   [1, 3000, True]),\n  ('partial repair guard 3',\n   [[[3300, 0], [3000, 5], [3300, 0], [0, 7], [0, 3], [1800, 0], [2400, 0], [0, 0], [2400, 7]], 3, 2880],\n   [3, 2800, False]),\n  ('boundary control 4', [[[2000, 1], [3000, 0]], 3, 2880], [1, 3000, True]),\n  ('boundary control 5', [[[2880, 0], [2880, 0], [2880, 0]], 3, 2880], [3, 2880, False]),\n  ('normal control 6',\n   [[[1800, 7], [2880, 5], [3000, 0], [2881, 0], [0, 0], [2400, 0], [0, 0], [2881, 3]], 4, 2880],\n   [4, 2070, False]),\n  ('normal control 7',\n   [[[3300, 7], [2880, 3], [0, 1], [3300, 0], [2880, 0], [3000, 1], [3000, 5], [2881, 3], [0, 3]], 3, 2880],\n   [2, 3090, True]),\n  ('normal control 8', [[[3300, 5], [2400, 5], [2400, 0], [2881, 5], [3000, 7], [2881, 0]], 4, 2880],\n   [2, 2640, False])],\n [('regression: partial week exclusion 1', [[[2000, 1], [3000, 0]], 3, 2880], [1, 3000, True]),\n  ('regression variant: partial week exclusion 2',\n   [[[0, 1], [2880, 0], [2880, 0], [0, 5], [1800, 3], [2400, 7], [3000, 1], [2881, 7], [2880, 5]], 3, 2880],\n   [2, 2880, False]),\n  ('partial repair guard 3',\n   [[[3300, 3], [0, 3], [0, 0], [2880, 5], [3000, 5], [1800, 3], [1800, 0], [2400, 0], [1800, 7]], 4, 2880],\n   [3, 1400, False]),\n  ('boundary control 4', [[[3000, 0], [1000, 2], [3000, 0], [3000, 0]], 3, 2880], [3, 3000, True]),\n  ('normal control 5', [[[2400, 5], [3300, 0], [0, 0], [0, 3], [1800, 0], [2881, 5], [2400, 7]], 3, 2880],\n   [3, 1700, False]),\n  ('normal control 6',\n   [[[3000, 3], [2880, 0], [2881, 0], [3000, 0], [2400, 0], [2880, 0], [2881, 5], [2880, 0]], 3, 2880],\n   [3, 2920, True]),\n  ('normal control 7',\n   [[[3300, 0], [2400, 0], [3300, 3], [3300, 1], [2880, 0], [3000, 0], [1800, 0], [2881, 1]], 3, 2880],\n   [3, 2860, False]),\n  ('normal control 8', [[[2880, 0], [0, 0], [2881, 0], [2880, 5], [3000, 3], [2400, 0]], 5, 2880],\n   [4, 2040, False])],\n [('regression: partial week exclusion 1', [[[2400, 1], [3000, 5], [3300, 1]], 3, 2880], [0, 0, False]),\n  ('regression variant: partial week exclusion 2',\n   [[[3000, 5], [1800, 0], [1800, 0], [3300, 3], [2400, 0], [2880, 0], [2881, 7], [3000, 7], [2400, 0]], 5,\n    2880],\n   [5, 2256, False]),\n  ('partial repair guard 3', [[[2400, 5], [3000, 1], [2400, 5]], 5, 2880], [0, 0, False]),\n  ('boundary control 4', [[[3000, 0], [0, 7], [2800, 0], [2900, 0]], 3, 2880], [3, 2900, True]),\n  ('boundary control 5', [[[3000, 0], [1000, 2], [3000, 0], [3000, 0]], 3, 2880], [3, 3000, True]),\n  ('normal control 6',\n   [[[2400, 0], [2881, 3], [3000, 5], [2400, 0], [0, 7], [2400, 1], [2881, 0], [2880, 5]], 3, 2880],\n   [3, 2560, False]),\n  ('normal control 7', [[[1800, 7], [2880, 1], [0, 0]], 3, 2880], [1, 0, False]),\n  ('normal control 8',\n   [[[3300, 0], [2400, 0], [3300, 3], [3300, 1], [2880, 0], [3000, 0], [1800, 0], [2881, 1]], 3, 2880],\n   [3, 2860, False])],\n [('regression: partial week exclusion 1',\n   [[[2400, 5], [3300, 0], [0, 0], [0, 3], [1800, 0], [2881, 5], [2400, 7]], 3, 2880], [3, 1700, False]),\n  ('regression variant: partial week exclusion 2',\n   [[[2880, 1], [3300, 0], [3000, 0], [2400, 1], [2400, 5], [2881, 3], [2881, 1], [1800, 0], [2880, 0]], 4,\n    2880],\n   [4, 2745, False]),\n  ('partial repair guard 3',\n   [[[3000, 1], [2400, 0], [1800, 1], [3300, 5], [1800, 5], [2881, 1], [1800, 1]], 3, 2880],\n   [1, 2400, False]),\n  ('boundary control 4', [[[2880, 0], [2880, 0], [2880, 0]], 3, 2880], [3, 2880, False]),\n  ('boundary control 5', [[[3000, 0], [0, 7], [2800, 0], [2900, 0]], 3, 2880], [3, 2900, True]),\n  ('normal control 6', [[[0, 5], [2881, 3], [2881, 1], [1800, 7], [1800, 1], [2880, 3], [3000, 1]], 5, 2880],\n   [0, 0, False]),\n  ('normal control 7', [[[0, 5], [0, 0], [1800, 7]], 4, 2880], [1, 0, False]),\n  ('normal control 8', [[[2881, 0], [1800, 5], [2880, 0], [0, 0], [1800, 0]], 4, 2880], [4, 1890, False])],\n [('regression: partial week exclusion 1', [[[2881, 3], [3300, 3], [3000, 0], [3000, 3], [2400, 7]], 4, 2880],\n   [1, 3000, True]),\n  ('regression variant: partial week exclusion 2',\n   [[[2400, 7], [3000, 7], [3300, 0], [2881, 7], [2400, 3], [2881, 1], [1800, 3], [1800, 7], [2881, 7]], 3,\n    2880],\n   [1, 3300, True]),\n  ('partial repair guard 3',\n   [[[2880, 1], [3300, 0], [3000, 0], [2400, 1], [2400, 5], [2881, 3], [2881, 1], [1800, 0], [2880, 0]], 4,\n    2880],\n   [4, 2745, False]),\n  ('boundary control 4', [[[2000, 1], [3000, 0]], 3, 2880], [1, 3000, True]),\n  ('boundary control 5', [[[2880, 0], [2880, 0], [2880, 0]], 3, 2880], [3, 2880, False]),\n  ('normal control 6', [[[2880, 7], [3000, 0], [2400, 0], [1800, 0], [1800, 7]], 4, 2880], [3, 2400, False]),\n  ('normal control 7', [[[3300, 5], [2881, 5], [0, 0], [0, 3]], 4, 2880], [1, 0, False]),\n  ('normal control 8', [[[2400, 5], [3300, 5], [2881, 0], [0, 5], [0, 0], [3300, 3], [2400, 7]], 5, 2880],\n   [2, 1440, False])]]\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":"9b3c63afdbe56ce94ec16294d18d49634f3cd80b7f63a7d907fb0bf0f3251d5c","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(weeks, ref, limit):\n    counted = []\n    for m, ex in weeks:\n        if len(counted) == ref:\n            break\n        if ex == 0:\n            counted.append(m)\n    if not counted:\n        return [0, 0, False]\n    avg = sum(counted) // len(counted)\n    return [len(counted), avg, avg > limit]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: partial week exclusion 1', [[[3000, 0], [1000, 2], [3000, 0], [3000, 0]], 3, 2880],\n   [3, 3000, True]),\n  ('regression variant: partial week exclusion 2',\n   [[[3000, 7], [3000, 5], [2400, 5], [2400, 5], [2881, 7], [2880, 7], [3000, 0], [3300, 3]], 4, 2880],\n   [1, 3000, True]),\n  ('partial repair guard 3',\n   [[[3300, 0], [3000, 5], [3300, 0], [0, 7], [0, 3], [1800, 0], [2400, 0], [0, 0], [2400, 7]], 3, 2880],\n   [3, 2800, False]),\n  ('boundary control 4', [[[2000, 1], [3000, 0]], 3, 2880], [1, 3000, True]),\n  ('boundary control 5', [[[2880, 0], [2880, 0], [2880, 0]], 3, 2880], [3, 2880, False]),\n  ('normal control 6',\n   [[[1800, 7], [2880, 5], [3000, 0], [2881, 0], [0, 0], [2400, 0], [0, 0], [2881, 3]], 4, 2880],\n   [4, 2070, False]),\n  ('normal control 7',\n   [[[3300, 7], [2880, 3], [0, 1], [3300, 0], [2880, 0], [3000, 1], [3000, 5], [2881, 3], [0, 3]], 3, 2880],\n   [2, 3090, True]),\n  ('normal control 8', [[[3300, 5], [2400, 5], [2400, 0], [2881, 5], [3000, 7], [2881, 0]], 4, 2880],\n   [2, 2640, False])],\n [('regression: partial week exclusion 1', [[[2000, 1], [3000, 0]], 3, 2880], [1, 3000, True]),\n  ('regression variant: partial week exclusion 2',\n   [[[0, 1], [2880, 0], [2880, 0], [0, 5], [1800, 3], [2400, 7], [3000, 1], [2881, 7], [2880, 5]], 3, 2880],\n   [2, 2880, False]),\n  ('partial repair guard 3',\n   [[[3300, 3], [0, 3], [0, 0], [2880, 5], [3000, 5], [1800, 3], [1800, 0], [2400, 0], [1800, 7]], 4, 2880],\n   [3, 1400, False]),\n  ('boundary control 4', [[[3000, 0], [1000, 2], [3000, 0], [3000, 0]], 3, 2880], [3, 3000, True]),\n  ('normal control 5', [[[2400, 5], [3300, 0], [0, 0], [0, 3], [1800, 0], [2881, 5], [2400, 7]], 3, 2880],\n   [3, 1700, False]),\n  ('normal control 6',\n   [[[3000, 3], [2880, 0], [2881, 0], [3000, 0], [2400, 0], [2880, 0], [2881, 5], [2880, 0]], 3, 2880],\n   [3, 2920, True]),\n  ('normal control 7',\n   [[[3300, 0], [2400, 0], [3300, 3], [3300, 1], [2880, 0], [3000, 0], [1800, 0], [2881, 1]], 3, 2880],\n   [3, 2860, False]),\n  ('normal control 8', [[[2880, 0], [0, 0], [2881, 0], [2880, 5], [3000, 3], [2400, 0]], 5, 2880],\n   [4, 2040, False])],\n [('regression: partial week exclusion 1', [[[2400, 1], [3000, 5], [3300, 1]], 3, 2880], [0, 0, False]),\n  ('regression variant: partial week exclusion 2',\n   [[[3000, 5], [1800, 0], [1800, 0], [3300, 3], [2400, 0], [2880, 0], [2881, 7], [3000, 7], [2400, 0]], 5,\n    2880],\n   [5, 2256, False]),\n  ('partial repair guard 3', [[[2400, 5], [3000, 1], [2400, 5]], 5, 2880], [0, 0, False]),\n  ('boundary control 4', [[[3000, 0], [0, 7], [2800, 0], [2900, 0]], 3, 2880], [3, 2900, True]),\n  ('boundary control 5', [[[3000, 0], [1000, 2], [3000, 0], [3000, 0]], 3, 2880], [3, 3000, True]),\n  ('normal control 6',\n   [[[2400, 0], [2881, 3], [3000, 5], [2400, 0], [0, 7], [2400, 1], [2881, 0], [2880, 5]], 3, 2880],\n   [3, 2560, False]),\n  ('normal control 7', [[[1800, 7], [2880, 1], [0, 0]], 3, 2880], [1, 0, False]),\n  ('normal control 8',\n   [[[3300, 0], [2400, 0], [3300, 3], [3300, 1], [2880, 0], [3000, 0], [1800, 0], [2881, 1]], 3, 2880],\n   [3, 2860, False])],\n [('regression: partial week exclusion 1',\n   [[[2400, 5], [3300, 0], [0, 0], [0, 3], [1800, 0], [2881, 5], [2400, 7]], 3, 2880], [3, 1700, False]),\n  ('regression variant: partial week exclusion 2',\n   [[[2880, 1], [3300, 0], [3000, 0], [2400, 1], [2400, 5], [2881, 3], [2881, 1], [1800, 0], [2880, 0]], 4,\n    2880],\n   [4, 2745, False]),\n  ('partial repair guard 3',\n   [[[3000, 1], [2400, 0], [1800, 1], [3300, 5], [1800, 5], [2881, 1], [1800, 1]], 3, 2880],\n   [1, 2400, False]),\n  ('boundary control 4', [[[2880, 0], [2880, 0], [2880, 0]], 3, 2880], [3, 2880, False]),\n  ('boundary control 5', [[[3000, 0], [0, 7], [2800, 0], [2900, 0]], 3, 2880], [3, 2900, True]),\n  ('normal control 6', [[[0, 5], [2881, 3], [2881, 1], [1800, 7], [1800, 1], [2880, 3], [3000, 1]], 5, 2880],\n   [0, 0, False]),\n  ('normal control 7', [[[0, 5], [0, 0], [1800, 7]], 4, 2880], [1, 0, False]),\n  ('normal control 8', [[[2881, 0], [1800, 5], [2880, 0], [0, 0], [1800, 0]], 4, 2880], [4, 1890, False])],\n [('regression: partial week exclusion 1', [[[2881, 3], [3300, 3], [3000, 0], [3000, 3], [2400, 7]], 4, 2880],\n   [1, 3000, True]),\n  ('regression variant: partial week exclusion 2',\n   [[[2400, 7], [3000, 7], [3300, 0], [2881, 7], [2400, 3], [2881, 1], [1800, 3], [1800, 7], [2881, 7]], 3,\n    2880],\n   [1, 3300, True]),\n  ('partial repair guard 3',\n   [[[2880, 1], [3300, 0], [3000, 0], [2400, 1], [2400, 5], [2881, 3], [2881, 1], [1800, 0], [2880, 0]], 4,\n    2880],\n   [4, 2745, False]),\n  ('boundary control 4', [[[2000, 1], [3000, 0]], 3, 2880], [1, 3000, True]),\n  ('boundary control 5', [[[2880, 0], [2880, 0], [2880, 0]], 3, 2880], [3, 2880, False]),\n  ('normal control 6', [[[2880, 7], [3000, 0], [2400, 0], [1800, 0], [1800, 7]], 4, 2880], [3, 2400, False]),\n  ('normal control 7', [[[3300, 5], [2881, 5], [0, 0], [0, 3]], 4, 2880], [1, 0, False]),\n  ('normal control 8', [[[2400, 5], [3300, 5], [2881, 0], [0, 5], [0, 0], [3300, 3], [2400, 7]], 5, 2880],\n   [2, 1440, False])]]\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 toy labor rule for a bounded roster model; it is not legal advice and does not claim conformance with any jurisdiction, award, or collective agreement. 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-shift-rostering-labor-rules-reference-period-average-hours-partial-week-exclusion","generated_at":"2026-09-29T14:52:02.757329+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Averaged weekly-hours limits require excluding leave weeks and extending the reference period.","repair":"Exclude any week containing an excluded day.","root_cause":"Only fully absent weeks are excluded.","sha256":"0ee72d789f5a9e8e75cf3da95cde8425f937b58666729062e029cf74242c8741","title":"Weeks with partial leave kept in the reference period · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":42.631,"exit_code":1,"observations":[{"actual":[3,2333,false],"check":"regression: partial week exclusion 1","expected":[3,3000,true],"passed":false},{"actual":[2,3150,true],"check":"regression variant: partial week exclusion 2","expected":[1,3000,true],"passed":false},{"actual":[3,2200,false],"check":"partial repair guard 3","expected":[3,2800,false],"passed":false},{"actual":[2,2500,false],"check":"boundary control 4","expected":[1,3000,true],"passed":false},{"actual":[3,2880,false],"check":"boundary control 5","expected":[3,2880,false],"passed":true},{"actual":[4,2070,false],"check":"normal control 6","expected":[4,2070,false],"passed":true},{"actual":[3,2060,false],"check":"normal control 7","expected":[2,3090,true],"passed":false},{"actual":[2,2640,false],"check":"normal control 8","expected":[2,2640,false],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: partial week exclusion 1\", \"actual\": [3, 2333, false], \"expected\": [3, 3000, true], \"passed\": false}, {\"check\": \"regression variant: partial week exclusion 2\", \"actual\": [2, 3150, true], \"expected\": [1, 3000, true], \"passed\": false}, {\"check\": \"partial repair guard 3\", \"actual\": [3, 2200, false], \"expected\": [3, 2800, false], \"passed\": false}, {\"check\": \"boundary control 4\", \"actual\": [2, 2500, false], \"expected\": [1, 3000, true], \"passed\": false}, {\"check\": \"boundary control 5\", \"actual\": [3, 2880, false], \"expected\": [3, 2880, false], \"passed\": true}, {\"check\": \"normal control 6\", \"actual\": [4, 2070, false], \"expected\": [4, 2070, false], \"passed\": true}, {\"check\": \"normal control 7\", \"actual\": [3, 2060, false], \"expected\": [2, 3090, true], \"passed\": false}, {\"check\": \"normal control 8\", \"actual\": [2, 2640, false], \"expected\": [2, 2640, false], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.964,"exit_code":1,"observations":[{"actual":[3,2333,false],"check":"regression: partial week exclusion 1","expected":[3,3000,true],"passed":false},{"actual":[4,2700,false],"check":"regression variant: partial week exclusion 2","expected":[1,3000,true],"passed":false},{"actual":[3,3200,true],"check":"partial repair guard 3","expected":[3,2800,false],"passed":false},{"actual":[2,2500,false],"check":"boundary control 4","expected":[1,3000,true],"passed":false},{"actual":[3,2880,false],"check":"boundary control 5","expected":[3,2880,false],"passed":true},{"actual":[4,2190,false],"check":"normal control 6","expected":[4,2070,false],"passed":false},{"actual":[3,2060,false],"check":"normal control 7","expected":[2,3090,true],"passed":false},{"actual":[4,2745,false],"check":"normal control 8","expected":[2,2640,false],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: partial week exclusion 1\", \"actual\": [3, 2333, false], \"expected\": [3, 3000, true], \"passed\": false}, {\"check\": \"regression variant: partial week exclusion 2\", \"actual\": [4, 2700, false], \"expected\": [1, 3000, true], \"passed\": false}, {\"check\": \"partial repair guard 3\", \"actual\": [3, 3200, true], \"expected\": [3, 2800, false], \"passed\": false}, {\"check\": \"boundary control 4\", \"actual\": [2, 2500, false], \"expected\": [1, 3000, true], \"passed\": false}, {\"check\": \"boundary control 5\", \"actual\": [3, 2880, false], \"expected\": [3, 2880, false], \"passed\": true}, {\"check\": \"normal control 6\", \"actual\": [4, 2190, false], \"expected\": [4, 2070, false], \"passed\": false}, {\"check\": \"normal control 7\", \"actual\": [3, 2060, false], \"expected\": [2, 3090, true], \"passed\": false}, {\"check\": \"normal control 8\", \"actual\": [4, 2745, false], \"expected\": [2, 2640, false], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":42.447,"exit_code":0,"observations":[{"actual":[3,3000,true],"check":"regression: partial week exclusion 1","expected":[3,3000,true],"passed":true},{"actual":[1,3000,true],"check":"regression variant: partial week exclusion 2","expected":[1,3000,true],"passed":true},{"actual":[3,2800,false],"check":"partial repair guard 3","expected":[3,2800,false],"passed":true},{"actual":[1,3000,true],"check":"boundary control 4","expected":[1,3000,true],"passed":true},{"actual":[3,2880,false],"check":"boundary control 5","expected":[3,2880,false],"passed":true},{"actual":[4,2070,false],"check":"normal control 6","expected":[4,2070,false],"passed":true},{"actual":[2,3090,true],"check":"normal control 7","expected":[2,3090,true],"passed":true},{"actual":[2,2640,false],"check":"normal control 8","expected":[2,2640,false],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: partial week exclusion 1\", \"actual\": [3, 3000, true], \"expected\": [3, 3000, true], \"passed\": true}, {\"check\": \"regression variant: partial week exclusion 2\", \"actual\": [1, 3000, true], \"expected\": [1, 3000, true], \"passed\": true}, {\"check\": \"partial repair guard 3\", \"actual\": [3, 2800, false], \"expected\": [3, 2800, false], \"passed\": true}, {\"check\": \"boundary control 4\", \"actual\": [1, 3000, true], \"expected\": [1, 3000, true], \"passed\": true}, {\"check\": \"boundary control 5\", \"actual\": [3, 2880, false], \"expected\": [3, 2880, false], \"passed\": true}, {\"check\": \"normal control 6\", \"actual\": [4, 2070, false], \"expected\": [4, 2070, false], \"passed\": true}, {\"check\": \"normal control 7\", \"actual\": [2, 3090, true], \"expected\": [2, 3090, true], \"passed\": true}, {\"check\": \"normal control 8\", \"actual\": [2, 2640, false], \"expected\": [2, 2640, false], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}