{"abstract":"A long shift starting late in the window pushes the total over the limit.","category":"Shift rostering labor rules","checks":8,"contract":"Shifts [start, end] in minutes. For window W, evaluate windows [t, t + W) anchored at each shift start and sum the minutes of all shifts clipped to the window; report the maximum. Return [max in any 24h window, max in any 168h window, violations] where more than 960 minutes in 24h or more than 3600 minutes in 168h is a violation.","contract_signature":"shifts","evaluation_group":"w2-shift-rostering-labor-rules-rolling-fatigue-windows","failed_approach":"Clipping one minute early undercounts every shift reaching the end.","family":"w2-shift-rostering-labor-rules-rolling-fatigue-windows-window-end-clip","id":"FA-94216","implementations":{"attempt":{"sha256":"c63c17d6d0139ed2782c7737ffb9f1729ca4189e4da3d3fe4546e3b03703b820","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(shifts):\n    starts = sorted(s for s, e in shifts)\n    def worst(W):\n        best = 0\n        for t in starts:\n            tot = sum(max(0, min(e, t + W - 1) - max(s, t)) for s, e in shifts)\n            best = max(best, tot)\n        return best\n    m24, m168 = worst(1440), worst(10080)\n    v = []\n    if m24 > 960:\n        v.append('24h')\n    if m168 > 3600:\n        v.append('7d')\n    return [m24, m168, v]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: window end clip 1', [[[0, 600], [1200, 1800]]], [840, 1200, []]),\n  ('regression variant: window end clip 2', [[[2700, 3420], [0, 720], [4320, 4680], [1440, 1800]]],\n   [720, 2160, []]),\n  ('partial repair guard 3',\n   [[[4680, 5160], [4080, 4440], [1920, 2640], [1200, 1680], [6120, 6600], [0, 720], [5400, 5880],\n     [3540, 4020]]],\n   [1200, 4200, ['24h', '7d']]),\n  ('boundary control 4', [[[1000, 1500], [0, 480]]], [920, 980, []]),\n  ('boundary control 5', [[[0, 480], [480, 960]]], [960, 960, []]),\n  ('normal control 6',\n   [[[3720, 4440], [6300, 7020], [3120, 3480], [0, 600], [5340, 6060], [660, 1140], [1200, 1680],\n     [7020, 7740]]],\n   [1440, 4800, ['24h', '7d']]),\n  ('normal control 7', [[[0, 360], [3840, 4440], [600, 1320], [2760, 3120]]], [1080, 2040, ['24h']]),\n  ('normal control 8', [[[300, 900], [1380, 1740]]], [960, 960, []])],\n [('regression: window end clip 1', [[[1000, 1500], [0, 480]]], [920, 980, []]),\n  ('regression variant: window end clip 2', [[[2520, 3120], [2100, 2460], [300, 660]]], [960, 1320, []]),\n  ('partial repair guard 3', [[[3840, 4560], [5460, 6180], [2880, 3360], [1500, 1980], [0, 600]]],\n   [960, 3000, []]),\n  ('boundary control 4', [[[100, 700], [900, 1300]]], [1000, 1000, ['24h']]),\n  ('normal control 5',\n   [[[6180, 6660], [1680, 2040], [7140, 7500], [720, 1200], [8400, 9120], [3480, 4080], [300, 660],\n     [4980, 5460]]],\n   [900, 3840, ['7d']]),\n  ('normal control 6',\n   [[[6900, 7620], [1260, 1740], [9060, 9780], [4860, 5220], [3060, 3420], [1740, 2340], [5700, 6180],\n     [300, 1020]]],\n   [1200, 4440, ['24h', '7d']]),\n  ('normal control 7', [[[2340, 2700], [300, 900]]], [600, 960, []]),\n  ('normal control 8',\n   [[[3720, 4320], [2460, 2820], [6240, 6960], [9180, 9660], [300, 1020], [5040, 5760], [7680, 8040],\n     [8100, 8700]]],\n   [960, 4560, ['7d']])],\n [('regression: window end clip 1', [[[0, 720], [1440, 2160], [2880, 3600], [4320, 5040], [5760, 6480]]],\n   [720, 3600, []]),\n  ('regression variant: window end clip 2', [[[2160, 2640], [300, 780], [840, 1440]]], [1080, 1560, ['24h']]),\n  ('partial repair guard 3',\n   [[[1080, 1440], [7260, 7860], [1920, 2520], [0, 600], [5460, 5820], [3300, 4020], [2520, 3240]]],\n   [1380, 3960, ['24h', '7d']]),\n  ('boundary control 4', [[[0, 480], [480, 961]]], [961, 961, ['24h']]),\n  ('boundary control 5', [[[100, 700], [900, 1300]]], [1000, 1000, ['24h']]),\n  ('normal control 6', [[[1560, 2160], [300, 780], [780, 1500]]], [1380, 1800, ['24h']]),\n  ('normal control 7',\n   [[[1680, 2400], [3840, 4200], [5040, 5640], [300, 780], [4680, 5040], [6540, 7260], [6120, 6480],\n     [7500, 7860]]],\n   [1140, 3960, ['24h', '7d']]),\n  ('normal control 8', [[[3000, 3360], [300, 1020], [2460, 2940], [4800, 5520]]], [840, 2280, []])],\n [('regression: window end clip 1', [[[0, 480], [1920, 2640]]], [720, 1200, []]),\n  ('regression variant: window end clip 2',\n   [[[6060, 6420], [5100, 5580], [1080, 1560], [0, 360], [3120, 3600], [3840, 4200], [1620, 2220]]],\n   [1080, 3120, ['24h']]),\n  ('partial repair guard 3',\n   [[[2580, 3180], [4500, 5220], [7380, 8100], [0, 600], [1500, 2100], [9000, 9720], [3420, 4020],\n     [6120, 6480]]],\n   [1200, 4920, ['24h', '7d']]),\n  ('boundary control 4', [[[0, 720], [1440, 2160], [2880, 3600], [4320, 5040], [5760, 6480]]],\n   [720, 3600, []]),\n  ('boundary control 5', [[[0, 480], [480, 961]]], [961, 961, ['24h']]),\n  ('normal control 6', [[[1920, 2520], [0, 480], [720, 1200], [2760, 3480]]], [1200, 2280, ['24h']]),\n  ('normal control 7', [[[1320, 1920], [2820, 3180], [0, 600]]], [720, 1560, []]),\n  ('normal control 8',\n   [[[1200, 1560], [2280, 2880], [0, 480], [720, 1200], [7440, 8040], [5940, 6540], [3360, 3960],\n     [4020, 4500]]],\n   [1200, 4200, ['24h', '7d']])],\n [('regression: window end clip 1',\n   [[[0, 600], [3480, 3960], [5400, 5880], [840, 1200], [4200, 4920], [1680, 2040]]], [1200, 3000, ['24h']]),\n  ('regression variant: window end clip 2',\n   [[[1920, 2640], [5100, 5580], [2640, 3000], [0, 720], [3060, 3780], [960, 1440], [3840, 4200],\n     [6300, 6780]]],\n   [1380, 4320, ['24h', '7d']]),\n  ('partial repair guard 3', [[[1920, 2520], [0, 480], [720, 1200], [2760, 3480]]], [1200, 2280, ['24h']]),\n  ('boundary control 4', [[[0, 1010]]], [1010, 1010, ['24h']]),\n  ('boundary control 5', [[[0, 720], [1440, 2160], [2880, 3600], [4320, 5040], [5760, 6480]]],\n   [720, 3600, []]),\n  ('normal control 6', [[[1380, 2100], [2340, 2700], [3600, 4200], [300, 900], [4260, 4620], [5100, 5580]]],\n   [1080, 3120, ['24h']]),\n  ('normal control 7',\n   [[[0, 720], [5400, 6000], [9180, 9900], [7980, 8460], [10140, 10620], [1620, 2340], [3240, 3960],\n     [7440, 7920]]],\n   [1200, 4440, ['24h', '7d']]),\n  ('normal control 8', [[[1740, 2100], [2580, 3300], [0, 600], [1080, 1680], [3540, 4260]]],\n   [1200, 3000, ['24h']])]]\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":"3a6e761f3e6bd3895757cdaa5e7d05ae8ef71d4afcfa2f7517a25f3fe6a97cea","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(shifts):\n    starts = sorted(s for s, e in shifts)\n    def worst(W):\n        best = 0\n        for t in starts:\n            tot = sum(max(0, e - max(s, t)) for s, e in shifts)\n            best = max(best, tot)\n        return best\n    m24, m168 = worst(1440), worst(10080)\n    v = []\n    if m24 > 960:\n        v.append('24h')\n    if m168 > 3600:\n        v.append('7d')\n    return [m24, m168, v]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: window end clip 1', [[[0, 600], [1200, 1800]]], [840, 1200, []]),\n  ('regression variant: window end clip 2', [[[2700, 3420], [0, 720], [4320, 4680], [1440, 1800]]],\n   [720, 2160, []]),\n  ('partial repair guard 3',\n   [[[4680, 5160], [4080, 4440], [1920, 2640], [1200, 1680], [6120, 6600], [0, 720], [5400, 5880],\n     [3540, 4020]]],\n   [1200, 4200, ['24h', '7d']]),\n  ('boundary control 4', [[[1000, 1500], [0, 480]]], [920, 980, []]),\n  ('boundary control 5', [[[0, 480], [480, 960]]], [960, 960, []]),\n  ('normal control 6',\n   [[[3720, 4440], [6300, 7020], [3120, 3480], [0, 600], [5340, 6060], [660, 1140], [1200, 1680],\n     [7020, 7740]]],\n   [1440, 4800, ['24h', '7d']]),\n  ('normal control 7', [[[0, 360], [3840, 4440], [600, 1320], [2760, 3120]]], [1080, 2040, ['24h']]),\n  ('normal control 8', [[[300, 900], [1380, 1740]]], [960, 960, []])],\n [('regression: window end clip 1', [[[1000, 1500], [0, 480]]], [920, 980, []]),\n  ('regression variant: window end clip 2', [[[2520, 3120], [2100, 2460], [300, 660]]], [960, 1320, []]),\n  ('partial repair guard 3', [[[3840, 4560], [5460, 6180], [2880, 3360], [1500, 1980], [0, 600]]],\n   [960, 3000, []]),\n  ('boundary control 4', [[[100, 700], [900, 1300]]], [1000, 1000, ['24h']]),\n  ('normal control 5',\n   [[[6180, 6660], [1680, 2040], [7140, 7500], [720, 1200], [8400, 9120], [3480, 4080], [300, 660],\n     [4980, 5460]]],\n   [900, 3840, ['7d']]),\n  ('normal control 6',\n   [[[6900, 7620], [1260, 1740], [9060, 9780], [4860, 5220], [3060, 3420], [1740, 2340], [5700, 6180],\n     [300, 1020]]],\n   [1200, 4440, ['24h', '7d']]),\n  ('normal control 7', [[[2340, 2700], [300, 900]]], [600, 960, []]),\n  ('normal control 8',\n   [[[3720, 4320], [2460, 2820], [6240, 6960], [9180, 9660], [300, 1020], [5040, 5760], [7680, 8040],\n     [8100, 8700]]],\n   [960, 4560, ['7d']])],\n [('regression: window end clip 1', [[[0, 720], [1440, 2160], [2880, 3600], [4320, 5040], [5760, 6480]]],\n   [720, 3600, []]),\n  ('regression variant: window end clip 2', [[[2160, 2640], [300, 780], [840, 1440]]], [1080, 1560, ['24h']]),\n  ('partial repair guard 3',\n   [[[1080, 1440], [7260, 7860], [1920, 2520], [0, 600], [5460, 5820], [3300, 4020], [2520, 3240]]],\n   [1380, 3960, ['24h', '7d']]),\n  ('boundary control 4', [[[0, 480], [480, 961]]], [961, 961, ['24h']]),\n  ('boundary control 5', [[[100, 700], [900, 1300]]], [1000, 1000, ['24h']]),\n  ('normal control 6', [[[1560, 2160], [300, 780], [780, 1500]]], [1380, 1800, ['24h']]),\n  ('normal control 7',\n   [[[1680, 2400], [3840, 4200], [5040, 5640], [300, 780], [4680, 5040], [6540, 7260], [6120, 6480],\n     [7500, 7860]]],\n   [1140, 3960, ['24h', '7d']]),\n  ('normal control 8', [[[3000, 3360], [300, 1020], [2460, 2940], [4800, 5520]]], [840, 2280, []])],\n [('regression: window end clip 1', [[[0, 480], [1920, 2640]]], [720, 1200, []]),\n  ('regression variant: window end clip 2',\n   [[[6060, 6420], [5100, 5580], [1080, 1560], [0, 360], [3120, 3600], [3840, 4200], [1620, 2220]]],\n   [1080, 3120, ['24h']]),\n  ('partial repair guard 3',\n   [[[2580, 3180], [4500, 5220], [7380, 8100], [0, 600], [1500, 2100], [9000, 9720], [3420, 4020],\n     [6120, 6480]]],\n   [1200, 4920, ['24h', '7d']]),\n  ('boundary control 4', [[[0, 720], [1440, 2160], [2880, 3600], [4320, 5040], [5760, 6480]]],\n   [720, 3600, []]),\n  ('boundary control 5', [[[0, 480], [480, 961]]], [961, 961, ['24h']]),\n  ('normal control 6', [[[1920, 2520], [0, 480], [720, 1200], [2760, 3480]]], [1200, 2280, ['24h']]),\n  ('normal control 7', [[[1320, 1920], [2820, 3180], [0, 600]]], [720, 1560, []]),\n  ('normal control 8',\n   [[[1200, 1560], [2280, 2880], [0, 480], [720, 1200], [7440, 8040], [5940, 6540], [3360, 3960],\n     [4020, 4500]]],\n   [1200, 4200, ['24h', '7d']])],\n [('regression: window end clip 1',\n   [[[0, 600], [3480, 3960], [5400, 5880], [840, 1200], [4200, 4920], [1680, 2040]]], [1200, 3000, ['24h']]),\n  ('regression variant: window end clip 2',\n   [[[1920, 2640], [5100, 5580], [2640, 3000], [0, 720], [3060, 3780], [960, 1440], [3840, 4200],\n     [6300, 6780]]],\n   [1380, 4320, ['24h', '7d']]),\n  ('partial repair guard 3', [[[1920, 2520], [0, 480], [720, 1200], [2760, 3480]]], [1200, 2280, ['24h']]),\n  ('boundary control 4', [[[0, 1010]]], [1010, 1010, ['24h']]),\n  ('boundary control 5', [[[0, 720], [1440, 2160], [2880, 3600], [4320, 5040], [5760, 6480]]],\n   [720, 3600, []]),\n  ('normal control 6', [[[1380, 2100], [2340, 2700], [3600, 4200], [300, 900], [4260, 4620], [5100, 5580]]],\n   [1080, 3120, ['24h']]),\n  ('normal control 7',\n   [[[0, 720], [5400, 6000], [9180, 9900], [7980, 8460], [10140, 10620], [1620, 2340], [3240, 3960],\n     [7440, 7920]]],\n   [1200, 4440, ['24h', '7d']]),\n  ('normal control 8', [[[1740, 2100], [2580, 3300], [0, 600], [1080, 1680], [3540, 4260]]],\n   [1200, 3000, ['24h']])]]\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-rolling-fatigue-windows-window-end-clip","generated_at":"2026-09-29T14:52:02.223706+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Rolling-window fatigue limits catch hours concentrated across calendar-day boundaries.","root_cause":"Shift minutes are not clipped at the window end.","sha256":"2213a5f3633b02f58070c283f21189dd62d192a548016c3657fac449a9cf210c","title":"Shift running past the window end counted in full · 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":42.096,"exit_code":1,"observations":[{"actual":[839,1200,[]],"check":"regression: window end clip 1","expected":[840,1200,[]],"passed":false},{"actual":[720,2160,[]],"check":"regression variant: window end clip 2","expected":[720,2160,[]],"passed":true},{"actual":[1199,4200,["24h","7d"]],"check":"partial repair guard 3","expected":[1200,4200,["24h","7d"]],"passed":false},{"actual":[919,980,[]],"check":"boundary control 4","expected":[920,980,[]],"passed":false},{"actual":[960,960,[]],"check":"boundary control 5","expected":[960,960,[]],"passed":true},{"actual":[1439,4800,["24h","7d"]],"check":"normal control 6","expected":[1440,4800,["24h","7d"]],"passed":false},{"actual":[1080,2040,["24h"]],"check":"normal control 7","expected":[1080,2040,["24h"]],"passed":true},{"actual":[959,960,[]],"check":"normal control 8","expected":[960,960,[]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: window end clip 1\", \"actual\": [839, 1200, []], \"expected\": [840, 1200, []], \"passed\": false}, {\"check\": \"regression variant: window end clip 2\", \"actual\": [720, 2160, []], \"expected\": [720, 2160, []], \"passed\": true}, {\"check\": \"partial repair guard 3\", \"actual\": [1199, 4200, [\"24h\", \"7d\"]], \"expected\": [1200, 4200, [\"24h\", \"7d\"]], \"passed\": false}, {\"check\": \"boundary control 4\", \"actual\": [919, 980, []], \"expected\": [920, 980, []], \"passed\": false}, {\"check\": \"boundary control 5\", \"actual\": [960, 960, []], \"expected\": [960, 960, []], \"passed\": true}, {\"check\": \"normal control 6\", \"actual\": [1439, 4800, [\"24h\", \"7d\"]], \"expected\": [1440, 4800, [\"24h\", \"7d\"]], \"passed\": false}, {\"check\": \"normal control 7\", \"actual\": [1080, 2040, [\"24h\"]], \"expected\": [1080, 2040, [\"24h\"]], \"passed\": true}, {\"check\": \"normal control 8\", \"actual\": [959, 960, []], \"expected\": [960, 960, []], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.15,"exit_code":1,"observations":[{"actual":[1200,1200,["24h"]],"check":"regression: window end clip 1","expected":[840,1200,[]],"passed":false},{"actual":[2160,2160,["24h"]],"check":"regression variant: window end clip 2","expected":[720,2160,[]],"passed":false},{"actual":[4200,4200,["24h","7d"]],"check":"partial repair guard 3","expected":[1200,4200,["24h","7d"]],"passed":false},{"actual":[980,980,["24h"]],"check":"boundary control 4","expected":[920,980,[]],"passed":false},{"actual":[960,960,[]],"check":"boundary control 5","expected":[960,960,[]],"passed":true},{"actual":[4800,4800,["24h","7d"]],"check":"normal control 6","expected":[1440,4800,["24h","7d"]],"passed":false},{"actual":[2040,2040,["24h"]],"check":"normal control 7","expected":[1080,2040,["24h"]],"passed":false},{"actual":[960,960,[]],"check":"normal control 8","expected":[960,960,[]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: window end clip 1\", \"actual\": [1200, 1200, [\"24h\"]], \"expected\": [840, 1200, []], \"passed\": false}, {\"check\": \"regression variant: window end clip 2\", \"actual\": [2160, 2160, [\"24h\"]], \"expected\": [720, 2160, []], \"passed\": false}, {\"check\": \"partial repair guard 3\", \"actual\": [4200, 4200, [\"24h\", \"7d\"]], \"expected\": [1200, 4200, [\"24h\", \"7d\"]], \"passed\": false}, {\"check\": \"boundary control 4\", \"actual\": [980, 980, [\"24h\"]], \"expected\": [920, 980, []], \"passed\": false}, {\"check\": \"boundary control 5\", \"actual\": [960, 960, []], \"expected\": [960, 960, []], \"passed\": true}, {\"check\": \"normal control 6\", \"actual\": [4800, 4800, [\"24h\", \"7d\"]], \"expected\": [1440, 4800, [\"24h\", \"7d\"]], \"passed\": false}, {\"check\": \"normal control 7\", \"actual\": [2040, 2040, [\"24h\"]], \"expected\": [1080, 2040, [\"24h\"]], \"passed\": false}, {\"check\": \"normal control 8\", \"actual\": [960, 960, []], \"expected\": [960, 960, []], \"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."}}