{"abstract":"No minute ever earns the night differential.","category":"Shift rostering labor rules","checks":8,"contract":"Shift [start, end] in minutes from Monday 00:00 and a base rate in cents per hour. Each minute earns base * (100 + pct) / 6000 cents where pct is 10 for 15:00-23:00, 15 for 23:00-07:00, else 0; on Saturday and Sunday (days 5 and 6) pct is the larger of that value and 12 (differentials do not stack). The exact total is rounded half up to a cent once.","contract_signature":"shift, base","evaluation_group":"w2-shift-rostering-labor-rules-shift-differential-pay","failed_approach":"Extending the window past 1440 cannot match minute-of-day values after midnight.","family":"w2-shift-rostering-labor-rules-shift-differential-pay-night-window-wrap","id":"FA-94046","implementations":{"attempt":{"sha256":"83929d6dcd541baf97a22c5693f6036c72c828488bf9eb398c0a526139fc6e8c","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(shift, base):\n    s, e = shift\n    total = 0\n    for t in range(s, e):\n        day = (t // 1440) % 7\n        m = t % 1440\n        pct = 0\n        if 900 <= m < 1380:\n            pct = 10\n        if 1380 <= m < 1860:\n            pct = 15\n        if day >= 5:\n            pct = max(pct, 12)\n        total += base * (100 + pct)\n    return (total + 3000) // 6000\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: night window wrap 1', [[6600, 7260], 2000], 24200),\n  ('regression variant: night window wrap 2', [[1800, 1880], 2000], 2967),\n  ('partial repair guard 3', [[9000, 9600], 90], 1011), ('boundary control 4', [[8580, 8700], 2000], 4600),\n  ('boundary control 5', [[900, 960], 1800], 1980), ('normal control 6', [[2061, 2541], 2000], 16670),\n  ('normal control 7', [[420, 480], 2000], 2000), ('normal control 8', [[4680, 5400], 90], 1121)],\n [('regression: night window wrap 1', [[7200, 7800], 2000], 22820),\n  ('regression variant: night window wrap 2', [[7560, 7800], 2000], 9020),\n  ('partial repair guard 3', [[8640, 9031], 1800], 13490), ('boundary control 4', [[0, 3], 10], 1),\n  ('boundary control 5', [[8580, 8700], 2000], 4600), ('normal control 6', [[2820, 3300], 2000], 18400),\n  ('normal control 7', [[9960, 10020], 1800], 2016), ('normal control 8', [[8040, 8760], 2150], 29090)],\n [('regression: night window wrap 1', [[8580, 8700], 2000], 4600),\n  ('regression variant: night window wrap 2', [[5700, 6180], 90], 828),\n  ('partial repair guard 3', [[8580, 9300], 60], 821), ('boundary control 4', [[6600, 7260], 2000], 24200),\n  ('boundary control 5', [[0, 3], 10], 1), ('normal control 6', [[9184, 9244], 2000], 2240),\n  ('normal control 7', [[9023, 9623], 1800], 20193), ('normal control 8', [[360, 1080], 1800], 22410)],\n [('regression: night window wrap 1', [[1320, 1500], 60], 204),\n  ('regression variant: night window wrap 2', [[1440, 2040], 90], 995),\n  ('partial repair guard 3', [[2820, 3394], 1999], 21523),\n  ('boundary control 4', [[6600, 7260], 2000], 24200), ('normal control 5', [[3780, 4380], 90], 999),\n  ('normal control 6', [[9480, 9960], 90], 806), ('normal control 7', [[4200, 4920], 90], 1197),\n  ('normal control 8', [[5160, 5760], 2150], 23543)],\n [('regression: night window wrap 1', [[6720, 7320], 1999], 22289),\n  ('regression variant: night window wrap 2', [[7200, 7920], 90], 1229),\n  ('partial repair guard 3', [[8580, 9215], 1999], 24175), ('boundary control 4', [[480, 960], 1999], 16192),\n  ('boundary control 5', [[1320, 1500], 60], 204), ('normal control 6', [[5220, 5280], 1800], 1980),\n  ('normal control 7', [[2400, 3120], 2000], 26900), ('normal control 8', [[2340, 2580], 1999], 8796)]]\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":"2d1b08a7666bba6fd0bfa6a0e02d91684ff3ce7298595703dee4a24c76c23484","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(shift, base):\n    s, e = shift\n    total = 0\n    for t in range(s, e):\n        day = (t // 1440) % 7\n        m = t % 1440\n        pct = 0\n        if 900 <= m < 1380:\n            pct = 10\n        if m >= 1380 and m < 420:\n            pct = 15\n        if day >= 5:\n            pct = max(pct, 12)\n        total += base * (100 + pct)\n    return (total + 3000) // 6000\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: night window wrap 1', [[6600, 7260], 2000], 24200),\n  ('regression variant: night window wrap 2', [[1800, 1880], 2000], 2967),\n  ('partial repair guard 3', [[9000, 9600], 90], 1011), ('boundary control 4', [[8580, 8700], 2000], 4600),\n  ('boundary control 5', [[900, 960], 1800], 1980), ('normal control 6', [[2061, 2541], 2000], 16670),\n  ('normal control 7', [[420, 480], 2000], 2000), ('normal control 8', [[4680, 5400], 90], 1121)],\n [('regression: night window wrap 1', [[7200, 7800], 2000], 22820),\n  ('regression variant: night window wrap 2', [[7560, 7800], 2000], 9020),\n  ('partial repair guard 3', [[8640, 9031], 1800], 13490), ('boundary control 4', [[0, 3], 10], 1),\n  ('boundary control 5', [[8580, 8700], 2000], 4600), ('normal control 6', [[2820, 3300], 2000], 18400),\n  ('normal control 7', [[9960, 10020], 1800], 2016), ('normal control 8', [[8040, 8760], 2150], 29090)],\n [('regression: night window wrap 1', [[8580, 8700], 2000], 4600),\n  ('regression variant: night window wrap 2', [[5700, 6180], 90], 828),\n  ('partial repair guard 3', [[8580, 9300], 60], 821), ('boundary control 4', [[6600, 7260], 2000], 24200),\n  ('boundary control 5', [[0, 3], 10], 1), ('normal control 6', [[9184, 9244], 2000], 2240),\n  ('normal control 7', [[9023, 9623], 1800], 20193), ('normal control 8', [[360, 1080], 1800], 22410)],\n [('regression: night window wrap 1', [[1320, 1500], 60], 204),\n  ('regression variant: night window wrap 2', [[1440, 2040], 90], 995),\n  ('partial repair guard 3', [[2820, 3394], 1999], 21523),\n  ('boundary control 4', [[6600, 7260], 2000], 24200), ('normal control 5', [[3780, 4380], 90], 999),\n  ('normal control 6', [[9480, 9960], 90], 806), ('normal control 7', [[4200, 4920], 90], 1197),\n  ('normal control 8', [[5160, 5760], 2150], 23543)],\n [('regression: night window wrap 1', [[6720, 7320], 1999], 22289),\n  ('regression variant: night window wrap 2', [[7200, 7920], 90], 1229),\n  ('partial repair guard 3', [[8580, 9215], 1999], 24175), ('boundary control 4', [[480, 960], 1999], 16192),\n  ('boundary control 5', [[1320, 1500], 60], 204), ('normal control 6', [[5220, 5280], 1800], 1980),\n  ('normal control 7', [[2400, 3120], 2000], 26900), ('normal control 8', [[2340, 2580], 1999], 8796)]]\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-shift-differential-pay-night-window-wrap","generated_at":"2026-09-29T14:52:00.675817+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Shift differential calculations are where roster data meets payroll; stacking and day attribution errors are common.","root_cause":"The wrapped night test combines both bounds with and.","sha256":"a7464e3b72fee521fb245e56d34be45ab02073f575560ab5b50437d4d8eefcb3","title":"Night differential window never matches across midnight · 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":41.077,"exit_code":1,"observations":[{"actual":24140,"check":"regression: night window wrap 1","expected":24200,"passed":false},{"actual":2667,"check":"regression variant: night window wrap 2","expected":2967,"passed":false},{"actual":1008,"check":"partial repair guard 3","expected":1011,"passed":false},{"actual":4540,"check":"boundary control 4","expected":4600,"passed":false},{"actual":1980,"check":"boundary control 5","expected":1980,"passed":true},{"actual":16670,"check":"normal control 6","expected":16670,"passed":true},{"actual":2000,"check":"normal control 7","expected":2000,"passed":true},{"actual":1107,"check":"normal control 8","expected":1121,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: night window wrap 1\", \"actual\": 24140, \"expected\": 24200, \"passed\": false}, {\"check\": \"regression variant: night window wrap 2\", \"actual\": 2667, \"expected\": 2967, \"passed\": false}, {\"check\": \"partial repair guard 3\", \"actual\": 1008, \"expected\": 1011, \"passed\": false}, {\"check\": \"boundary control 4\", \"actual\": 4540, \"expected\": 4600, \"passed\": false}, {\"check\": \"boundary control 5\", \"actual\": 1980, \"expected\": 1980, \"passed\": true}, {\"check\": \"normal control 6\", \"actual\": 16670, \"expected\": 16670, \"passed\": true}, {\"check\": \"normal control 7\", \"actual\": 2000, \"expected\": 2000, \"passed\": true}, {\"check\": \"normal control 8\", \"actual\": 1107, \"expected\": 1121, \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.145,"exit_code":1,"observations":[{"actual":23840,"check":"regression: night window wrap 1","expected":24200,"passed":false},{"actual":2667,"check":"regression variant: night window wrap 2","expected":2967,"passed":false},{"actual":1008,"check":"partial repair guard 3","expected":1011,"passed":false},{"actual":4480,"check":"boundary control 4","expected":4600,"passed":false},{"actual":1980,"check":"boundary control 5","expected":1980,"passed":true},{"actual":16670,"check":"normal control 6","expected":16670,"passed":true},{"actual":2000,"check":"normal control 7","expected":2000,"passed":true},{"actual":1107,"check":"normal control 8","expected":1121,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: night window wrap 1\", \"actual\": 23840, \"expected\": 24200, \"passed\": false}, {\"check\": \"regression variant: night window wrap 2\", \"actual\": 2667, \"expected\": 2967, \"passed\": false}, {\"check\": \"partial repair guard 3\", \"actual\": 1008, \"expected\": 1011, \"passed\": false}, {\"check\": \"boundary control 4\", \"actual\": 4480, \"expected\": 4600, \"passed\": false}, {\"check\": \"boundary control 5\", \"actual\": 1980, \"expected\": 1980, \"passed\": true}, {\"check\": \"normal control 6\", \"actual\": 16670, \"expected\": 16670, \"passed\": true}, {\"check\": \"normal control 7\", \"actual\": 2000, \"expected\": 2000, \"passed\": true}, {\"check\": \"normal control 8\", \"actual\": 1107, \"expected\": 1121, \"passed\": false}], \"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."}}