{"abstract":"Taking leave lowers the average, hiding excessive hours in other weeks.","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":"Pro-rating leave weeks still includes them in the reference period.","family":"w2-shift-rostering-labor-rules-reference-period-average-hours-excluded-week-as-zero","id":"FA-94251","implementations":{"attempt":{"sha256":"9641c2905e8a6f5215291ed9117652fd4e63c8dca8aec563abc938dc899d8d7d","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        counted.append(m * (7 - ex) // 7)\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: excluded week as zero 1', [[[3000, 0], [0, 7], [2800, 0], [2900, 0]], 3, 2880],\n   [3, 2900, True]),\n  ('regression variant: excluded week as zero 2',\n   [[[0, 1], [0, 3], [3300, 0], [3000, 5], [2880, 0], [3300, 3], [3300, 1]], 3, 2880], [2, 3090, True]),\n  ('partial repair guard 3', [[[2881, 0], [2880, 3], [3000, 3], [1800, 1], [0, 7], [1800, 0]], 4, 2880],\n   [2, 2340, 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', [[[1800, 1], [2881, 3], [3000, 0]], 3, 2880], [1, 3000, True]),\n  ('normal control 7',\n   [[[2881, 5], [3000, 7], [3300, 0], [3000, 0], [2880, 3], [3300, 7], [2880, 0]], 5, 2880],\n   [3, 3060, True]),\n  ('normal control 8',\n   [[[3300, 1], [3300, 7], [2400, 7], [3000, 0], [1800, 0], [1800, 7], [2881, 1]], 3, 2880],\n   [2, 2400, False])],\n [('regression: excluded week as zero 1', [[[3000, 0], [1000, 2], [3000, 0], [3000, 0]], 3, 2880],\n   [3, 3000, True]),\n  ('regression variant: excluded week as zero 2', [[[0, 0], [2400, 0], [0, 1], [2881, 3]], 5, 2880],\n   [2, 1200, False]),\n  ('partial repair guard 3',\n   [[[3000, 7], [3000, 5], [2400, 5], [2400, 5], [2881, 7], [2880, 7], [3000, 0], [3300, 3]], 4, 2880],\n   [1, 3000, True]),\n  ('boundary control 4', [[[2000, 1], [3000, 0]], 3, 2880], [1, 3000, True]),\n  ('normal control 5', [[[2400, 5], [3300, 5], [2881, 0], [0, 5], [0, 0], [3300, 3], [2400, 7]], 5, 2880],\n   [2, 1440, False]),\n  ('normal control 6',\n   [[[3300, 0], [2881, 5], [2881, 3], [2400, 5], [3000, 0], [1800, 7], [0, 0], [0, 0]], 5, 2880],\n   [4, 1575, False]),\n  ('normal control 7',\n   [[[0, 1], [0, 0], [2881, 5], [2880, 1], [2880, 3], [3300, 5], [3300, 3], [1800, 7], [3000, 5]], 3, 2880],\n   [1, 0, False]),\n  ('normal control 8', [[[3300, 5], [2881, 0], [3300, 5], [0, 5], [3300, 0], [0, 5], [2400, 0]], 5, 2880],\n   [3, 2860, False])],\n [('regression: excluded week as zero 1', [[[2000, 1], [3000, 0]], 3, 2880], [1, 3000, True]),\n  ('regression variant: excluded week as zero 2',\n   [[[3300, 5], [2400, 5], [2400, 0], [2881, 5], [3000, 7], [2881, 0]], 4, 2880], [2, 2640, False]),\n  ('partial repair guard 3', [[[1800, 1], [2881, 3], [3000, 0]], 3, 2880], [1, 3000, True]),\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', [[[0, 0], [1800, 0], [3000, 7], [3300, 0], [3000, 5], [2400, 0], [2880, 0]], 4, 2880],\n   [4, 1875, False]),\n  ('normal control 7', [[[1800, 3], [0, 0], [0, 5], [2880, 3], [2880, 1], [2400, 5], [1800, 3]], 4, 2880],\n   [1, 0, False]),\n  ('normal control 8', [[[2881, 7], [2880, 0], [2400, 3], [2880, 3]], 3, 2880], [1, 2880, False])],\n [('regression: excluded week as zero 1', [[[2400, 1], [3000, 5], [3300, 1]], 3, 2880], [0, 0, False]),\n  ('regression variant: excluded week as zero 2',\n   [[[2400, 0], [2880, 0], [2881, 3], [3000, 1], [1800, 0], [2400, 0]], 5, 2880], [4, 2370, False]),\n  ('partial repair guard 3', [[[0, 0], [2881, 3], [2881, 7], [3000, 0], [2880, 5], [0, 0]], 5, 2880],\n   [3, 1000, 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', [[[3300, 7], [1800, 7], [3000, 5], [2881, 3], [3300, 5]], 4, 2880], [0, 0, False]),\n  ('normal control 7', [[[2880, 3], [0, 0], [2400, 1], [2880, 7], [2881, 5], [3300, 0], [3300, 1]], 3, 2880],\n   [2, 1650, False]),\n  ('normal control 8',\n   [[[2880, 7], [3000, 7], [1800, 0], [0, 5], [2880, 7], [1800, 5], [3300, 0], [1800, 0]], 5, 2880],\n   [3, 2300, False])],\n [('regression: excluded week as zero 1',\n   [[[2400, 5], [3300, 0], [0, 0], [0, 3], [1800, 0], [2881, 5], [2400, 7]], 3, 2880], [3, 1700, False]),\n  ('regression variant: excluded week as zero 2',\n   [[[2881, 0], [1800, 0], [2400, 5], [3300, 7], [3300, 3], [3300, 0], [1800, 0]], 3, 2880],\n   [3, 2660, False]),\n  ('partial repair guard 3',\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  ('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', [[[2400, 0], [0, 0], [3300, 7], [3000, 3]], 4, 2880], [2, 1200, False]),\n  ('normal control 7', [[[1800, 0], [0, 0], [1800, 0], [0, 1], [2881, 1], [3300, 0], [3000, 0]], 4, 2880],\n   [4, 1725, False]),\n  ('normal control 8', [[[2400, 1], [2881, 7], [3000, 5], [0, 0], [2881, 3], [3300, 3]], 3, 2880],\n   [1, 0, 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":"cdd649c4cc6e74ed7ab006ad23d4e065a5d574b5b239bb43f7ef5bd0ace91ff7","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        counted.append(m if ex == 0 else 0)\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: excluded week as zero 1', [[[3000, 0], [0, 7], [2800, 0], [2900, 0]], 3, 2880],\n   [3, 2900, True]),\n  ('regression variant: excluded week as zero 2',\n   [[[0, 1], [0, 3], [3300, 0], [3000, 5], [2880, 0], [3300, 3], [3300, 1]], 3, 2880], [2, 3090, True]),\n  ('partial repair guard 3', [[[2881, 0], [2880, 3], [3000, 3], [1800, 1], [0, 7], [1800, 0]], 4, 2880],\n   [2, 2340, 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', [[[1800, 1], [2881, 3], [3000, 0]], 3, 2880], [1, 3000, True]),\n  ('normal control 7',\n   [[[2881, 5], [3000, 7], [3300, 0], [3000, 0], [2880, 3], [3300, 7], [2880, 0]], 5, 2880],\n   [3, 3060, True]),\n  ('normal control 8',\n   [[[3300, 1], [3300, 7], [2400, 7], [3000, 0], [1800, 0], [1800, 7], [2881, 1]], 3, 2880],\n   [2, 2400, False])],\n [('regression: excluded week as zero 1', [[[3000, 0], [1000, 2], [3000, 0], [3000, 0]], 3, 2880],\n   [3, 3000, True]),\n  ('regression variant: excluded week as zero 2', [[[0, 0], [2400, 0], [0, 1], [2881, 3]], 5, 2880],\n   [2, 1200, False]),\n  ('partial repair guard 3',\n   [[[3000, 7], [3000, 5], [2400, 5], [2400, 5], [2881, 7], [2880, 7], [3000, 0], [3300, 3]], 4, 2880],\n   [1, 3000, True]),\n  ('boundary control 4', [[[2000, 1], [3000, 0]], 3, 2880], [1, 3000, True]),\n  ('normal control 5', [[[2400, 5], [3300, 5], [2881, 0], [0, 5], [0, 0], [3300, 3], [2400, 7]], 5, 2880],\n   [2, 1440, False]),\n  ('normal control 6',\n   [[[3300, 0], [2881, 5], [2881, 3], [2400, 5], [3000, 0], [1800, 7], [0, 0], [0, 0]], 5, 2880],\n   [4, 1575, False]),\n  ('normal control 7',\n   [[[0, 1], [0, 0], [2881, 5], [2880, 1], [2880, 3], [3300, 5], [3300, 3], [1800, 7], [3000, 5]], 3, 2880],\n   [1, 0, False]),\n  ('normal control 8', [[[3300, 5], [2881, 0], [3300, 5], [0, 5], [3300, 0], [0, 5], [2400, 0]], 5, 2880],\n   [3, 2860, False])],\n [('regression: excluded week as zero 1', [[[2000, 1], [3000, 0]], 3, 2880], [1, 3000, True]),\n  ('regression variant: excluded week as zero 2',\n   [[[3300, 5], [2400, 5], [2400, 0], [2881, 5], [3000, 7], [2881, 0]], 4, 2880], [2, 2640, False]),\n  ('partial repair guard 3', [[[1800, 1], [2881, 3], [3000, 0]], 3, 2880], [1, 3000, True]),\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', [[[0, 0], [1800, 0], [3000, 7], [3300, 0], [3000, 5], [2400, 0], [2880, 0]], 4, 2880],\n   [4, 1875, False]),\n  ('normal control 7', [[[1800, 3], [0, 0], [0, 5], [2880, 3], [2880, 1], [2400, 5], [1800, 3]], 4, 2880],\n   [1, 0, False]),\n  ('normal control 8', [[[2881, 7], [2880, 0], [2400, 3], [2880, 3]], 3, 2880], [1, 2880, False])],\n [('regression: excluded week as zero 1', [[[2400, 1], [3000, 5], [3300, 1]], 3, 2880], [0, 0, False]),\n  ('regression variant: excluded week as zero 2',\n   [[[2400, 0], [2880, 0], [2881, 3], [3000, 1], [1800, 0], [2400, 0]], 5, 2880], [4, 2370, False]),\n  ('partial repair guard 3', [[[0, 0], [2881, 3], [2881, 7], [3000, 0], [2880, 5], [0, 0]], 5, 2880],\n   [3, 1000, 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', [[[3300, 7], [1800, 7], [3000, 5], [2881, 3], [3300, 5]], 4, 2880], [0, 0, False]),\n  ('normal control 7', [[[2880, 3], [0, 0], [2400, 1], [2880, 7], [2881, 5], [3300, 0], [3300, 1]], 3, 2880],\n   [2, 1650, False]),\n  ('normal control 8',\n   [[[2880, 7], [3000, 7], [1800, 0], [0, 5], [2880, 7], [1800, 5], [3300, 0], [1800, 0]], 5, 2880],\n   [3, 2300, False])],\n [('regression: excluded week as zero 1',\n   [[[2400, 5], [3300, 0], [0, 0], [0, 3], [1800, 0], [2881, 5], [2400, 7]], 3, 2880], [3, 1700, False]),\n  ('regression variant: excluded week as zero 2',\n   [[[2881, 0], [1800, 0], [2400, 5], [3300, 7], [3300, 3], [3300, 0], [1800, 0]], 3, 2880],\n   [3, 2660, False]),\n  ('partial repair guard 3',\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  ('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', [[[2400, 0], [0, 0], [3300, 7], [3000, 3]], 4, 2880], [2, 1200, False]),\n  ('normal control 7', [[[1800, 0], [0, 0], [1800, 0], [0, 1], [2881, 1], [3300, 0], [3000, 0]], 4, 2880],\n   [4, 1725, False]),\n  ('normal control 8', [[[2400, 1], [2881, 7], [3000, 5], [0, 0], [2881, 3], [3300, 3]], 3, 2880],\n   [1, 0, 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":"69bf3508bd0afb36190ee5855ebcda751dd930ea967e868aea6ca61b0d2cd961","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: excluded week as zero 1', [[[3000, 0], [0, 7], [2800, 0], [2900, 0]], 3, 2880],\n   [3, 2900, True]),\n  ('regression variant: excluded week as zero 2',\n   [[[0, 1], [0, 3], [3300, 0], [3000, 5], [2880, 0], [3300, 3], [3300, 1]], 3, 2880], [2, 3090, True]),\n  ('partial repair guard 3', [[[2881, 0], [2880, 3], [3000, 3], [1800, 1], [0, 7], [1800, 0]], 4, 2880],\n   [2, 2340, 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', [[[1800, 1], [2881, 3], [3000, 0]], 3, 2880], [1, 3000, True]),\n  ('normal control 7',\n   [[[2881, 5], [3000, 7], [3300, 0], [3000, 0], [2880, 3], [3300, 7], [2880, 0]], 5, 2880],\n   [3, 3060, True]),\n  ('normal control 8',\n   [[[3300, 1], [3300, 7], [2400, 7], [3000, 0], [1800, 0], [1800, 7], [2881, 1]], 3, 2880],\n   [2, 2400, False])],\n [('regression: excluded week as zero 1', [[[3000, 0], [1000, 2], [3000, 0], [3000, 0]], 3, 2880],\n   [3, 3000, True]),\n  ('regression variant: excluded week as zero 2', [[[0, 0], [2400, 0], [0, 1], [2881, 3]], 5, 2880],\n   [2, 1200, False]),\n  ('partial repair guard 3',\n   [[[3000, 7], [3000, 5], [2400, 5], [2400, 5], [2881, 7], [2880, 7], [3000, 0], [3300, 3]], 4, 2880],\n   [1, 3000, True]),\n  ('boundary control 4', [[[2000, 1], [3000, 0]], 3, 2880], [1, 3000, True]),\n  ('normal control 5', [[[2400, 5], [3300, 5], [2881, 0], [0, 5], [0, 0], [3300, 3], [2400, 7]], 5, 2880],\n   [2, 1440, False]),\n  ('normal control 6',\n   [[[3300, 0], [2881, 5], [2881, 3], [2400, 5], [3000, 0], [1800, 7], [0, 0], [0, 0]], 5, 2880],\n   [4, 1575, False]),\n  ('normal control 7',\n   [[[0, 1], [0, 0], [2881, 5], [2880, 1], [2880, 3], [3300, 5], [3300, 3], [1800, 7], [3000, 5]], 3, 2880],\n   [1, 0, False]),\n  ('normal control 8', [[[3300, 5], [2881, 0], [3300, 5], [0, 5], [3300, 0], [0, 5], [2400, 0]], 5, 2880],\n   [3, 2860, False])],\n [('regression: excluded week as zero 1', [[[2000, 1], [3000, 0]], 3, 2880], [1, 3000, True]),\n  ('regression variant: excluded week as zero 2',\n   [[[3300, 5], [2400, 5], [2400, 0], [2881, 5], [3000, 7], [2881, 0]], 4, 2880], [2, 2640, False]),\n  ('partial repair guard 3', [[[1800, 1], [2881, 3], [3000, 0]], 3, 2880], [1, 3000, True]),\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', [[[0, 0], [1800, 0], [3000, 7], [3300, 0], [3000, 5], [2400, 0], [2880, 0]], 4, 2880],\n   [4, 1875, False]),\n  ('normal control 7', [[[1800, 3], [0, 0], [0, 5], [2880, 3], [2880, 1], [2400, 5], [1800, 3]], 4, 2880],\n   [1, 0, False]),\n  ('normal control 8', [[[2881, 7], [2880, 0], [2400, 3], [2880, 3]], 3, 2880], [1, 2880, False])],\n [('regression: excluded week as zero 1', [[[2400, 1], [3000, 5], [3300, 1]], 3, 2880], [0, 0, False]),\n  ('regression variant: excluded week as zero 2',\n   [[[2400, 0], [2880, 0], [2881, 3], [3000, 1], [1800, 0], [2400, 0]], 5, 2880], [4, 2370, False]),\n  ('partial repair guard 3', [[[0, 0], [2881, 3], [2881, 7], [3000, 0], [2880, 5], [0, 0]], 5, 2880],\n   [3, 1000, 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', [[[3300, 7], [1800, 7], [3000, 5], [2881, 3], [3300, 5]], 4, 2880], [0, 0, False]),\n  ('normal control 7', [[[2880, 3], [0, 0], [2400, 1], [2880, 7], [2881, 5], [3300, 0], [3300, 1]], 3, 2880],\n   [2, 1650, False]),\n  ('normal control 8',\n   [[[2880, 7], [3000, 7], [1800, 0], [0, 5], [2880, 7], [1800, 5], [3300, 0], [1800, 0]], 5, 2880],\n   [3, 2300, False])],\n [('regression: excluded week as zero 1',\n   [[[2400, 5], [3300, 0], [0, 0], [0, 3], [1800, 0], [2881, 5], [2400, 7]], 3, 2880], [3, 1700, False]),\n  ('regression variant: excluded week as zero 2',\n   [[[2881, 0], [1800, 0], [2400, 5], [3300, 7], [3300, 3], [3300, 0], [1800, 0]], 3, 2880],\n   [3, 2660, False]),\n  ('partial repair guard 3',\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  ('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', [[[2400, 0], [0, 0], [3300, 7], [3000, 3]], 4, 2880], [2, 1200, False]),\n  ('normal control 7', [[[1800, 0], [0, 0], [1800, 0], [0, 1], [2881, 1], [3300, 0], [3000, 0]], 4, 2880],\n   [4, 1725, False]),\n  ('normal control 8', [[[2400, 1], [2881, 7], [3000, 5], [0, 0], [2881, 3], [3300, 3]], 3, 2880],\n   [1, 0, 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-excluded-week-as-zero","generated_at":"2026-09-29T14:52:02.623556+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":"Skip weeks with any excluded day and extend the period.","root_cause":"Weeks with excluded days are counted as zero instead of being skipped.","sha256":"0422c2580a3f90eddeeb3ed2ae043f81863ca600b326219b969a3b1a5fb98988","title":"Leave weeks averaged in as zero-hour weeks · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":45.254,"exit_code":1,"observations":[{"actual":[3,1933,false],"check":"regression: excluded week as zero 1","expected":[3,2900,true],"passed":false},{"actual":[3,1100,false],"check":"regression variant: excluded week as zero 2","expected":[2,3090,true],"passed":false},{"actual":[4,1945,false],"check":"partial repair guard 3","expected":[2,2340,false],"passed":false},{"actual":[2,2357,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":[3,2062,false],"check":"normal control 6","expected":[1,3000,true],"passed":false},{"actual":[5,1753,false],"check":"normal control 7","expected":[3,3060,true],"passed":false},{"actual":[3,942,false],"check":"normal control 8","expected":[2,2400,false],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: excluded week as zero 1\", \"actual\": [3, 1933, false], \"expected\": [3, 2900, true], \"passed\": false}, {\"check\": \"regression variant: excluded week as zero 2\", \"actual\": [3, 1100, false], \"expected\": [2, 3090, true], \"passed\": false}, {\"check\": \"partial repair guard 3\", \"actual\": [4, 1945, false], \"expected\": [2, 2340, false], \"passed\": false}, {\"check\": \"boundary control 4\", \"actual\": [2, 2357, 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\": [3, 2062, false], \"expected\": [1, 3000, true], \"passed\": false}, {\"check\": \"normal control 7\", \"actual\": [5, 1753, false], \"expected\": [3, 3060, true], \"passed\": false}, {\"check\": \"normal control 8\", \"actual\": [3, 942, false], \"expected\": [2, 2400, false], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.223,"exit_code":1,"observations":[{"actual":[3,1933,false],"check":"regression: excluded week as zero 1","expected":[3,2900,true],"passed":false},{"actual":[3,1100,false],"check":"regression variant: excluded week as zero 2","expected":[2,3090,true],"passed":false},{"actual":[4,720,false],"check":"partial repair guard 3","expected":[2,2340,false],"passed":false},{"actual":[2,1500,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":[3,1000,false],"check":"normal control 6","expected":[1,3000,true],"passed":false},{"actual":[5,1260,false],"check":"normal control 7","expected":[3,3060,true],"passed":false},{"actual":[3,0,false],"check":"normal control 8","expected":[2,2400,false],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: excluded week as zero 1\", \"actual\": [3, 1933, false], \"expected\": [3, 2900, true], \"passed\": false}, {\"check\": \"regression variant: excluded week as zero 2\", \"actual\": [3, 1100, false], \"expected\": [2, 3090, true], \"passed\": false}, {\"check\": \"partial repair guard 3\", \"actual\": [4, 720, false], \"expected\": [2, 2340, false], \"passed\": false}, {\"check\": \"boundary control 4\", \"actual\": [2, 1500, 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\": [3, 1000, false], \"expected\": [1, 3000, true], \"passed\": false}, {\"check\": \"normal control 7\", \"actual\": [5, 1260, false], \"expected\": [3, 3060, true], \"passed\": false}, {\"check\": \"normal control 8\", \"actual\": [3, 0, false], \"expected\": [2, 2400, false], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":41.656,"exit_code":0,"observations":[{"actual":[3,2900,true],"check":"regression: excluded week as zero 1","expected":[3,2900,true],"passed":true},{"actual":[2,3090,true],"check":"regression variant: excluded week as zero 2","expected":[2,3090,true],"passed":true},{"actual":[2,2340,false],"check":"partial repair guard 3","expected":[2,2340,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":[1,3000,true],"check":"normal control 6","expected":[1,3000,true],"passed":true},{"actual":[3,3060,true],"check":"normal control 7","expected":[3,3060,true],"passed":true},{"actual":[2,2400,false],"check":"normal control 8","expected":[2,2400,false],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: excluded week as zero 1\", \"actual\": [3, 2900, true], \"expected\": [3, 2900, true], \"passed\": true}, {\"check\": \"regression variant: excluded week as zero 2\", \"actual\": [2, 3090, true], \"expected\": [2, 3090, true], \"passed\": true}, {\"check\": \"partial repair guard 3\", \"actual\": [2, 2340, false], \"expected\": [2, 2340, 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\": [1, 3000, true], \"expected\": [1, 3000, true], \"passed\": true}, {\"check\": \"normal control 7\", \"actual\": [3, 3060, true], \"expected\": [3, 3060, true], \"passed\": true}, {\"check\": \"normal control 8\", \"actual\": [2, 2400, false], \"expected\": [2, 2400, false], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}