{"abstract":"Workers who just turned 16 are rejected for evening shifts.","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].","contract_signature":"age, shifts, school_days","evaluation_group":"w2-shift-rostering-labor-rules-youth-worker-hour-limits","failed_approach":"Exempting 16-year-olds only in vacation weeks still restricts them during school weeks.","family":"w2-shift-rostering-labor-rules-youth-worker-hour-limits-age-boundary","id":"FA-94061","implementations":{"attempt":{"sha256":"47ba572274894fdee99e7f10e9fb1c54591aefeb8b8814887bb520122cc3cf41","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 and not school_days:\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: age boundary 1', [16, [[0, 300, 1300]], [0]], []),\n  ('regression variant: age boundary 2', [16, [[3, 960, 1140], [4, 360, 420]], [0, 2, 3, 4, 5]], []),\n  ('partial repair guard 3', [17, [[6, 420, 660], [2, 1080, 1261], [5, 900, 1200]], [0, 1, 2, 4, 6]], []),\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',\n   [17, [[2, 900, 1380], [6, 960, 1020], [2, 960, 1141], [5, 900, 1020], [3, 960, 1141], [6, 420, 480]],\n    [2, 4, 6]],\n   []),\n  ('normal control 7', [14, [[6, 420, 601], [0, 420, 900], [3, 419, 599], [1, 360, 480]], []],\n   [['hours_window', 3], ['hours_window', 1]]),\n  ('normal control 8', [15, [[1, 900, 1020], [6, 360, 660]], [0, 1, 2, 5]], [['hours_window', 6]])],\n [('regression: age boundary 1',\n   [16, [[2, 419, 599], [6, 360, 480], [0, 419, 599], [0, 900, 1200], [6, 900, 1140]], [0, 1, 2, 4, 6]], []),\n  ('regression variant: age boundary 2', [16, [[5, 1020, 1200], [6, 1080, 1320], [4, 480, 780]], []], []),\n  ('partial repair guard 3', [16, [[3, 960, 1140], [4, 360, 420]], [0, 2, 3, 4, 5]], []),\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', [16, [[6, 420, 900], [4, 420, 480], [0, 419, 539]], [0, 1, 2, 3, 6]], []),\n  ('normal control 7', [17, [[3, 420, 900], [0, 900, 1020], [3, 420, 540], [6, 1020, 1201]], [0, 1, 2, 3, 5]],\n   []),\n  ('normal control 8', [15, [[3, 420, 600]], []], [])],\n [('regression: age boundary 1', [16, [[4, 1080, 1200], [4, 419, 599]], []], []),\n  ('regression variant: age boundary 2',\n   [16, [[6, 1020, 1260], [1, 360, 540], [0, 1020, 1440], [6, 900, 1200], [0, 960, 1200], [1, 420, 660]],\n    [3, 4, 5, 6]],\n   []),\n  ('partial repair guard 3',\n   [17, [[2, 1080, 1320], [2, 960, 1140], [6, 480, 720], [0, 960, 1140]], [1, 2, 5]], []),\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', [17, [[4, 900, 1081], [0, 360, 840]], [1, 2, 3, 6]], []),\n  ('normal control 7',\n   [15, [[6, 960, 1440], [1, 1020, 1260], [2, 360, 541], [0, 360, 840], [3, 960, 1141], [0, 1020, 1080]],\n    [1, 2, 4]],\n   [['hours_window', 6], ['hours_window', 1], ['hours_window', 2], ['hours_window', 0], ['hours_window', 3],\n    ['daily_cap', 0], ['daily_cap', 1], ['daily_cap', 2], ['weekly_cap', -1]]),\n  ('normal control 8', [14, [[2, 1020, 1440], [5, 419, 539]], [0, 1, 2, 4, 5]],\n   [['hours_window', 2], ['hours_window', 5], ['daily_cap', 2]])],\n [('regression: age boundary 1', [16, [[3, 419, 600], [5, 1020, 1260]], [2, 3, 4, 6]], []),\n  ('regression variant: age boundary 2',\n   [16, [[6, 360, 541], [0, 1020, 1200], [5, 960, 1200], [0, 960, 1140], [4, 900, 1140]], []], []),\n  ('partial repair guard 3',\n   [16, [[3, 1020, 1260], [0, 1080, 1320], [5, 419, 899], [2, 960, 1141], [4, 900, 1080], [3, 480, 780]],\n    [0, 1, 2, 5, 6]],\n   []),\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',\n   [15, [[3, 420, 480], [5, 480, 960], [5, 1020, 1320], [1, 1080, 1200], [3, 419, 600], [5, 419, 599]],\n    [1, 3, 4]],\n   [['hours_window', 5], ['hours_window', 1], ['hours_window', 3], ['hours_window', 5], ['daily_cap', 3],\n    ['daily_cap', 5], ['weekly_cap', -1]]),\n  ('normal control 7', [17, [[0, 420, 600], [2, 1080, 1140]], [0, 1, 4]], []),\n  ('normal control 8',\n   [14, [[6, 1020, 1140], [3, 419, 479], [2, 480, 960], [4, 1020, 1320], [4, 1080, 1200], [1, 360, 540]],\n    [0, 1, 3, 4]],\n   [['hours_window', 3], ['hours_window', 4], ['hours_window', 4], ['hours_window', 1], ['daily_cap', 4],\n    ['weekly_cap', -1]])],\n [('regression: age boundary 1',\n   [16, [[3, 360, 600], [4, 419, 599], [6, 360, 541], [6, 419, 599], [4, 480, 960], [4, 900, 1140]],\n    [0, 1, 4, 5, 6]],\n   []),\n  ('regression variant: age boundary 2', [16, [[3, 960, 1260], [3, 1020, 1201], [1, 420, 720]], []], []),\n  ('partial repair guard 3',\n   [17, [[4, 960, 1140], [4, 1020, 1080], [5, 900, 960], [0, 1020, 1140], [6, 480, 540], [5, 420, 480]],\n    [0, 3, 4, 5, 6]],\n   []),\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',\n   [17, [[1, 960, 1020], [4, 360, 420], [3, 420, 720], [0, 420, 601], [1, 1080, 1260], [4, 1020, 1260]], []],\n   []),\n  ('normal control 7', [15, [[4, 1080, 1320], [3, 1080, 1440], [4, 900, 1380], [4, 1080, 1140]], [2, 3, 4]],\n   [['hours_window', 4], ['hours_window', 3], ['hours_window', 4], ['daily_cap', 3], ['daily_cap', 4],\n    ['weekly_cap', -1]]),\n  ('normal control 8',\n   [15, [[0, 480, 661], [4, 420, 540], [1, 420, 660], [1, 360, 480], [2, 1080, 1440]], []],\n   [['hours_window', 1], ['hours_window', 2]])]]\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":"e518a42600190b809680ddc50607b50b82622708e4194b502887acdb74b6b51b","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: age boundary 1', [16, [[0, 300, 1300]], [0]], []),\n  ('regression variant: age boundary 2', [16, [[3, 960, 1140], [4, 360, 420]], [0, 2, 3, 4, 5]], []),\n  ('partial repair guard 3', [17, [[6, 420, 660], [2, 1080, 1261], [5, 900, 1200]], [0, 1, 2, 4, 6]], []),\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',\n   [17, [[2, 900, 1380], [6, 960, 1020], [2, 960, 1141], [5, 900, 1020], [3, 960, 1141], [6, 420, 480]],\n    [2, 4, 6]],\n   []),\n  ('normal control 7', [14, [[6, 420, 601], [0, 420, 900], [3, 419, 599], [1, 360, 480]], []],\n   [['hours_window', 3], ['hours_window', 1]]),\n  ('normal control 8', [15, [[1, 900, 1020], [6, 360, 660]], [0, 1, 2, 5]], [['hours_window', 6]])],\n [('regression: age boundary 1',\n   [16, [[2, 419, 599], [6, 360, 480], [0, 419, 599], [0, 900, 1200], [6, 900, 1140]], [0, 1, 2, 4, 6]], []),\n  ('regression variant: age boundary 2', [16, [[5, 1020, 1200], [6, 1080, 1320], [4, 480, 780]], []], []),\n  ('partial repair guard 3', [16, [[3, 960, 1140], [4, 360, 420]], [0, 2, 3, 4, 5]], []),\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', [16, [[6, 420, 900], [4, 420, 480], [0, 419, 539]], [0, 1, 2, 3, 6]], []),\n  ('normal control 7', [17, [[3, 420, 900], [0, 900, 1020], [3, 420, 540], [6, 1020, 1201]], [0, 1, 2, 3, 5]],\n   []),\n  ('normal control 8', [15, [[3, 420, 600]], []], [])],\n [('regression: age boundary 1', [16, [[4, 1080, 1200], [4, 419, 599]], []], []),\n  ('regression variant: age boundary 2',\n   [16, [[6, 1020, 1260], [1, 360, 540], [0, 1020, 1440], [6, 900, 1200], [0, 960, 1200], [1, 420, 660]],\n    [3, 4, 5, 6]],\n   []),\n  ('partial repair guard 3',\n   [17, [[2, 1080, 1320], [2, 960, 1140], [6, 480, 720], [0, 960, 1140]], [1, 2, 5]], []),\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', [17, [[4, 900, 1081], [0, 360, 840]], [1, 2, 3, 6]], []),\n  ('normal control 7',\n   [15, [[6, 960, 1440], [1, 1020, 1260], [2, 360, 541], [0, 360, 840], [3, 960, 1141], [0, 1020, 1080]],\n    [1, 2, 4]],\n   [['hours_window', 6], ['hours_window', 1], ['hours_window', 2], ['hours_window', 0], ['hours_window', 3],\n    ['daily_cap', 0], ['daily_cap', 1], ['daily_cap', 2], ['weekly_cap', -1]]),\n  ('normal control 8', [14, [[2, 1020, 1440], [5, 419, 539]], [0, 1, 2, 4, 5]],\n   [['hours_window', 2], ['hours_window', 5], ['daily_cap', 2]])],\n [('regression: age boundary 1', [16, [[3, 419, 600], [5, 1020, 1260]], [2, 3, 4, 6]], []),\n  ('regression variant: age boundary 2',\n   [16, [[6, 360, 541], [0, 1020, 1200], [5, 960, 1200], [0, 960, 1140], [4, 900, 1140]], []], []),\n  ('partial repair guard 3',\n   [16, [[3, 1020, 1260], [0, 1080, 1320], [5, 419, 899], [2, 960, 1141], [4, 900, 1080], [3, 480, 780]],\n    [0, 1, 2, 5, 6]],\n   []),\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',\n   [15, [[3, 420, 480], [5, 480, 960], [5, 1020, 1320], [1, 1080, 1200], [3, 419, 600], [5, 419, 599]],\n    [1, 3, 4]],\n   [['hours_window', 5], ['hours_window', 1], ['hours_window', 3], ['hours_window', 5], ['daily_cap', 3],\n    ['daily_cap', 5], ['weekly_cap', -1]]),\n  ('normal control 7', [17, [[0, 420, 600], [2, 1080, 1140]], [0, 1, 4]], []),\n  ('normal control 8',\n   [14, [[6, 1020, 1140], [3, 419, 479], [2, 480, 960], [4, 1020, 1320], [4, 1080, 1200], [1, 360, 540]],\n    [0, 1, 3, 4]],\n   [['hours_window', 3], ['hours_window', 4], ['hours_window', 4], ['hours_window', 1], ['daily_cap', 4],\n    ['weekly_cap', -1]])],\n [('regression: age boundary 1',\n   [16, [[3, 360, 600], [4, 419, 599], [6, 360, 541], [6, 419, 599], [4, 480, 960], [4, 900, 1140]],\n    [0, 1, 4, 5, 6]],\n   []),\n  ('regression variant: age boundary 2', [16, [[3, 960, 1260], [3, 1020, 1201], [1, 420, 720]], []], []),\n  ('partial repair guard 3',\n   [17, [[4, 960, 1140], [4, 1020, 1080], [5, 900, 960], [0, 1020, 1140], [6, 480, 540], [5, 420, 480]],\n    [0, 3, 4, 5, 6]],\n   []),\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',\n   [17, [[1, 960, 1020], [4, 360, 420], [3, 420, 720], [0, 420, 601], [1, 1080, 1260], [4, 1020, 1260]], []],\n   []),\n  ('normal control 7', [15, [[4, 1080, 1320], [3, 1080, 1440], [4, 900, 1380], [4, 1080, 1140]], [2, 3, 4]],\n   [['hours_window', 4], ['hours_window', 3], ['hours_window', 4], ['daily_cap', 3], ['daily_cap', 4],\n    ['weekly_cap', -1]]),\n  ('normal control 8',\n   [15, [[0, 480, 661], [4, 420, 540], [1, 420, 660], [1, 360, 480], [2, 1080, 1440]], []],\n   [['hours_window', 1], ['hours_window', 2]])]]\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-age-boundary","generated_at":"2026-09-29T14:52:00.805906+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.","root_cause":"The exemption requires age above 16 instead of at least 16.","sha256":"252c297d00e433109f735e47e93e257939440ce379b01c761b41bd600db03202","title":"Sixteen-year-olds restricted as minors · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":40.004,"exit_code":1,"observations":[{"actual":[["hours_window",0],["daily_cap",0]],"check":"regression: age boundary 1","expected":[],"passed":false},{"actual":[["hours_window",4]],"check":"regression variant: age boundary 2","expected":[],"passed":false},{"actual":[["hours_window",2],["hours_window",5],["daily_cap",2],["daily_cap",6]],"check":"partial repair guard 3","expected":[],"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",2],["hours_window",2],["hours_window",3],["daily_cap",2],["weekly_cap",-1]],"check":"normal control 6","expected":[],"passed":false},{"actual":[["hours_window",3],["hours_window",1]],"check":"normal control 7","expected":[["hours_window",3],["hours_window",1]],"passed":true},{"actual":[["hours_window",6]],"check":"normal control 8","expected":[["hours_window",6]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: age boundary 1\", \"actual\": [[\"hours_window\", 0], [\"daily_cap\", 0]], \"expected\": [], \"passed\": false}, {\"check\": \"regression variant: age boundary 2\", \"actual\": [[\"hours_window\", 4]], \"expected\": [], \"passed\": false}, {\"check\": \"partial repair guard 3\", \"actual\": [[\"hours_window\", 2], [\"hours_window\", 5], [\"daily_cap\", 2], [\"daily_cap\", 6]], \"expected\": [], \"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\", 2], [\"hours_window\", 2], [\"hours_window\", 3], [\"daily_cap\", 2], [\"weekly_cap\", -1]], \"expected\": [], \"passed\": false}, {\"check\": \"normal control 7\", \"actual\": [[\"hours_window\", 3], [\"hours_window\", 1]], \"expected\": [[\"hours_window\", 3], [\"hours_window\", 1]], \"passed\": true}, {\"check\": \"normal control 8\", \"actual\": [[\"hours_window\", 6]], \"expected\": [[\"hours_window\", 6]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.376,"exit_code":1,"observations":[{"actual":[["hours_window",0],["daily_cap",0]],"check":"regression: age boundary 1","expected":[],"passed":false},{"actual":[["hours_window",4]],"check":"regression variant: age boundary 2","expected":[],"passed":false},{"actual":[],"check":"partial repair guard 3","expected":[],"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":[],"check":"normal control 6","expected":[],"passed":true},{"actual":[["hours_window",3],["hours_window",1]],"check":"normal control 7","expected":[["hours_window",3],["hours_window",1]],"passed":true},{"actual":[["hours_window",6]],"check":"normal control 8","expected":[["hours_window",6]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: age boundary 1\", \"actual\": [[\"hours_window\", 0], [\"daily_cap\", 0]], \"expected\": [], \"passed\": false}, {\"check\": \"regression variant: age boundary 2\", \"actual\": [[\"hours_window\", 4]], \"expected\": [], \"passed\": false}, {\"check\": \"partial repair guard 3\", \"actual\": [], \"expected\": [], \"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\": [], \"expected\": [], \"passed\": true}, {\"check\": \"normal control 7\", \"actual\": [[\"hours_window\", 3], [\"hours_window\", 1]], \"expected\": [[\"hours_window\", 3], [\"hours_window\", 1]], \"passed\": true}, {\"check\": \"normal control 8\", \"actual\": [[\"hours_window\", 6]], \"expected\": [[\"hours_window\", 6]], \"passed\": true}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}