{"abstract":"A four-hour callback is paid only three hours.","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":"Adding the guarantee after the callback end overpays every callback.","family":"w2-shift-rostering-labor-rules-callback-minimum-guarantee-guarantee-floor","id":"FA-93981","implementations":{"attempt":{"sha256":"3d1ec8d0b774f95280c5252f4947c0153013a3ceeed854c6f0f3ac2086a3131d","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, e + 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: guarantee floor 1', [[[0, 240]], 180], [240, 1]),\n  ('regression variant: guarantee floor 2', [[[1819, 1939], [1640, 1760], [1400, 1640]], 180], [539, 2]),\n  ('partial repair guard 3', [[[1550, 1580], [2180, 2210], [1580, 1780], [1400, 1520]], 120], [470, 3]),\n  ('boundary control 4', [[[0, 30], [180, 200]], 180], [360, 2]),\n  ('normal control 5', [[[100, 300], [400, 520], [579, 609], [758, 998]], 120], [680, 4]),\n  ('normal control 6', [[[240, 300], [0, 30], [330, 390]], 120], [270, 2]),\n  ('normal control 7', [[[0, 200], [361, 421], [180, 380]], 120], [421, 1]),\n  ('normal control 8', [[[190, 430], [100, 340]], 180], [330, 1])],\n [('regression: guarantee floor 1', [[[0, 30], [481, 601], [181, 381], [661, 691]], 120], [560, 4]),\n  ('regression variant: guarantee floor 2', [[[100, 130], [1120, 1150], [880, 1120], [700, 715]], 180],\n   [780, 4]),\n  ('partial repair guard 3', [[[1430, 1490], [1400, 1430]], 240], [240, 1]),\n  ('boundary control 4', [[], 180], [0, 0]), ('boundary control 5', [[[0, 30], [60, 400]], 180], [400, 1]),\n  ('normal control 6', [[[0, 120], [181, 301]], 120], [240, 2]),\n  ('normal control 7', [[[1640, 1880], [1400, 1460]], 120], [360, 2]),\n  ('normal control 8', [[[100, 300], [220, 250], [190, 220]], 180], [200, 1])],\n [('regression: guarantee floor 1', [[[1580, 1595], [1760, 1960], [1400, 1460]], 120], [440, 3]),\n  ('regression variant: guarantee floor 2', [[[340, 370], [700, 820], [100, 130], [519, 719]], 120],\n   [541, 3]),\n  ('partial repair guard 3', [[[100, 340]], 120], [240, 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', [[[1579, 1699], [1759, 1774], [1400, 1430]], 240], [539, 2]),\n  ('normal control 7', [[[100, 300]], 120], [200, 1]),\n  ('normal control 8', [[[0, 120], [211, 241], [392, 452], [30, 230]], 120], [361, 2])],\n [('regression: guarantee floor 1', [[[100, 130], [340, 460], [521, 721]], 120], [440, 3]),\n  ('regression variant: guarantee floor 2', [[[1400, 1600], [2000, 2240]], 120], [440, 2]),\n  ('partial repair guard 3', [[[160, 280], [760, 820], [130, 250], [100, 340]], 120], [360, 2]),\n  ('boundary control 4', [[[300, 330], [0, 30]], 180], [360, 2]),\n  ('boundary control 5', [[[0, 240]], 180], [240, 1]),\n  ('normal control 6', [[[1400, 1520], [1550, 1580], [1640, 1670]], 240], [480, 2]),\n  ('normal control 7', [[[1640, 1700], [1400, 1640], [1670, 1700]], 180], [420, 2]),\n  ('normal control 8', [[[1400, 1600], [2271, 2286], [1581, 1596], [1671, 1791]], 120], [440, 3])],\n [('regression: guarantee floor 1', [[[100, 340]], 120], [240, 1]),\n  ('regression variant: guarantee floor 2', [[[1400, 1415], [1940, 2180], [1640, 1880], [2030, 2270]], 120],\n   [690, 3]),\n  ('partial repair guard 3', [[[280, 295], [880, 1120], [100, 340]], 120], [480, 2]),\n  ('boundary control 4', [[[0, 30], [180, 200]], 180], [360, 2]), ('boundary control 5', [[], 180], [0, 0]),\n  ('normal control 6', [[[100, 300], [281, 341], [762, 962], [581, 821]], 240], [622, 2]),\n  ('normal control 7', [[[1400, 1460], [1640, 1670]], 180], [360, 2]),\n  ('normal control 8', [[[310, 510], [130, 190], [491, 731], [100, 115]], 240], [631, 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":"05368f49c9e09c48ad725e6c9c031bc97f388c6902777c99d1f7028142a069ae","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, 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: guarantee floor 1', [[[0, 240]], 180], [240, 1]),\n  ('regression variant: guarantee floor 2', [[[1819, 1939], [1640, 1760], [1400, 1640]], 180], [539, 2]),\n  ('partial repair guard 3', [[[1550, 1580], [2180, 2210], [1580, 1780], [1400, 1520]], 120], [470, 3]),\n  ('boundary control 4', [[[0, 30], [180, 200]], 180], [360, 2]),\n  ('normal control 5', [[[100, 300], [400, 520], [579, 609], [758, 998]], 120], [680, 4]),\n  ('normal control 6', [[[240, 300], [0, 30], [330, 390]], 120], [270, 2]),\n  ('normal control 7', [[[0, 200], [361, 421], [180, 380]], 120], [421, 1]),\n  ('normal control 8', [[[190, 430], [100, 340]], 180], [330, 1])],\n [('regression: guarantee floor 1', [[[0, 30], [481, 601], [181, 381], [661, 691]], 120], [560, 4]),\n  ('regression variant: guarantee floor 2', [[[100, 130], [1120, 1150], [880, 1120], [700, 715]], 180],\n   [780, 4]),\n  ('partial repair guard 3', [[[1430, 1490], [1400, 1430]], 240], [240, 1]),\n  ('boundary control 4', [[], 180], [0, 0]), ('boundary control 5', [[[0, 30], [60, 400]], 180], [400, 1]),\n  ('normal control 6', [[[0, 120], [181, 301]], 120], [240, 2]),\n  ('normal control 7', [[[1640, 1880], [1400, 1460]], 120], [360, 2]),\n  ('normal control 8', [[[100, 300], [220, 250], [190, 220]], 180], [200, 1])],\n [('regression: guarantee floor 1', [[[1580, 1595], [1760, 1960], [1400, 1460]], 120], [440, 3]),\n  ('regression variant: guarantee floor 2', [[[340, 370], [700, 820], [100, 130], [519, 719]], 120],\n   [541, 3]),\n  ('partial repair guard 3', [[[100, 340]], 120], [240, 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', [[[1579, 1699], [1759, 1774], [1400, 1430]], 240], [539, 2]),\n  ('normal control 7', [[[100, 300]], 120], [200, 1]),\n  ('normal control 8', [[[0, 120], [211, 241], [392, 452], [30, 230]], 120], [361, 2])],\n [('regression: guarantee floor 1', [[[100, 130], [340, 460], [521, 721]], 120], [440, 3]),\n  ('regression variant: guarantee floor 2', [[[1400, 1600], [2000, 2240]], 120], [440, 2]),\n  ('partial repair guard 3', [[[160, 280], [760, 820], [130, 250], [100, 340]], 120], [360, 2]),\n  ('boundary control 4', [[[300, 330], [0, 30]], 180], [360, 2]),\n  ('boundary control 5', [[[0, 240]], 180], [240, 1]),\n  ('normal control 6', [[[1400, 1520], [1550, 1580], [1640, 1670]], 240], [480, 2]),\n  ('normal control 7', [[[1640, 1700], [1400, 1640], [1670, 1700]], 180], [420, 2]),\n  ('normal control 8', [[[1400, 1600], [2271, 2286], [1581, 1596], [1671, 1791]], 120], [440, 3])],\n [('regression: guarantee floor 1', [[[100, 340]], 120], [240, 1]),\n  ('regression variant: guarantee floor 2', [[[1400, 1415], [1940, 2180], [1640, 1880], [2030, 2270]], 120],\n   [690, 3]),\n  ('partial repair guard 3', [[[280, 295], [880, 1120], [100, 340]], 120], [480, 2]),\n  ('boundary control 4', [[[0, 30], [180, 200]], 180], [360, 2]), ('boundary control 5', [[], 180], [0, 0]),\n  ('normal control 6', [[[100, 300], [281, 341], [762, 962], [581, 821]], 240], [622, 2]),\n  ('normal control 7', [[[1400, 1460], [1640, 1670]], 180], [360, 2]),\n  ('normal control 8', [[[310, 510], [130, 190], [491, 731], [100, 115]], 240], [631, 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":"37f834897d46d19d5309ca2fb90933e763eae312c4c9f087fccea80d3a8f4a2a","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: guarantee floor 1', [[[0, 240]], 180], [240, 1]),\n  ('regression variant: guarantee floor 2', [[[1819, 1939], [1640, 1760], [1400, 1640]], 180], [539, 2]),\n  ('partial repair guard 3', [[[1550, 1580], [2180, 2210], [1580, 1780], [1400, 1520]], 120], [470, 3]),\n  ('boundary control 4', [[[0, 30], [180, 200]], 180], [360, 2]),\n  ('normal control 5', [[[100, 300], [400, 520], [579, 609], [758, 998]], 120], [680, 4]),\n  ('normal control 6', [[[240, 300], [0, 30], [330, 390]], 120], [270, 2]),\n  ('normal control 7', [[[0, 200], [361, 421], [180, 380]], 120], [421, 1]),\n  ('normal control 8', [[[190, 430], [100, 340]], 180], [330, 1])],\n [('regression: guarantee floor 1', [[[0, 30], [481, 601], [181, 381], [661, 691]], 120], [560, 4]),\n  ('regression variant: guarantee floor 2', [[[100, 130], [1120, 1150], [880, 1120], [700, 715]], 180],\n   [780, 4]),\n  ('partial repair guard 3', [[[1430, 1490], [1400, 1430]], 240], [240, 1]),\n  ('boundary control 4', [[], 180], [0, 0]), ('boundary control 5', [[[0, 30], [60, 400]], 180], [400, 1]),\n  ('normal control 6', [[[0, 120], [181, 301]], 120], [240, 2]),\n  ('normal control 7', [[[1640, 1880], [1400, 1460]], 120], [360, 2]),\n  ('normal control 8', [[[100, 300], [220, 250], [190, 220]], 180], [200, 1])],\n [('regression: guarantee floor 1', [[[1580, 1595], [1760, 1960], [1400, 1460]], 120], [440, 3]),\n  ('regression variant: guarantee floor 2', [[[340, 370], [700, 820], [100, 130], [519, 719]], 120],\n   [541, 3]),\n  ('partial repair guard 3', [[[100, 340]], 120], [240, 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', [[[1579, 1699], [1759, 1774], [1400, 1430]], 240], [539, 2]),\n  ('normal control 7', [[[100, 300]], 120], [200, 1]),\n  ('normal control 8', [[[0, 120], [211, 241], [392, 452], [30, 230]], 120], [361, 2])],\n [('regression: guarantee floor 1', [[[100, 130], [340, 460], [521, 721]], 120], [440, 3]),\n  ('regression variant: guarantee floor 2', [[[1400, 1600], [2000, 2240]], 120], [440, 2]),\n  ('partial repair guard 3', [[[160, 280], [760, 820], [130, 250], [100, 340]], 120], [360, 2]),\n  ('boundary control 4', [[[300, 330], [0, 30]], 180], [360, 2]),\n  ('boundary control 5', [[[0, 240]], 180], [240, 1]),\n  ('normal control 6', [[[1400, 1520], [1550, 1580], [1640, 1670]], 240], [480, 2]),\n  ('normal control 7', [[[1640, 1700], [1400, 1640], [1670, 1700]], 180], [420, 2]),\n  ('normal control 8', [[[1400, 1600], [2271, 2286], [1581, 1596], [1671, 1791]], 120], [440, 3])],\n [('regression: guarantee floor 1', [[[100, 340]], 120], [240, 1]),\n  ('regression variant: guarantee floor 2', [[[1400, 1415], [1940, 2180], [1640, 1880], [2030, 2270]], 120],\n   [690, 3]),\n  ('partial repair guard 3', [[[280, 295], [880, 1120], [100, 340]], 120], [480, 2]),\n  ('boundary control 4', [[[0, 30], [180, 200]], 180], [360, 2]), ('boundary control 5', [[], 180], [0, 0]),\n  ('normal control 6', [[[100, 300], [281, 341], [762, 962], [581, 821]], 240], [622, 2]),\n  ('normal control 7', [[[1400, 1460], [1640, 1670]], 180], [360, 2]),\n  ('normal control 8', [[[310, 510], [130, 190], [491, 731], [100, 115]], 240], [631, 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-guarantee-floor","generated_at":"2026-09-29T14:52:00.074650+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":"Window end is the later of callback end and start plus guarantee.","root_cause":"The window end ignores callbacks longer than the guarantee.","sha256":"4f605554a259e95be036f3eabe4bc0cb7c05e5b0cac908e6467d744f6d946015","title":"Long callback truncated at the minimum guarantee · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":42.908,"exit_code":1,"observations":[{"actual":[420,1],"check":"regression: guarantee floor 1","expected":[240,1],"passed":false},{"actual":[539,1],"check":"regression variant: guarantee floor 2","expected":[539,2],"passed":false},{"actual":[530,2],"check":"partial repair guard 3","expected":[470,3],"passed":false},{"actual":[210,1],"check":"boundary control 4","expected":[360,2],"passed":false},{"actual":[930,3],"check":"normal control 5","expected":[680,4],"passed":false},{"actual":[330,2],"check":"normal control 6","expected":[270,2],"passed":false},{"actual":[421,1],"check":"normal control 7","expected":[421,1],"passed":true},{"actual":[420,1],"check":"normal control 8","expected":[330,1],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: guarantee floor 1\", \"actual\": [420, 1], \"expected\": [240, 1], \"passed\": false}, {\"check\": \"regression variant: guarantee floor 2\", \"actual\": [539, 1], \"expected\": [539, 2], \"passed\": false}, {\"check\": \"partial repair guard 3\", \"actual\": [530, 2], \"expected\": [470, 3], \"passed\": false}, {\"check\": \"boundary control 4\", \"actual\": [210, 1], \"expected\": [360, 2], \"passed\": false}, {\"check\": \"normal control 5\", \"actual\": [930, 3], \"expected\": [680, 4], \"passed\": false}, {\"check\": \"normal control 6\", \"actual\": [330, 2], \"expected\": [270, 2], \"passed\": false}, {\"check\": \"normal control 7\", \"actual\": [421, 1], \"expected\": [421, 1], \"passed\": true}, {\"check\": \"normal control 8\", \"actual\": [420, 1], \"expected\": [330, 1], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.206,"exit_code":1,"observations":[{"actual":[180,1],"check":"regression: guarantee floor 1","expected":[240,1],"passed":false},{"actual":[479,2],"check":"regression variant: guarantee floor 2","expected":[539,2],"passed":false},{"actual":[470,3],"check":"partial repair guard 3","expected":[470,3],"passed":true},{"actual":[360,2],"check":"boundary control 4","expected":[360,2],"passed":true},{"actual":[480,4],"check":"normal control 5","expected":[680,4],"passed":false},{"actual":[270,2],"check":"normal control 6","expected":[270,2],"passed":true},{"actual":[360,3],"check":"normal control 7","expected":[421,1],"passed":false},{"actual":[330,1],"check":"normal control 8","expected":[330,1],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: guarantee floor 1\", \"actual\": [180, 1], \"expected\": [240, 1], \"passed\": false}, {\"check\": \"regression variant: guarantee floor 2\", \"actual\": [479, 2], \"expected\": [539, 2], \"passed\": false}, {\"check\": \"partial repair guard 3\", \"actual\": [470, 3], \"expected\": [470, 3], \"passed\": true}, {\"check\": \"boundary control 4\", \"actual\": [360, 2], \"expected\": [360, 2], \"passed\": true}, {\"check\": \"normal control 5\", \"actual\": [480, 4], \"expected\": [680, 4], \"passed\": false}, {\"check\": \"normal control 6\", \"actual\": [270, 2], \"expected\": [270, 2], \"passed\": true}, {\"check\": \"normal control 7\", \"actual\": [360, 3], \"expected\": [421, 1], \"passed\": false}, {\"check\": \"normal control 8\", \"actual\": [330, 1], \"expected\": [330, 1], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":40.464,"exit_code":0,"observations":[{"actual":[240,1],"check":"regression: guarantee floor 1","expected":[240,1],"passed":true},{"actual":[539,2],"check":"regression variant: guarantee floor 2","expected":[539,2],"passed":true},{"actual":[470,3],"check":"partial repair guard 3","expected":[470,3],"passed":true},{"actual":[360,2],"check":"boundary control 4","expected":[360,2],"passed":true},{"actual":[680,4],"check":"normal control 5","expected":[680,4],"passed":true},{"actual":[270,2],"check":"normal control 6","expected":[270,2],"passed":true},{"actual":[421,1],"check":"normal control 7","expected":[421,1],"passed":true},{"actual":[330,1],"check":"normal control 8","expected":[330,1],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: guarantee floor 1\", \"actual\": [240, 1], \"expected\": [240, 1], \"passed\": true}, {\"check\": \"regression variant: guarantee floor 2\", \"actual\": [539, 2], \"expected\": [539, 2], \"passed\": true}, {\"check\": \"partial repair guard 3\", \"actual\": [470, 3], \"expected\": [470, 3], \"passed\": true}, {\"check\": \"boundary control 4\", \"actual\": [360, 2], \"expected\": [360, 2], \"passed\": true}, {\"check\": \"normal control 5\", \"actual\": [680, 4], \"expected\": [680, 4], \"passed\": true}, {\"check\": \"normal control 6\", \"actual\": [270, 2], \"expected\": [270, 2], \"passed\": true}, {\"check\": \"normal control 7\", \"actual\": [421, 1], \"expected\": [421, 1], \"passed\": true}, {\"check\": \"normal control 8\", \"actual\": [330, 1], \"expected\": [330, 1], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}