{"abstract":"Two short shifts on a school day exceed three hours without a finding.","category":"Shift rostering labor rules","checks":8,"contract":"Toy youth rule: age 16 or older has no restrictions. Otherwise each shift [day, start, end] must lie within 07:00-19:00 (start >= 420, end <= 1140); daily total minutes may not exceed 180 on a listed school day or 480 otherwise; the weekly total may not exceed 1080 if the week has any school day, else 2400. Return window violations in shift order, then daily caps by day, then the weekly cap as [\"weekly_cap\", -1].","evaluation_group":"w2-shift-rostering-labor-rules-youth-worker-hour-limits","failed_approach":"Keeping the longest shift still ignores split days.","family":"w2-shift-rostering-labor-rules-youth-worker-hour-limits-daily-total-aggregation","id":"FA-94066","implementations":{"attempt":{"sha256":"8d7bd1a27b17345218def06ecdf6bc5e6222c632e18ef891b4a0879d25ec97c5","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(age, shifts, school_days):\n    if age >= 16:\n        return []\n    out = []\n    per = {}\n    for d, st, en in shifts:\n        per[d] = max(per.get(d, 0), en - st)\n        if st < 420 or en > 1140:\n            out.append(['hours_window', d])\n    for d in sorted(per):\n        cap = 180 if d in school_days else 480\n        if per[d] > cap:\n            out.append(['daily_cap', d])\n    week_cap = 1080 if school_days else 2400\n    if sum(per.values()) > week_cap:\n        out.append(['weekly_cap', -1])\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: daily total aggregation 1', [15, [[1, 900, 1000], [1, 1020, 1120]], [1]], [['daily_cap', 1]]),\n  ('regression variant: daily total aggregation 2',\n   [15, [[0, 1020, 1200], [3, 1020, 1200], [1, 360, 540], [1, 420, 480], [4, 419, 599], [1, 900, 960]],\n    [0, 1, 2, 3, 6]],\n   [['hours_window', 0], ['hours_window', 3], ['hours_window', 1], ['hours_window', 4], ['daily_cap', 1]]),\n  ('partial repair guard 3',\n   [15, [[1, 419, 599], [5, 1020, 1320], [1, 480, 720], [5, 420, 480], [2, 360, 600], [1, 1020, 1201]],\n    [0, 3, 4, 5, 6]],\n   [['hours_window', 1], ['hours_window', 5], ['hours_window', 2], ['hours_window', 1], ['daily_cap', 1],\n    ['daily_cap', 5], ['weekly_cap', -1]]),\n  ('boundary control 4', [15, [[5, 960, 1141]], []], [['hours_window', 5]]),\n  ('boundary control 5', [15, [[0, 900, 1081]], [0, 1, 2, 3, 4]], [['daily_cap', 0]]),\n  ('normal control 6', [15, [[1, 900, 1200]], []], [['hours_window', 1]]),\n  ('normal control 7',\n   [15, [[3, 900, 1200], [1, 1020, 1201], [3, 900, 1081], [1, 419, 719], [4, 1080, 1261], [2, 960, 1020]],\n    [0, 2, 3, 4, 5]],\n   [['hours_window', 3], ['hours_window', 1], ['hours_window', 1], ['hours_window', 4], ['daily_cap', 1],\n    ['daily_cap', 3], ['daily_cap', 4], ['weekly_cap', -1]]),\n  ('normal control 8',\n   [17, [[3, 1080, 1200], [2, 900, 1200], [6, 420, 480], [3, 1080, 1380], [2, 960, 1200]], [0, 2, 4]], [])],\n [('regression: daily total aggregation 1',\n   [15, [[5, 1020, 1200], [5, 900, 960], [5, 360, 480], [5, 420, 600], [6, 360, 840], [0, 480, 660]], []],\n   [['hours_window', 5], ['hours_window', 5], ['hours_window', 6], ['daily_cap', 5]]),\n  ('regression variant: daily total aggregation 2',\n   [15, [[6, 480, 660], [5, 420, 600], [1, 480, 660], [1, 360, 480]], [1, 2, 3]],\n   [['hours_window', 1], ['daily_cap', 1]]),\n  ('partial repair guard 3',\n   [14, [[5, 480, 960], [0, 480, 960], [6, 960, 1200], [6, 960, 1260], [5, 900, 1020]], []],\n   [['hours_window', 6], ['hours_window', 6], ['daily_cap', 5], ['daily_cap', 6]]),\n  ('boundary control 4', [14, [[5, 480, 960], [6, 480, 960], [0, 900, 1080], [2, 900, 1080]], [0, 2]],\n   [['weekly_cap', -1]]),\n  ('boundary control 5', [16, [[0, 300, 1300]], [0]], []),\n  ('normal control 6',\n   [15, [[0, 1020, 1080], [6, 1020, 1260], [3, 1020, 1320], [6, 480, 660], [2, 480, 960]], []],\n   [['hours_window', 6], ['hours_window', 3]]),\n  ('normal control 7',\n   [17, [[1, 420, 601], [2, 1020, 1200], [0, 960, 1140], [0, 1080, 1320]], [0, 2, 3, 5, 6]], []),\n  ('normal control 8', [16, [[4, 420, 540], [1, 1080, 1320]], [0, 1, 2, 3, 6]], [])],\n [('regression: daily total aggregation 1', [14, [[1, 420, 601], [1, 960, 1260]], [0, 2, 3]],\n   [['hours_window', 1], ['daily_cap', 1]]),\n  ('regression variant: daily total aggregation 2',\n   [14, [[5, 1020, 1320], [2, 419, 659], [2, 1020, 1200], [3, 1020, 1260], [5, 1080, 1261], [6, 900, 960]],\n    [0, 3, 5, 6]],\n   [['hours_window', 5], ['hours_window', 2], ['hours_window', 2], ['hours_window', 3], ['hours_window', 5],\n    ['daily_cap', 3], ['daily_cap', 5], ['weekly_cap', -1]]),\n  ('partial repair guard 3',\n   [15, [[3, 419, 599], [3, 900, 1081], [2, 360, 660], [3, 360, 660], [2, 419, 719]], []],\n   [['hours_window', 3], ['hours_window', 2], ['hours_window', 3], ['hours_window', 2], ['daily_cap', 2],\n    ['daily_cap', 3]]),\n  ('boundary control 4', [15, [[5, 960, 1140]], []], []),\n  ('boundary control 5', [15, [[0, 900, 1080]], [0, 1, 2, 3, 4]], []),\n  ('normal control 6', [16, [[1, 480, 960], [1, 420, 660]], [0, 3, 5, 6]], []),\n  ('normal control 7', [17, [[2, 1080, 1260], [0, 419, 719]], [2, 4, 6]], []),\n  ('normal control 8', [15, [[3, 419, 599], [4, 360, 420]], [3, 4, 5]],\n   [['hours_window', 3], ['hours_window', 4]])],\n [('regression: daily total aggregation 1',\n   [15, [[6, 360, 541], [1, 900, 960], [5, 480, 600], [1, 420, 660], [4, 900, 1020], [1, 1020, 1140]],\n    [0, 1, 4, 5]],\n   [['hours_window', 6], ['daily_cap', 1]]),\n  ('regression variant: daily total aggregation 2',\n   [14, [[2, 360, 660], [6, 1080, 1380], [0, 1020, 1260], [2, 1080, 1200], [3, 420, 660], [5, 480, 661]],\n    [0, 1, 2, 3, 5]],\n   [['hours_window', 2], ['hours_window', 6], ['hours_window', 0], ['hours_window', 2], ['daily_cap', 0],\n    ['daily_cap', 2], ['daily_cap', 3], ['daily_cap', 5], ['weekly_cap', -1]]),\n  ('partial repair guard 3',\n   [14, [[5, 1020, 1320], [2, 419, 659], [2, 1020, 1200], [3, 1020, 1260], [5, 1080, 1261], [6, 900, 960]],\n    [0, 3, 5, 6]],\n   [['hours_window', 5], ['hours_window', 2], ['hours_window', 2], ['hours_window', 3], ['hours_window', 5],\n    ['daily_cap', 3], ['daily_cap', 5], ['weekly_cap', -1]]),\n  ('boundary control 4', [15, [[1, 900, 1000], [1, 1020, 1120]], [1]], [['daily_cap', 1]]),\n  ('boundary control 5', [15, [[5, 960, 1141]], []], [['hours_window', 5]]),\n  ('normal control 6', [17, [[3, 900, 960], [3, 1020, 1260]], [0, 1, 2, 4, 5]], []),\n  ('normal control 7', [16, [[4, 420, 540], [1, 1080, 1320]], [0, 1, 2, 3, 6]], []),\n  ('normal control 8', [16, [[3, 360, 541], [5, 1020, 1080], [0, 1080, 1260], [1, 420, 601]], []], [])],\n [('regression: daily total aggregation 1', [15, [[3, 960, 1141], [3, 1020, 1440]], [0, 2, 4, 5, 6]],\n   [['hours_window', 3], ['hours_window', 3], ['daily_cap', 3]]),\n  ('regression variant: daily total aggregation 2',\n   [14, [[6, 900, 960], [0, 1080, 1440], [5, 419, 659], [0, 1020, 1080]], [0, 1, 3]],\n   [['hours_window', 0], ['hours_window', 5], ['daily_cap', 0]]),\n  ('partial repair guard 3',\n   [15, [[1, 480, 660], [1, 1080, 1140], [1, 419, 479], [4, 1080, 1260]], [0, 1, 2, 5]],\n   [['hours_window', 1], ['hours_window', 4], ['daily_cap', 1]]),\n  ('boundary control 4', [15, [[0, 900, 1081]], [0, 1, 2, 3, 4]], [['daily_cap', 0]]),\n  ('boundary control 5', [14, [[5, 480, 960], [6, 480, 960], [0, 900, 1080], [2, 900, 1080]], [0, 2]],\n   [['weekly_cap', -1]]),\n  ('normal control 6', [14, [[2, 1080, 1380], [0, 420, 540], [6, 960, 1020]], [0, 1, 2, 3, 6]],\n   [['hours_window', 2], ['daily_cap', 2]]),\n  ('normal control 7',\n   [15, [[5, 1080, 1140], [6, 419, 719], [3, 1080, 1200], [6, 419, 479], [4, 1020, 1200]], [0, 1, 2, 4]],\n   [['hours_window', 6], ['hours_window', 3], ['hours_window', 6], ['hours_window', 4]]),\n  ('normal control 8', [17, [[5, 900, 1081], [5, 1020, 1200], [0, 1080, 1261], [3, 960, 1080]], []], [])]]\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":"2cb2f8e9f2e44f13c47e14e85ff01551a895916fe9696dc46d693d65c6c2ee6f","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(age, shifts, school_days):\n    if age >= 16:\n        return []\n    out = []\n    per = {}\n    for d, st, en in shifts:\n        per[d] = en - st\n        if st < 420 or en > 1140:\n            out.append(['hours_window', d])\n    for d in sorted(per):\n        cap = 180 if d in school_days else 480\n        if per[d] > cap:\n            out.append(['daily_cap', d])\n    week_cap = 1080 if school_days else 2400\n    if sum(per.values()) > week_cap:\n        out.append(['weekly_cap', -1])\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: daily total aggregation 1', [15, [[1, 900, 1000], [1, 1020, 1120]], [1]], [['daily_cap', 1]]),\n  ('regression variant: daily total aggregation 2',\n   [15, [[0, 1020, 1200], [3, 1020, 1200], [1, 360, 540], [1, 420, 480], [4, 419, 599], [1, 900, 960]],\n    [0, 1, 2, 3, 6]],\n   [['hours_window', 0], ['hours_window', 3], ['hours_window', 1], ['hours_window', 4], ['daily_cap', 1]]),\n  ('partial repair guard 3',\n   [15, [[1, 419, 599], [5, 1020, 1320], [1, 480, 720], [5, 420, 480], [2, 360, 600], [1, 1020, 1201]],\n    [0, 3, 4, 5, 6]],\n   [['hours_window', 1], ['hours_window', 5], ['hours_window', 2], ['hours_window', 1], ['daily_cap', 1],\n    ['daily_cap', 5], ['weekly_cap', -1]]),\n  ('boundary control 4', [15, [[5, 960, 1141]], []], [['hours_window', 5]]),\n  ('boundary control 5', [15, [[0, 900, 1081]], [0, 1, 2, 3, 4]], [['daily_cap', 0]]),\n  ('normal control 6', [15, [[1, 900, 1200]], []], [['hours_window', 1]]),\n  ('normal control 7',\n   [15, [[3, 900, 1200], [1, 1020, 1201], [3, 900, 1081], [1, 419, 719], [4, 1080, 1261], [2, 960, 1020]],\n    [0, 2, 3, 4, 5]],\n   [['hours_window', 3], ['hours_window', 1], ['hours_window', 1], ['hours_window', 4], ['daily_cap', 1],\n    ['daily_cap', 3], ['daily_cap', 4], ['weekly_cap', -1]]),\n  ('normal control 8',\n   [17, [[3, 1080, 1200], [2, 900, 1200], [6, 420, 480], [3, 1080, 1380], [2, 960, 1200]], [0, 2, 4]], [])],\n [('regression: daily total aggregation 1',\n   [15, [[5, 1020, 1200], [5, 900, 960], [5, 360, 480], [5, 420, 600], [6, 360, 840], [0, 480, 660]], []],\n   [['hours_window', 5], ['hours_window', 5], ['hours_window', 6], ['daily_cap', 5]]),\n  ('regression variant: daily total aggregation 2',\n   [15, [[6, 480, 660], [5, 420, 600], [1, 480, 660], [1, 360, 480]], [1, 2, 3]],\n   [['hours_window', 1], ['daily_cap', 1]]),\n  ('partial repair guard 3',\n   [14, [[5, 480, 960], [0, 480, 960], [6, 960, 1200], [6, 960, 1260], [5, 900, 1020]], []],\n   [['hours_window', 6], ['hours_window', 6], ['daily_cap', 5], ['daily_cap', 6]]),\n  ('boundary control 4', [14, [[5, 480, 960], [6, 480, 960], [0, 900, 1080], [2, 900, 1080]], [0, 2]],\n   [['weekly_cap', -1]]),\n  ('boundary control 5', [16, [[0, 300, 1300]], [0]], []),\n  ('normal control 6',\n   [15, [[0, 1020, 1080], [6, 1020, 1260], [3, 1020, 1320], [6, 480, 660], [2, 480, 960]], []],\n   [['hours_window', 6], ['hours_window', 3]]),\n  ('normal control 7',\n   [17, [[1, 420, 601], [2, 1020, 1200], [0, 960, 1140], [0, 1080, 1320]], [0, 2, 3, 5, 6]], []),\n  ('normal control 8', [16, [[4, 420, 540], [1, 1080, 1320]], [0, 1, 2, 3, 6]], [])],\n [('regression: daily total aggregation 1', [14, [[1, 420, 601], [1, 960, 1260]], [0, 2, 3]],\n   [['hours_window', 1], ['daily_cap', 1]]),\n  ('regression variant: daily total aggregation 2',\n   [14, [[5, 1020, 1320], [2, 419, 659], [2, 1020, 1200], [3, 1020, 1260], [5, 1080, 1261], [6, 900, 960]],\n    [0, 3, 5, 6]],\n   [['hours_window', 5], ['hours_window', 2], ['hours_window', 2], ['hours_window', 3], ['hours_window', 5],\n    ['daily_cap', 3], ['daily_cap', 5], ['weekly_cap', -1]]),\n  ('partial repair guard 3',\n   [15, [[3, 419, 599], [3, 900, 1081], [2, 360, 660], [3, 360, 660], [2, 419, 719]], []],\n   [['hours_window', 3], ['hours_window', 2], ['hours_window', 3], ['hours_window', 2], ['daily_cap', 2],\n    ['daily_cap', 3]]),\n  ('boundary control 4', [15, [[5, 960, 1140]], []], []),\n  ('boundary control 5', [15, [[0, 900, 1080]], [0, 1, 2, 3, 4]], []),\n  ('normal control 6', [16, [[1, 480, 960], [1, 420, 660]], [0, 3, 5, 6]], []),\n  ('normal control 7', [17, [[2, 1080, 1260], [0, 419, 719]], [2, 4, 6]], []),\n  ('normal control 8', [15, [[3, 419, 599], [4, 360, 420]], [3, 4, 5]],\n   [['hours_window', 3], ['hours_window', 4]])],\n [('regression: daily total aggregation 1',\n   [15, [[6, 360, 541], [1, 900, 960], [5, 480, 600], [1, 420, 660], [4, 900, 1020], [1, 1020, 1140]],\n    [0, 1, 4, 5]],\n   [['hours_window', 6], ['daily_cap', 1]]),\n  ('regression variant: daily total aggregation 2',\n   [14, [[2, 360, 660], [6, 1080, 1380], [0, 1020, 1260], [2, 1080, 1200], [3, 420, 660], [5, 480, 661]],\n    [0, 1, 2, 3, 5]],\n   [['hours_window', 2], ['hours_window', 6], ['hours_window', 0], ['hours_window', 2], ['daily_cap', 0],\n    ['daily_cap', 2], ['daily_cap', 3], ['daily_cap', 5], ['weekly_cap', -1]]),\n  ('partial repair guard 3',\n   [14, [[5, 1020, 1320], [2, 419, 659], [2, 1020, 1200], [3, 1020, 1260], [5, 1080, 1261], [6, 900, 960]],\n    [0, 3, 5, 6]],\n   [['hours_window', 5], ['hours_window', 2], ['hours_window', 2], ['hours_window', 3], ['hours_window', 5],\n    ['daily_cap', 3], ['daily_cap', 5], ['weekly_cap', -1]]),\n  ('boundary control 4', [15, [[1, 900, 1000], [1, 1020, 1120]], [1]], [['daily_cap', 1]]),\n  ('boundary control 5', [15, [[5, 960, 1141]], []], [['hours_window', 5]]),\n  ('normal control 6', [17, [[3, 900, 960], [3, 1020, 1260]], [0, 1, 2, 4, 5]], []),\n  ('normal control 7', [16, [[4, 420, 540], [1, 1080, 1320]], [0, 1, 2, 3, 6]], []),\n  ('normal control 8', [16, [[3, 360, 541], [5, 1020, 1080], [0, 1080, 1260], [1, 420, 601]], []], [])],\n [('regression: daily total aggregation 1', [15, [[3, 960, 1141], [3, 1020, 1440]], [0, 2, 4, 5, 6]],\n   [['hours_window', 3], ['hours_window', 3], ['daily_cap', 3]]),\n  ('regression variant: daily total aggregation 2',\n   [14, [[6, 900, 960], [0, 1080, 1440], [5, 419, 659], [0, 1020, 1080]], [0, 1, 3]],\n   [['hours_window', 0], ['hours_window', 5], ['daily_cap', 0]]),\n  ('partial repair guard 3',\n   [15, [[1, 480, 660], [1, 1080, 1140], [1, 419, 479], [4, 1080, 1260]], [0, 1, 2, 5]],\n   [['hours_window', 1], ['hours_window', 4], ['daily_cap', 1]]),\n  ('boundary control 4', [15, [[0, 900, 1081]], [0, 1, 2, 3, 4]], [['daily_cap', 0]]),\n  ('boundary control 5', [14, [[5, 480, 960], [6, 480, 960], [0, 900, 1080], [2, 900, 1080]], [0, 2]],\n   [['weekly_cap', -1]]),\n  ('normal control 6', [14, [[2, 1080, 1380], [0, 420, 540], [6, 960, 1020]], [0, 1, 2, 3, 6]],\n   [['hours_window', 2], ['daily_cap', 2]]),\n  ('normal control 7',\n   [15, [[5, 1080, 1140], [6, 419, 719], [3, 1080, 1200], [6, 419, 479], [4, 1020, 1200]], [0, 1, 2, 4]],\n   [['hours_window', 6], ['hours_window', 3], ['hours_window', 6], ['hours_window', 4]]),\n  ('normal control 8', [17, [[5, 900, 1081], [5, 1020, 1200], [0, 1080, 1261], [3, 960, 1080]], []], [])]]\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":"0df7c7bb3b28ce00a4d58b3d160767c7379f750bcdce79089922bdc5f8436538","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(age, shifts, school_days):\n    if age >= 16:\n        return []\n    out = []\n    per = {}\n    for d, st, en in shifts:\n        per[d] = per.get(d, 0) + en - st\n        if st < 420 or en > 1140:\n            out.append(['hours_window', d])\n    for d in sorted(per):\n        cap = 180 if d in school_days else 480\n        if per[d] > cap:\n            out.append(['daily_cap', d])\n    week_cap = 1080 if school_days else 2400\n    if sum(per.values()) > week_cap:\n        out.append(['weekly_cap', -1])\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: daily total aggregation 1', [15, [[1, 900, 1000], [1, 1020, 1120]], [1]], [['daily_cap', 1]]),\n  ('regression variant: daily total aggregation 2',\n   [15, [[0, 1020, 1200], [3, 1020, 1200], [1, 360, 540], [1, 420, 480], [4, 419, 599], [1, 900, 960]],\n    [0, 1, 2, 3, 6]],\n   [['hours_window', 0], ['hours_window', 3], ['hours_window', 1], ['hours_window', 4], ['daily_cap', 1]]),\n  ('partial repair guard 3',\n   [15, [[1, 419, 599], [5, 1020, 1320], [1, 480, 720], [5, 420, 480], [2, 360, 600], [1, 1020, 1201]],\n    [0, 3, 4, 5, 6]],\n   [['hours_window', 1], ['hours_window', 5], ['hours_window', 2], ['hours_window', 1], ['daily_cap', 1],\n    ['daily_cap', 5], ['weekly_cap', -1]]),\n  ('boundary control 4', [15, [[5, 960, 1141]], []], [['hours_window', 5]]),\n  ('boundary control 5', [15, [[0, 900, 1081]], [0, 1, 2, 3, 4]], [['daily_cap', 0]]),\n  ('normal control 6', [15, [[1, 900, 1200]], []], [['hours_window', 1]]),\n  ('normal control 7',\n   [15, [[3, 900, 1200], [1, 1020, 1201], [3, 900, 1081], [1, 419, 719], [4, 1080, 1261], [2, 960, 1020]],\n    [0, 2, 3, 4, 5]],\n   [['hours_window', 3], ['hours_window', 1], ['hours_window', 1], ['hours_window', 4], ['daily_cap', 1],\n    ['daily_cap', 3], ['daily_cap', 4], ['weekly_cap', -1]]),\n  ('normal control 8',\n   [17, [[3, 1080, 1200], [2, 900, 1200], [6, 420, 480], [3, 1080, 1380], [2, 960, 1200]], [0, 2, 4]], [])],\n [('regression: daily total aggregation 1',\n   [15, [[5, 1020, 1200], [5, 900, 960], [5, 360, 480], [5, 420, 600], [6, 360, 840], [0, 480, 660]], []],\n   [['hours_window', 5], ['hours_window', 5], ['hours_window', 6], ['daily_cap', 5]]),\n  ('regression variant: daily total aggregation 2',\n   [15, [[6, 480, 660], [5, 420, 600], [1, 480, 660], [1, 360, 480]], [1, 2, 3]],\n   [['hours_window', 1], ['daily_cap', 1]]),\n  ('partial repair guard 3',\n   [14, [[5, 480, 960], [0, 480, 960], [6, 960, 1200], [6, 960, 1260], [5, 900, 1020]], []],\n   [['hours_window', 6], ['hours_window', 6], ['daily_cap', 5], ['daily_cap', 6]]),\n  ('boundary control 4', [14, [[5, 480, 960], [6, 480, 960], [0, 900, 1080], [2, 900, 1080]], [0, 2]],\n   [['weekly_cap', -1]]),\n  ('boundary control 5', [16, [[0, 300, 1300]], [0]], []),\n  ('normal control 6',\n   [15, [[0, 1020, 1080], [6, 1020, 1260], [3, 1020, 1320], [6, 480, 660], [2, 480, 960]], []],\n   [['hours_window', 6], ['hours_window', 3]]),\n  ('normal control 7',\n   [17, [[1, 420, 601], [2, 1020, 1200], [0, 960, 1140], [0, 1080, 1320]], [0, 2, 3, 5, 6]], []),\n  ('normal control 8', [16, [[4, 420, 540], [1, 1080, 1320]], [0, 1, 2, 3, 6]], [])],\n [('regression: daily total aggregation 1', [14, [[1, 420, 601], [1, 960, 1260]], [0, 2, 3]],\n   [['hours_window', 1], ['daily_cap', 1]]),\n  ('regression variant: daily total aggregation 2',\n   [14, [[5, 1020, 1320], [2, 419, 659], [2, 1020, 1200], [3, 1020, 1260], [5, 1080, 1261], [6, 900, 960]],\n    [0, 3, 5, 6]],\n   [['hours_window', 5], ['hours_window', 2], ['hours_window', 2], ['hours_window', 3], ['hours_window', 5],\n    ['daily_cap', 3], ['daily_cap', 5], ['weekly_cap', -1]]),\n  ('partial repair guard 3',\n   [15, [[3, 419, 599], [3, 900, 1081], [2, 360, 660], [3, 360, 660], [2, 419, 719]], []],\n   [['hours_window', 3], ['hours_window', 2], ['hours_window', 3], ['hours_window', 2], ['daily_cap', 2],\n    ['daily_cap', 3]]),\n  ('boundary control 4', [15, [[5, 960, 1140]], []], []),\n  ('boundary control 5', [15, [[0, 900, 1080]], [0, 1, 2, 3, 4]], []),\n  ('normal control 6', [16, [[1, 480, 960], [1, 420, 660]], [0, 3, 5, 6]], []),\n  ('normal control 7', [17, [[2, 1080, 1260], [0, 419, 719]], [2, 4, 6]], []),\n  ('normal control 8', [15, [[3, 419, 599], [4, 360, 420]], [3, 4, 5]],\n   [['hours_window', 3], ['hours_window', 4]])],\n [('regression: daily total aggregation 1',\n   [15, [[6, 360, 541], [1, 900, 960], [5, 480, 600], [1, 420, 660], [4, 900, 1020], [1, 1020, 1140]],\n    [0, 1, 4, 5]],\n   [['hours_window', 6], ['daily_cap', 1]]),\n  ('regression variant: daily total aggregation 2',\n   [14, [[2, 360, 660], [6, 1080, 1380], [0, 1020, 1260], [2, 1080, 1200], [3, 420, 660], [5, 480, 661]],\n    [0, 1, 2, 3, 5]],\n   [['hours_window', 2], ['hours_window', 6], ['hours_window', 0], ['hours_window', 2], ['daily_cap', 0],\n    ['daily_cap', 2], ['daily_cap', 3], ['daily_cap', 5], ['weekly_cap', -1]]),\n  ('partial repair guard 3',\n   [14, [[5, 1020, 1320], [2, 419, 659], [2, 1020, 1200], [3, 1020, 1260], [5, 1080, 1261], [6, 900, 960]],\n    [0, 3, 5, 6]],\n   [['hours_window', 5], ['hours_window', 2], ['hours_window', 2], ['hours_window', 3], ['hours_window', 5],\n    ['daily_cap', 3], ['daily_cap', 5], ['weekly_cap', -1]]),\n  ('boundary control 4', [15, [[1, 900, 1000], [1, 1020, 1120]], [1]], [['daily_cap', 1]]),\n  ('boundary control 5', [15, [[5, 960, 1141]], []], [['hours_window', 5]]),\n  ('normal control 6', [17, [[3, 900, 960], [3, 1020, 1260]], [0, 1, 2, 4, 5]], []),\n  ('normal control 7', [16, [[4, 420, 540], [1, 1080, 1320]], [0, 1, 2, 3, 6]], []),\n  ('normal control 8', [16, [[3, 360, 541], [5, 1020, 1080], [0, 1080, 1260], [1, 420, 601]], []], [])],\n [('regression: daily total aggregation 1', [15, [[3, 960, 1141], [3, 1020, 1440]], [0, 2, 4, 5, 6]],\n   [['hours_window', 3], ['hours_window', 3], ['daily_cap', 3]]),\n  ('regression variant: daily total aggregation 2',\n   [14, [[6, 900, 960], [0, 1080, 1440], [5, 419, 659], [0, 1020, 1080]], [0, 1, 3]],\n   [['hours_window', 0], ['hours_window', 5], ['daily_cap', 0]]),\n  ('partial repair guard 3',\n   [15, [[1, 480, 660], [1, 1080, 1140], [1, 419, 479], [4, 1080, 1260]], [0, 1, 2, 5]],\n   [['hours_window', 1], ['hours_window', 4], ['daily_cap', 1]]),\n  ('boundary control 4', [15, [[0, 900, 1081]], [0, 1, 2, 3, 4]], [['daily_cap', 0]]),\n  ('boundary control 5', [14, [[5, 480, 960], [6, 480, 960], [0, 900, 1080], [2, 900, 1080]], [0, 2]],\n   [['weekly_cap', -1]]),\n  ('normal control 6', [14, [[2, 1080, 1380], [0, 420, 540], [6, 960, 1020]], [0, 1, 2, 3, 6]],\n   [['hours_window', 2], ['daily_cap', 2]]),\n  ('normal control 7',\n   [15, [[5, 1080, 1140], [6, 419, 719], [3, 1080, 1200], [6, 419, 479], [4, 1020, 1200]], [0, 1, 2, 4]],\n   [['hours_window', 6], ['hours_window', 3], ['hours_window', 6], ['hours_window', 4]]),\n  ('normal control 8', [17, [[5, 900, 1081], [5, 1020, 1200], [0, 1080, 1261], [3, 960, 1080]], []], [])]]\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-youth-worker-hour-limits-daily-total-aggregation","generated_at":"2026-09-29T14:52:00.847177+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Minor-worker hour limits are strict roster constraints with many boundary conditions.","repair":"Sum all shift minutes per day.","root_cause":"Daily minutes are overwritten per shift instead of accumulated.","sha256":"6489f201343193310a3897cba2974758512d9e6a58bf0c026a90a0d5dabbc6c4","title":"Daily cap checks only the last shift of the day · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":40.336,"exit_code":1,"observations":[{"actual":[],"check":"regression: daily total aggregation 1","expected":[["daily_cap",1]],"passed":false},{"actual":[["hours_window",0],["hours_window",3],["hours_window",1],["hours_window",4]],"check":"regression variant: daily total aggregation 2","expected":[["hours_window",0],["hours_window",3],["hours_window",1],["hours_window",4],["daily_cap",1]],"passed":false},{"actual":[["hours_window",1],["hours_window",5],["hours_window",2],["hours_window",1],["daily_cap",5]],"check":"partial repair guard 3","expected":[["hours_window",1],["hours_window",5],["hours_window",2],["hours_window",1],["daily_cap",1],["daily_cap",5],["weekly_cap",-1]],"passed":false},{"actual":[["hours_window",5]],"check":"boundary control 4","expected":[["hours_window",5]],"passed":true},{"actual":[["daily_cap",0]],"check":"boundary control 5","expected":[["daily_cap",0]],"passed":true},{"actual":[["hours_window",1]],"check":"normal control 6","expected":[["hours_window",1]],"passed":true},{"actual":[["hours_window",3],["hours_window",1],["hours_window",1],["hours_window",4],["daily_cap",3],["daily_cap",4]],"check":"normal control 7","expected":[["hours_window",3],["hours_window",1],["hours_window",1],["hours_window",4],["daily_cap",1],["daily_cap",3],["daily_cap",4],["weekly_cap",-1]],"passed":false},{"actual":[],"check":"normal control 8","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: daily total aggregation 1\", \"actual\": [], \"expected\": [[\"daily_cap\", 1]], \"passed\": false}, {\"check\": \"regression variant: daily total aggregation 2\", \"actual\": [[\"hours_window\", 0], [\"hours_window\", 3], [\"hours_window\", 1], [\"hours_window\", 4]], \"expected\": [[\"hours_window\", 0], [\"hours_window\", 3], [\"hours_window\", 1], [\"hours_window\", 4], [\"daily_cap\", 1]], \"passed\": false}, {\"check\": \"partial repair guard 3\", \"actual\": [[\"hours_window\", 1], [\"hours_window\", 5], [\"hours_window\", 2], [\"hours_window\", 1], [\"daily_cap\", 5]], \"expected\": [[\"hours_window\", 1], [\"hours_window\", 5], [\"hours_window\", 2], [\"hours_window\", 1], [\"daily_cap\", 1], [\"daily_cap\", 5], [\"weekly_cap\", -1]], \"passed\": false}, {\"check\": \"boundary control 4\", \"actual\": [[\"hours_window\", 5]], \"expected\": [[\"hours_window\", 5]], \"passed\": true}, {\"check\": \"boundary control 5\", \"actual\": [[\"daily_cap\", 0]], \"expected\": [[\"daily_cap\", 0]], \"passed\": true}, {\"check\": \"normal control 6\", \"actual\": [[\"hours_window\", 1]], \"expected\": [[\"hours_window\", 1]], \"passed\": true}, {\"check\": \"normal control 7\", \"actual\": [[\"hours_window\", 3], [\"hours_window\", 1], [\"hours_window\", 1], [\"hours_window\", 4], [\"daily_cap\", 3], [\"daily_cap\", 4]], \"expected\": [[\"hours_window\", 3], [\"hours_window\", 1], [\"hours_window\", 1], [\"hours_window\", 4], [\"daily_cap\", 1], [\"daily_cap\", 3], [\"daily_cap\", 4], [\"weekly_cap\", -1]], \"passed\": false}, {\"check\": \"normal control 8\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":38.993,"exit_code":1,"observations":[{"actual":[],"check":"regression: daily total aggregation 1","expected":[["daily_cap",1]],"passed":false},{"actual":[["hours_window",0],["hours_window",3],["hours_window",1],["hours_window",4]],"check":"regression variant: daily total aggregation 2","expected":[["hours_window",0],["hours_window",3],["hours_window",1],["hours_window",4],["daily_cap",1]],"passed":false},{"actual":[["hours_window",1],["hours_window",5],["hours_window",2],["hours_window",1]],"check":"partial repair guard 3","expected":[["hours_window",1],["hours_window",5],["hours_window",2],["hours_window",1],["daily_cap",1],["daily_cap",5],["weekly_cap",-1]],"passed":false},{"actual":[["hours_window",5]],"check":"boundary control 4","expected":[["hours_window",5]],"passed":true},{"actual":[["daily_cap",0]],"check":"boundary control 5","expected":[["daily_cap",0]],"passed":true},{"actual":[["hours_window",1]],"check":"normal control 6","expected":[["hours_window",1]],"passed":true},{"actual":[["hours_window",3],["hours_window",1],["hours_window",1],["hours_window",4],["daily_cap",3],["daily_cap",4]],"check":"normal control 7","expected":[["hours_window",3],["hours_window",1],["hours_window",1],["hours_window",4],["daily_cap",1],["daily_cap",3],["daily_cap",4],["weekly_cap",-1]],"passed":false},{"actual":[],"check":"normal control 8","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: daily total aggregation 1\", \"actual\": [], \"expected\": [[\"daily_cap\", 1]], \"passed\": false}, {\"check\": \"regression variant: daily total aggregation 2\", \"actual\": [[\"hours_window\", 0], [\"hours_window\", 3], [\"hours_window\", 1], [\"hours_window\", 4]], \"expected\": [[\"hours_window\", 0], [\"hours_window\", 3], [\"hours_window\", 1], [\"hours_window\", 4], [\"daily_cap\", 1]], \"passed\": false}, {\"check\": \"partial repair guard 3\", \"actual\": [[\"hours_window\", 1], [\"hours_window\", 5], [\"hours_window\", 2], [\"hours_window\", 1]], \"expected\": [[\"hours_window\", 1], [\"hours_window\", 5], [\"hours_window\", 2], [\"hours_window\", 1], [\"daily_cap\", 1], [\"daily_cap\", 5], [\"weekly_cap\", -1]], \"passed\": false}, {\"check\": \"boundary control 4\", \"actual\": [[\"hours_window\", 5]], \"expected\": [[\"hours_window\", 5]], \"passed\": true}, {\"check\": \"boundary control 5\", \"actual\": [[\"daily_cap\", 0]], \"expected\": [[\"daily_cap\", 0]], \"passed\": true}, {\"check\": \"normal control 6\", \"actual\": [[\"hours_window\", 1]], \"expected\": [[\"hours_window\", 1]], \"passed\": true}, {\"check\": \"normal control 7\", \"actual\": [[\"hours_window\", 3], [\"hours_window\", 1], [\"hours_window\", 1], [\"hours_window\", 4], [\"daily_cap\", 3], [\"daily_cap\", 4]], \"expected\": [[\"hours_window\", 3], [\"hours_window\", 1], [\"hours_window\", 1], [\"hours_window\", 4], [\"daily_cap\", 1], [\"daily_cap\", 3], [\"daily_cap\", 4], [\"weekly_cap\", -1]], \"passed\": false}, {\"check\": \"normal control 8\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":39.958,"exit_code":0,"observations":[{"actual":[["daily_cap",1]],"check":"regression: daily total aggregation 1","expected":[["daily_cap",1]],"passed":true},{"actual":[["hours_window",0],["hours_window",3],["hours_window",1],["hours_window",4],["daily_cap",1]],"check":"regression variant: daily total aggregation 2","expected":[["hours_window",0],["hours_window",3],["hours_window",1],["hours_window",4],["daily_cap",1]],"passed":true},{"actual":[["hours_window",1],["hours_window",5],["hours_window",2],["hours_window",1],["daily_cap",1],["daily_cap",5],["weekly_cap",-1]],"check":"partial repair guard 3","expected":[["hours_window",1],["hours_window",5],["hours_window",2],["hours_window",1],["daily_cap",1],["daily_cap",5],["weekly_cap",-1]],"passed":true},{"actual":[["hours_window",5]],"check":"boundary control 4","expected":[["hours_window",5]],"passed":true},{"actual":[["daily_cap",0]],"check":"boundary control 5","expected":[["daily_cap",0]],"passed":true},{"actual":[["hours_window",1]],"check":"normal control 6","expected":[["hours_window",1]],"passed":true},{"actual":[["hours_window",3],["hours_window",1],["hours_window",1],["hours_window",4],["daily_cap",1],["daily_cap",3],["daily_cap",4],["weekly_cap",-1]],"check":"normal control 7","expected":[["hours_window",3],["hours_window",1],["hours_window",1],["hours_window",4],["daily_cap",1],["daily_cap",3],["daily_cap",4],["weekly_cap",-1]],"passed":true},{"actual":[],"check":"normal control 8","expected":[],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: daily total aggregation 1\", \"actual\": [[\"daily_cap\", 1]], \"expected\": [[\"daily_cap\", 1]], \"passed\": true}, {\"check\": \"regression variant: daily total aggregation 2\", \"actual\": [[\"hours_window\", 0], [\"hours_window\", 3], [\"hours_window\", 1], [\"hours_window\", 4], [\"daily_cap\", 1]], \"expected\": [[\"hours_window\", 0], [\"hours_window\", 3], [\"hours_window\", 1], [\"hours_window\", 4], [\"daily_cap\", 1]], \"passed\": true}, {\"check\": \"partial repair guard 3\", \"actual\": [[\"hours_window\", 1], [\"hours_window\", 5], [\"hours_window\", 2], [\"hours_window\", 1], [\"daily_cap\", 1], [\"daily_cap\", 5], [\"weekly_cap\", -1]], \"expected\": [[\"hours_window\", 1], [\"hours_window\", 5], [\"hours_window\", 2], [\"hours_window\", 1], [\"daily_cap\", 1], [\"daily_cap\", 5], [\"weekly_cap\", -1]], \"passed\": true}, {\"check\": \"boundary control 4\", \"actual\": [[\"hours_window\", 5]], \"expected\": [[\"hours_window\", 5]], \"passed\": true}, {\"check\": \"boundary control 5\", \"actual\": [[\"daily_cap\", 0]], \"expected\": [[\"daily_cap\", 0]], \"passed\": true}, {\"check\": \"normal control 6\", \"actual\": [[\"hours_window\", 1]], \"expected\": [[\"hours_window\", 1]], \"passed\": true}, {\"check\": \"normal control 7\", \"actual\": [[\"hours_window\", 3], [\"hours_window\", 1], [\"hours_window\", 1], [\"hours_window\", 4], [\"daily_cap\", 1], [\"daily_cap\", 3], [\"daily_cap\", 4], [\"weekly_cap\", -1]], \"expected\": [[\"hours_window\", 3], [\"hours_window\", 1], [\"hours_window\", 1], [\"hours_window\", 4], [\"daily_cap\", 1], [\"daily_cap\", 3], [\"daily_cap\", 4], [\"weekly_cap\", -1]], \"passed\": true}, {\"check\": \"normal control 8\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}