{"abstract":"A callback starting exactly when the previous guarantee ends gets no guarantee of its own.","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].","contract_signature":"callbacks, guarantee","evaluation_group":"w2-shift-rostering-labor-rules-callback-minimum-guarantee","failed_approach":"Merging only callbacks that finish inside the window opens a new window for a callback that started inside it.","family":"w2-shift-rostering-labor-rules-callback-minimum-guarantee-window-merge-boundary","id":"FA-93971","implementations":{"attempt":{"sha256":"ab8af0834c4e262b472db4eff5d12998890a3952e7f417ca028535e3bf6fd373","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 e < 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 merge boundary 1', [[[0, 30], [180, 200]], 180], [360, 2]),\n  ('regression variant: window merge boundary 2', [[[1580, 1595], [1400, 1415], [1760, 1820]], 180],\n   [540, 3]),\n  ('partial repair guard 3', [[[360, 600], [0, 30], [181, 241]], 180], [599, 2]),\n  ('boundary control 4', [[[0, 240]], 180], [240, 1]),\n  ('normal control 5', [[[1550, 1580], [2180, 2210], [1580, 1780], [1400, 1520]], 120], [470, 3]),\n  ('normal control 6', [[[661, 781], [181, 196], [481, 511], [0, 120]], 180], [720, 4]),\n  ('normal control 7', [[[30, 150], [0, 30]], 240], [240, 1]),\n  ('normal control 8', [[[1400, 1430]], 180], [180, 1])],\n [('regression: window merge boundary 1', [[[270, 300], [0, 60], [30, 270]], 180], [450, 2]),\n  ('regression variant: window merge boundary 2', [[[100, 160], [310, 370], [280, 340]], 180], [360, 2]),\n  ('partial repair guard 3', [[[180, 420], [0, 240], [480, 540]], 240], [660, 2]),\n  ('boundary control 4', [[], 180], [0, 0]), ('boundary control 5', [[[0, 30], [60, 400]], 180], [400, 1]),\n  ('normal control 6', [[[240, 300], [0, 30], [330, 390]], 120], [270, 2]),\n  ('normal control 7', [[[340, 370], [700, 820], [100, 130], [519, 719]], 120], [541, 3]),\n  ('normal control 8', [[[1490, 1610], [1400, 1520], [1580, 1610]], 120], [210, 1])],\n [('regression: window merge boundary 1', [[[280, 295], [100, 130], [130, 145]], 180], [360, 2]),\n  ('regression variant: window merge boundary 2', [[[640, 700], [100, 160], [340, 460]], 240], [720, 3]),\n  ('partial repair guard 3', [[[430, 630], [340, 580], [100, 130]], 180], [470, 2]),\n  ('boundary control 4', [[[0, 30], [179, 200]], 180], [200, 1]),\n  ('boundary control 5', [[[0, 30]], 180], [180, 1]), ('normal control 6', [[[1400, 1600]], 180], [200, 1]),\n  ('normal control 7', [[[0, 15]], 180], [180, 1]),\n  ('normal control 8', [[[100, 220], [700, 900]], 120], [320, 2])],\n [('regression: window merge boundary 1', [[[519, 549], [100, 340], [340, 580]], 240], [480, 2]),\n  ('regression variant: window merge boundary 2',\n   [[[1969, 2169], [1579, 1594], [1729, 1929], [1400, 1460]], 240], [720, 3]),\n  ('partial repair guard 3', [[[100, 115], [279, 519]], 240], [419, 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', [[[1579, 1639], [1400, 1430]], 120], [240, 2]),\n  ('normal control 7', [[[2150, 2270], [1400, 1640], [1550, 1790]], 240], [630, 2]),\n  ('normal control 8', [[[1729, 1849], [1579, 1699], [1400, 1430]], 240], [539, 2])],\n [('regression: window merge boundary 1', [[[1819, 1939], [1640, 1760], [1400, 1640]], 180], [539, 2]),\n  ('partial repair guard 2', [[[400, 415], [100, 340], [581, 641]], 240], [481, 2]),\n  ('boundary control 3', [[[0, 30], [180, 200]], 180], [360, 2]), ('boundary control 4', [[], 180], [0, 0]),\n  ('normal control 5', [[[100, 340], [190, 250]], 240], [240, 1]),\n  ('normal control 6', [[[1000, 1060], [250, 310], [100, 220], [400, 600]], 180], [590, 3]),\n  ('normal control 7', [[[100, 220], [762, 792], [462, 522], [281, 521]], 180], [601, 3]),\n  ('normal control 8', [[[0, 60]], 120], [120, 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":"20943a55734c9e310fde1bb22bff1f9ded4d61ad0b1f23f112bbade3c00a7f51","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 merge boundary 1', [[[0, 30], [180, 200]], 180], [360, 2]),\n  ('regression variant: window merge boundary 2', [[[1580, 1595], [1400, 1415], [1760, 1820]], 180],\n   [540, 3]),\n  ('partial repair guard 3', [[[360, 600], [0, 30], [181, 241]], 180], [599, 2]),\n  ('boundary control 4', [[[0, 240]], 180], [240, 1]),\n  ('normal control 5', [[[1550, 1580], [2180, 2210], [1580, 1780], [1400, 1520]], 120], [470, 3]),\n  ('normal control 6', [[[661, 781], [181, 196], [481, 511], [0, 120]], 180], [720, 4]),\n  ('normal control 7', [[[30, 150], [0, 30]], 240], [240, 1]),\n  ('normal control 8', [[[1400, 1430]], 180], [180, 1])],\n [('regression: window merge boundary 1', [[[270, 300], [0, 60], [30, 270]], 180], [450, 2]),\n  ('regression variant: window merge boundary 2', [[[100, 160], [310, 370], [280, 340]], 180], [360, 2]),\n  ('partial repair guard 3', [[[180, 420], [0, 240], [480, 540]], 240], [660, 2]),\n  ('boundary control 4', [[], 180], [0, 0]), ('boundary control 5', [[[0, 30], [60, 400]], 180], [400, 1]),\n  ('normal control 6', [[[240, 300], [0, 30], [330, 390]], 120], [270, 2]),\n  ('normal control 7', [[[340, 370], [700, 820], [100, 130], [519, 719]], 120], [541, 3]),\n  ('normal control 8', [[[1490, 1610], [1400, 1520], [1580, 1610]], 120], [210, 1])],\n [('regression: window merge boundary 1', [[[280, 295], [100, 130], [130, 145]], 180], [360, 2]),\n  ('regression variant: window merge boundary 2', [[[640, 700], [100, 160], [340, 460]], 240], [720, 3]),\n  ('partial repair guard 3', [[[430, 630], [340, 580], [100, 130]], 180], [470, 2]),\n  ('boundary control 4', [[[0, 30], [179, 200]], 180], [200, 1]),\n  ('boundary control 5', [[[0, 30]], 180], [180, 1]), ('normal control 6', [[[1400, 1600]], 180], [200, 1]),\n  ('normal control 7', [[[0, 15]], 180], [180, 1]),\n  ('normal control 8', [[[100, 220], [700, 900]], 120], [320, 2])],\n [('regression: window merge boundary 1', [[[519, 549], [100, 340], [340, 580]], 240], [480, 2]),\n  ('regression variant: window merge boundary 2',\n   [[[1969, 2169], [1579, 1594], [1729, 1929], [1400, 1460]], 240], [720, 3]),\n  ('partial repair guard 3', [[[100, 115], [279, 519]], 240], [419, 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', [[[1579, 1639], [1400, 1430]], 120], [240, 2]),\n  ('normal control 7', [[[2150, 2270], [1400, 1640], [1550, 1790]], 240], [630, 2]),\n  ('normal control 8', [[[1729, 1849], [1579, 1699], [1400, 1430]], 240], [539, 2])],\n [('regression: window merge boundary 1', [[[1819, 1939], [1640, 1760], [1400, 1640]], 180], [539, 2]),\n  ('partial repair guard 2', [[[400, 415], [100, 340], [581, 641]], 240], [481, 2]),\n  ('boundary control 3', [[[0, 30], [180, 200]], 180], [360, 2]), ('boundary control 4', [[], 180], [0, 0]),\n  ('normal control 5', [[[100, 340], [190, 250]], 240], [240, 1]),\n  ('normal control 6', [[[1000, 1060], [250, 310], [100, 220], [400, 600]], 180], [590, 3]),\n  ('normal control 7', [[[100, 220], [762, 792], [462, 522], [281, 521]], 180], [601, 3]),\n  ('normal control 8', [[[0, 60]], 120], [120, 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-merge-boundary","generated_at":"2026-09-29T14:52:00.030958+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.","root_cause":"The merge test is inclusive of the window end.","sha256":"07dad439c7f4d9f064506fe9c61c1c16714ac384a517bf4668017856a68a20a9","title":"Callback at the exact guarantee end merges into the old window · 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.925,"exit_code":1,"observations":[{"actual":[360,2],"check":"regression: window merge boundary 1","expected":[360,2],"passed":true},{"actual":[540,3],"check":"regression variant: window merge boundary 2","expected":[540,3],"passed":true},{"actual":[600,3],"check":"partial repair guard 3","expected":[599,2],"passed":false},{"actual":[240,1],"check":"boundary control 4","expected":[240,1],"passed":true},{"actual":[560,4],"check":"normal control 5","expected":[470,3],"passed":false},{"actual":[720,4],"check":"normal control 6","expected":[720,4],"passed":true},{"actual":[240,1],"check":"normal control 7","expected":[240,1],"passed":true},{"actual":[180,1],"check":"normal control 8","expected":[180,1],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: window merge boundary 1\", \"actual\": [360, 2], \"expected\": [360, 2], \"passed\": true}, {\"check\": \"regression variant: window merge boundary 2\", \"actual\": [540, 3], \"expected\": [540, 3], \"passed\": true}, {\"check\": \"partial repair guard 3\", \"actual\": [600, 3], \"expected\": [599, 2], \"passed\": false}, {\"check\": \"boundary control 4\", \"actual\": [240, 1], \"expected\": [240, 1], \"passed\": true}, {\"check\": \"normal control 5\", \"actual\": [560, 4], \"expected\": [470, 3], \"passed\": false}, {\"check\": \"normal control 6\", \"actual\": [720, 4], \"expected\": [720, 4], \"passed\": true}, {\"check\": \"normal control 7\", \"actual\": [240, 1], \"expected\": [240, 1], \"passed\": true}, {\"check\": \"normal control 8\", \"actual\": [180, 1], \"expected\": [180, 1], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.319,"exit_code":1,"observations":[{"actual":[200,1],"check":"regression: window merge boundary 1","expected":[360,2],"passed":false},{"actual":[375,2],"check":"regression variant: window merge boundary 2","expected":[540,3],"passed":false},{"actual":[599,2],"check":"partial repair guard 3","expected":[599,2],"passed":true},{"actual":[240,1],"check":"boundary control 4","expected":[240,1],"passed":true},{"actual":[470,3],"check":"normal control 5","expected":[470,3],"passed":true},{"actual":[660,3],"check":"normal control 6","expected":[720,4],"passed":false},{"actual":[240,1],"check":"normal control 7","expected":[240,1],"passed":true},{"actual":[180,1],"check":"normal control 8","expected":[180,1],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: window merge boundary 1\", \"actual\": [200, 1], \"expected\": [360, 2], \"passed\": false}, {\"check\": \"regression variant: window merge boundary 2\", \"actual\": [375, 2], \"expected\": [540, 3], \"passed\": false}, {\"check\": \"partial repair guard 3\", \"actual\": [599, 2], \"expected\": [599, 2], \"passed\": true}, {\"check\": \"boundary control 4\", \"actual\": [240, 1], \"expected\": [240, 1], \"passed\": true}, {\"check\": \"normal control 5\", \"actual\": [470, 3], \"expected\": [470, 3], \"passed\": true}, {\"check\": \"normal control 6\", \"actual\": [660, 3], \"expected\": [720, 4], \"passed\": false}, {\"check\": \"normal control 7\", \"actual\": [240, 1], \"expected\": [240, 1], \"passed\": true}, {\"check\": \"normal control 8\", \"actual\": [180, 1], \"expected\": [180, 1], \"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."}}