{"abstract":"Clustered callbacks are paid a new three-hour minimum each time.","category":"Shift rostering labor rules","checks":8,"contract":"Callback work intervals [start, end] and a minimum guarantee in minutes. Sorted by start, each callback that does not start inside the current guarantee window opens a new window from its start to max(end, start + guarantee); a callback starting before the window end extends the window to its own end if later. Return [paid minutes as the sum of window lengths, window count].","evaluation_group":"w2-shift-rostering-labor-rules-callback-minimum-guarantee","failed_approach":"Setting the end to the callback end can shrink the window when the callback ends early.","family":"w2-shift-rostering-labor-rules-callback-minimum-guarantee-window-extension-restarts-guarantee","id":"FA-93976","implementations":{"attempt":{"sha256":"34bc8c8815f5974bb1badff557d32ab0501ecc0d04f4414ad21e1ba667e81141","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(callbacks, guarantee):\n    paid = 0\n    windows = 0\n    win_start = win_end = None\n    for s, e in sorted(callbacks):\n        if win_end is not None and s < win_end:\n            win_end = e\n        else:\n            if win_end is not None:\n                paid += win_end - win_start\n            win_start, win_end = s, max(e, s + guarantee)\n            windows += 1\n    if win_end is not None:\n        paid += win_end - win_start\n    return [paid, windows]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: window extension restarts guarantee 1', [[[0, 30], [179, 200]], 180], [200, 1]),\n  ('regression variant: window extension restarts guarantee 2', [[[360, 600], [0, 30], [181, 241]], 180],\n   [599, 2]),\n  ('partial repair guard 3', [[[280, 295], [880, 1120], [100, 340]], 120], [480, 2]),\n  ('boundary control 4', [[[0, 240]], 180], [240, 1]),\n  ('boundary control 5', [[[0, 30], [180, 200]], 180], [360, 2]),\n  ('normal control 6', [[[0, 200], [240, 255]], 240], [480, 2]),\n  ('normal control 7', [[[1400, 1520], [1579, 1594], [1758, 1878]], 180], [374, 2]),\n  ('normal control 8', [[[2180, 2380], [1400, 1520], [1640, 1700], [1880, 2120]], 240], [960, 4])],\n [('regression: window extension restarts guarantee 1', [[[0, 30], [60, 400]], 180], [400, 1]),\n  ('regression variant: window extension restarts guarantee 2', [[[371, 611], [100, 130], [190, 205]], 180],\n   [420, 2]),\n  ('partial repair guard 3', [[[1580, 1595], [1820, 1835], [1999, 2014], [1400, 1430]], 240], [480, 2]),\n  ('boundary control 4', [[], 180], [0, 0]),\n  ('normal control 5', [[[1640, 1700], [1730, 1850], [1400, 1520], [1820, 2060]], 120], [540, 2]),\n  ('normal control 6', [[[309, 509], [130, 145], [549, 579], [100, 340]], 240], [649, 2]),\n  ('normal control 7', [[[2030, 2270], [1400, 1430], [1430, 1550], [2180, 2300]], 180], [450, 2]),\n  ('normal control 8', [[[580, 610], [400, 415], [490, 610], [100, 340]], 180], [450, 2])],\n [('regression: window extension restarts guarantee 1',\n   [[[1550, 1580], [2180, 2210], [1580, 1780], [1400, 1520]], 120], [470, 3]),\n  ('regression variant: window extension restarts guarantee 2', [[[430, 630], [340, 580], [100, 130]], 180],\n   [470, 2]),\n  ('partial repair guard 3', [[[1400, 1640], [1610, 1850], [1640, 1655], [1430, 1630]], 120], [450, 1]),\n  ('boundary control 4', [[[0, 30], [179, 200]], 180], [200, 1]),\n  ('boundary control 5', [[[0, 30]], 180], [180, 1]),\n  ('normal control 6', [[[0, 15], [90, 290]], 240], [290, 1]),\n  ('normal control 7', [[[1400, 1640]], 180], [240, 1]),\n  ('normal control 8', [[[100, 220]], 240], [240, 1])],\n [('regression: window extension restarts guarantee 1', [[[1430, 1490], [1400, 1430]], 240], [240, 1]),\n  ('regression variant: window extension restarts guarantee 2',\n   [[[1671, 1911], [1400, 1415], [1490, 1610], [1701, 1761]], 240], [480, 2]),\n  ('partial repair guard 3', [[[130, 370], [100, 340], [309, 369]], 120], [270, 1]),\n  ('boundary control 4', [[[300, 330], [0, 30]], 180], [360, 2]),\n  ('boundary control 5', [[[0, 240]], 180], [240, 1]),\n  ('normal control 6', [[[100, 130], [130, 330], [430, 445]], 180], [410, 2]),\n  ('normal control 7', [[[100, 300], [281, 521]], 240], [421, 1]),\n  ('normal control 8', [[[0, 120], [150, 210], [450, 690]], 180], [450, 2])],\n [('regression: window extension restarts guarantee 1', [[[1490, 1550], [1400, 1600]], 240], [240, 1]),\n  ('regression variant: window extension restarts guarantee 2',\n   [[[1400, 1640], [1610, 1850], [1640, 1655], [1430, 1630]], 120], [450, 1]),\n  ('partial repair guard 3', [[[250, 265], [100, 115]], 180], [180, 1]),\n  ('boundary control 4', [[[0, 30], [180, 200]], 180], [360, 2]), ('boundary control 5', [[], 180], [0, 0]),\n  ('normal control 6', [[[100, 300], [250, 265]], 180], [200, 1]),\n  ('normal control 7', [[[1000, 1060], [250, 310], [100, 220], [400, 600]], 180], [590, 3]),\n  ('normal control 8', [[[0, 120]], 180], [180, 1])]]\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":"0031eec2815ac51bf12e329fc2d76457959d1c0b3532ca5d68843dfa74a4ea53","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(callbacks, guarantee):\n    paid = 0\n    windows = 0\n    win_start = win_end = None\n    for s, e in sorted(callbacks):\n        if win_end is not None and s < win_end:\n            win_end = max(win_end, s + guarantee)\n        else:\n            if win_end is not None:\n                paid += win_end - win_start\n            win_start, win_end = s, max(e, s + guarantee)\n            windows += 1\n    if win_end is not None:\n        paid += win_end - win_start\n    return [paid, windows]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: window extension restarts guarantee 1', [[[0, 30], [179, 200]], 180], [200, 1]),\n  ('regression variant: window extension restarts guarantee 2', [[[360, 600], [0, 30], [181, 241]], 180],\n   [599, 2]),\n  ('partial repair guard 3', [[[280, 295], [880, 1120], [100, 340]], 120], [480, 2]),\n  ('boundary control 4', [[[0, 240]], 180], [240, 1]),\n  ('boundary control 5', [[[0, 30], [180, 200]], 180], [360, 2]),\n  ('normal control 6', [[[0, 200], [240, 255]], 240], [480, 2]),\n  ('normal control 7', [[[1400, 1520], [1579, 1594], [1758, 1878]], 180], [374, 2]),\n  ('normal control 8', [[[2180, 2380], [1400, 1520], [1640, 1700], [1880, 2120]], 240], [960, 4])],\n [('regression: window extension restarts guarantee 1', [[[0, 30], [60, 400]], 180], [400, 1]),\n  ('regression variant: window extension restarts guarantee 2', [[[371, 611], [100, 130], [190, 205]], 180],\n   [420, 2]),\n  ('partial repair guard 3', [[[1580, 1595], [1820, 1835], [1999, 2014], [1400, 1430]], 240], [480, 2]),\n  ('boundary control 4', [[], 180], [0, 0]),\n  ('normal control 5', [[[1640, 1700], [1730, 1850], [1400, 1520], [1820, 2060]], 120], [540, 2]),\n  ('normal control 6', [[[309, 509], [130, 145], [549, 579], [100, 340]], 240], [649, 2]),\n  ('normal control 7', [[[2030, 2270], [1400, 1430], [1430, 1550], [2180, 2300]], 180], [450, 2]),\n  ('normal control 8', [[[580, 610], [400, 415], [490, 610], [100, 340]], 180], [450, 2])],\n [('regression: window extension restarts guarantee 1',\n   [[[1550, 1580], [2180, 2210], [1580, 1780], [1400, 1520]], 120], [470, 3]),\n  ('regression variant: window extension restarts guarantee 2', [[[430, 630], [340, 580], [100, 130]], 180],\n   [470, 2]),\n  ('partial repair guard 3', [[[1400, 1640], [1610, 1850], [1640, 1655], [1430, 1630]], 120], [450, 1]),\n  ('boundary control 4', [[[0, 30], [179, 200]], 180], [200, 1]),\n  ('boundary control 5', [[[0, 30]], 180], [180, 1]),\n  ('normal control 6', [[[0, 15], [90, 290]], 240], [290, 1]),\n  ('normal control 7', [[[1400, 1640]], 180], [240, 1]),\n  ('normal control 8', [[[100, 220]], 240], [240, 1])],\n [('regression: window extension restarts guarantee 1', [[[1430, 1490], [1400, 1430]], 240], [240, 1]),\n  ('regression variant: window extension restarts guarantee 2',\n   [[[1671, 1911], [1400, 1415], [1490, 1610], [1701, 1761]], 240], [480, 2]),\n  ('partial repair guard 3', [[[130, 370], [100, 340], [309, 369]], 120], [270, 1]),\n  ('boundary control 4', [[[300, 330], [0, 30]], 180], [360, 2]),\n  ('boundary control 5', [[[0, 240]], 180], [240, 1]),\n  ('normal control 6', [[[100, 130], [130, 330], [430, 445]], 180], [410, 2]),\n  ('normal control 7', [[[100, 300], [281, 521]], 240], [421, 1]),\n  ('normal control 8', [[[0, 120], [150, 210], [450, 690]], 180], [450, 2])],\n [('regression: window extension restarts guarantee 1', [[[1490, 1550], [1400, 1600]], 240], [240, 1]),\n  ('regression variant: window extension restarts guarantee 2',\n   [[[1400, 1640], [1610, 1850], [1640, 1655], [1430, 1630]], 120], [450, 1]),\n  ('partial repair guard 3', [[[250, 265], [100, 115]], 180], [180, 1]),\n  ('boundary control 4', [[[0, 30], [180, 200]], 180], [360, 2]), ('boundary control 5', [[], 180], [0, 0]),\n  ('normal control 6', [[[100, 300], [250, 265]], 180], [200, 1]),\n  ('normal control 7', [[[1000, 1060], [250, 310], [100, 220], [400, 600]], 180], [590, 3]),\n  ('normal control 8', [[[0, 120]], 180], [180, 1])]]\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":"4a80fca1b2ef877f06fc536bba1df52ff43ea20be75a1bdae8ee64a8abbdb409","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(callbacks, guarantee):\n    paid = 0\n    windows = 0\n    win_start = win_end = None\n    for s, e in sorted(callbacks):\n        if win_end is not None and s < win_end:\n            win_end = max(win_end, e)\n        else:\n            if win_end is not None:\n                paid += win_end - win_start\n            win_start, win_end = s, max(e, s + guarantee)\n            windows += 1\n    if win_end is not None:\n        paid += win_end - win_start\n    return [paid, windows]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: window extension restarts guarantee 1', [[[0, 30], [179, 200]], 180], [200, 1]),\n  ('regression variant: window extension restarts guarantee 2', [[[360, 600], [0, 30], [181, 241]], 180],\n   [599, 2]),\n  ('partial repair guard 3', [[[280, 295], [880, 1120], [100, 340]], 120], [480, 2]),\n  ('boundary control 4', [[[0, 240]], 180], [240, 1]),\n  ('boundary control 5', [[[0, 30], [180, 200]], 180], [360, 2]),\n  ('normal control 6', [[[0, 200], [240, 255]], 240], [480, 2]),\n  ('normal control 7', [[[1400, 1520], [1579, 1594], [1758, 1878]], 180], [374, 2]),\n  ('normal control 8', [[[2180, 2380], [1400, 1520], [1640, 1700], [1880, 2120]], 240], [960, 4])],\n [('regression: window extension restarts guarantee 1', [[[0, 30], [60, 400]], 180], [400, 1]),\n  ('regression variant: window extension restarts guarantee 2', [[[371, 611], [100, 130], [190, 205]], 180],\n   [420, 2]),\n  ('partial repair guard 3', [[[1580, 1595], [1820, 1835], [1999, 2014], [1400, 1430]], 240], [480, 2]),\n  ('boundary control 4', [[], 180], [0, 0]),\n  ('normal control 5', [[[1640, 1700], [1730, 1850], [1400, 1520], [1820, 2060]], 120], [540, 2]),\n  ('normal control 6', [[[309, 509], [130, 145], [549, 579], [100, 340]], 240], [649, 2]),\n  ('normal control 7', [[[2030, 2270], [1400, 1430], [1430, 1550], [2180, 2300]], 180], [450, 2]),\n  ('normal control 8', [[[580, 610], [400, 415], [490, 610], [100, 340]], 180], [450, 2])],\n [('regression: window extension restarts guarantee 1',\n   [[[1550, 1580], [2180, 2210], [1580, 1780], [1400, 1520]], 120], [470, 3]),\n  ('regression variant: window extension restarts guarantee 2', [[[430, 630], [340, 580], [100, 130]], 180],\n   [470, 2]),\n  ('partial repair guard 3', [[[1400, 1640], [1610, 1850], [1640, 1655], [1430, 1630]], 120], [450, 1]),\n  ('boundary control 4', [[[0, 30], [179, 200]], 180], [200, 1]),\n  ('boundary control 5', [[[0, 30]], 180], [180, 1]),\n  ('normal control 6', [[[0, 15], [90, 290]], 240], [290, 1]),\n  ('normal control 7', [[[1400, 1640]], 180], [240, 1]),\n  ('normal control 8', [[[100, 220]], 240], [240, 1])],\n [('regression: window extension restarts guarantee 1', [[[1430, 1490], [1400, 1430]], 240], [240, 1]),\n  ('regression variant: window extension restarts guarantee 2',\n   [[[1671, 1911], [1400, 1415], [1490, 1610], [1701, 1761]], 240], [480, 2]),\n  ('partial repair guard 3', [[[130, 370], [100, 340], [309, 369]], 120], [270, 1]),\n  ('boundary control 4', [[[300, 330], [0, 30]], 180], [360, 2]),\n  ('boundary control 5', [[[0, 240]], 180], [240, 1]),\n  ('normal control 6', [[[100, 130], [130, 330], [430, 445]], 180], [410, 2]),\n  ('normal control 7', [[[100, 300], [281, 521]], 240], [421, 1]),\n  ('normal control 8', [[[0, 120], [150, 210], [450, 690]], 180], [450, 2])],\n [('regression: window extension restarts guarantee 1', [[[1490, 1550], [1400, 1600]], 240], [240, 1]),\n  ('regression variant: window extension restarts guarantee 2',\n   [[[1400, 1640], [1610, 1850], [1640, 1655], [1430, 1630]], 120], [450, 1]),\n  ('partial repair guard 3', [[[250, 265], [100, 115]], 180], [180, 1]),\n  ('boundary control 4', [[[0, 30], [180, 200]], 180], [360, 2]), ('boundary control 5', [[], 180], [0, 0]),\n  ('normal control 6', [[[100, 300], [250, 265]], 180], [200, 1]),\n  ('normal control 7', [[[1000, 1060], [250, 310], [100, 220], [400, 600]], 180], [590, 3]),\n  ('normal control 8', [[[0, 120]], 180], [180, 1])]]\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-callback-minimum-guarantee-window-extension-restarts-guarantee","generated_at":"2026-09-29T14:52:00.032662+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Callback and show-up minimum-pay rules routinely double pay or underpay when callbacks cluster.","repair":"Inside an open window, extend only to the callback's actual end when later.","root_cause":"A callback inside an open window extends the window by its own guarantee.","sha256":"f3833c06c5ec33fee263f25c6b698aa655e8d65ac32021af0f9737265f3113ea","title":"Merged callback restarts a fresh guarantee · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":42.033,"exit_code":1,"observations":[{"actual":[200,1],"check":"regression: window extension restarts guarantee 1","expected":[200,1],"passed":true},{"actual":[599,2],"check":"regression variant: window extension restarts guarantee 2","expected":[599,2],"passed":true},{"actual":[435,2],"check":"partial repair guard 3","expected":[480,2],"passed":false},{"actual":[240,1],"check":"boundary control 4","expected":[240,1],"passed":true},{"actual":[360,2],"check":"boundary control 5","expected":[360,2],"passed":true},{"actual":[480,2],"check":"normal control 6","expected":[480,2],"passed":true},{"actual":[374,2],"check":"normal control 7","expected":[374,2],"passed":true},{"actual":[960,4],"check":"normal control 8","expected":[960,4],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: window extension restarts guarantee 1\", \"actual\": [200, 1], \"expected\": [200, 1], \"passed\": true}, {\"check\": \"regression variant: window extension restarts guarantee 2\", \"actual\": [599, 2], \"expected\": [599, 2], \"passed\": true}, {\"check\": \"partial repair guard 3\", \"actual\": [435, 2], \"expected\": [480, 2], \"passed\": false}, {\"check\": \"boundary control 4\", \"actual\": [240, 1], \"expected\": [240, 1], \"passed\": true}, {\"check\": \"boundary control 5\", \"actual\": [360, 2], \"expected\": [360, 2], \"passed\": true}, {\"check\": \"normal control 6\", \"actual\": [480, 2], \"expected\": [480, 2], \"passed\": true}, {\"check\": \"normal control 7\", \"actual\": [374, 2], \"expected\": [374, 2], \"passed\": true}, {\"check\": \"normal control 8\", \"actual\": [960, 4], \"expected\": [960, 4], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.589,"exit_code":1,"observations":[{"actual":[359,1],"check":"regression: window extension restarts guarantee 1","expected":[200,1],"passed":false},{"actual":[539,2],"check":"regression variant: window extension restarts guarantee 2","expected":[599,2],"passed":false},{"actual":[540,2],"check":"partial repair guard 3","expected":[480,2],"passed":false},{"actual":[240,1],"check":"boundary control 4","expected":[240,1],"passed":true},{"actual":[360,2],"check":"boundary control 5","expected":[360,2],"passed":true},{"actual":[480,2],"check":"normal control 6","expected":[480,2],"passed":true},{"actual":[538,1],"check":"normal control 7","expected":[374,2],"passed":false},{"actual":[960,4],"check":"normal control 8","expected":[960,4],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: window extension restarts guarantee 1\", \"actual\": [359, 1], \"expected\": [200, 1], \"passed\": false}, {\"check\": \"regression variant: window extension restarts guarantee 2\", \"actual\": [539, 2], \"expected\": [599, 2], \"passed\": false}, {\"check\": \"partial repair guard 3\", \"actual\": [540, 2], \"expected\": [480, 2], \"passed\": false}, {\"check\": \"boundary control 4\", \"actual\": [240, 1], \"expected\": [240, 1], \"passed\": true}, {\"check\": \"boundary control 5\", \"actual\": [360, 2], \"expected\": [360, 2], \"passed\": true}, {\"check\": \"normal control 6\", \"actual\": [480, 2], \"expected\": [480, 2], \"passed\": true}, {\"check\": \"normal control 7\", \"actual\": [538, 1], \"expected\": [374, 2], \"passed\": false}, {\"check\": \"normal control 8\", \"actual\": [960, 4], \"expected\": [960, 4], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":43.196,"exit_code":0,"observations":[{"actual":[200,1],"check":"regression: window extension restarts guarantee 1","expected":[200,1],"passed":true},{"actual":[599,2],"check":"regression variant: window extension restarts guarantee 2","expected":[599,2],"passed":true},{"actual":[480,2],"check":"partial repair guard 3","expected":[480,2],"passed":true},{"actual":[240,1],"check":"boundary control 4","expected":[240,1],"passed":true},{"actual":[360,2],"check":"boundary control 5","expected":[360,2],"passed":true},{"actual":[480,2],"check":"normal control 6","expected":[480,2],"passed":true},{"actual":[374,2],"check":"normal control 7","expected":[374,2],"passed":true},{"actual":[960,4],"check":"normal control 8","expected":[960,4],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: window extension restarts guarantee 1\", \"actual\": [200, 1], \"expected\": [200, 1], \"passed\": true}, {\"check\": \"regression variant: window extension restarts guarantee 2\", \"actual\": [599, 2], \"expected\": [599, 2], \"passed\": true}, {\"check\": \"partial repair guard 3\", \"actual\": [480, 2], \"expected\": [480, 2], \"passed\": true}, {\"check\": \"boundary control 4\", \"actual\": [240, 1], \"expected\": [240, 1], \"passed\": true}, {\"check\": \"boundary control 5\", \"actual\": [360, 2], \"expected\": [360, 2], \"passed\": true}, {\"check\": \"normal control 6\", \"actual\": [480, 2], \"expected\": [480, 2], \"passed\": true}, {\"check\": \"normal control 7\", \"actual\": [374, 2], \"expected\": [374, 2], \"passed\": true}, {\"check\": \"normal control 8\", \"actual\": [960, 4], \"expected\": [960, 4], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}