{"abstract":"Shift pay that ends in half a cent or more loses a cent.","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":"round() applies banker's rounding to exact half cents.","family":"w2-shift-rostering-labor-rules-shift-differential-pay-differential-rounding","id":"FA-94051","implementations":{"attempt":{"sha256":"d73b9d15c60f887e8ea31c12a0d8db2539c53d9fce7979d80c54aacda874b6fe","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 or m < 420:\n            pct = 15\n        if day >= 5:\n            pct = max(pct, 12)\n        total += base * (100 + pct)\n    return round(total / 6000)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: differential rounding 1', [[0, 1], 30], 1),\n  ('regression variant: differential rounding 2', [[2880, 2940], 2150], 2473),\n  ('partial repair guard 3', [[9600, 10320], 2150], 29219),\n  ('boundary control 4', [[8580, 8700], 2000], 4600), ('boundary control 5', [[900, 960], 1800], 1980),\n  ('normal control 6', [[3840, 4440], 2000], 22300), ('normal control 7', [[2061, 2541], 2000], 16670),\n  ('normal control 8', [[7620, 7860], 90], 403)],\n [('regression: differential rounding 1', [[0, 3], 10], 1),\n  ('regression variant: differential rounding 2', [[9960, 10020], 90], 101),\n  ('partial repair guard 3', [[6720, 7200], 90], 797), ('boundary control 4', [[8580, 8700], 2000], 4600),\n  ('normal control 5', [[7620, 8340], 2000], 26880), ('normal control 6', [[1800, 2280], 2000], 16300),\n  ('normal control 7', [[8313, 8373], 60], 67), ('normal control 8', [[7620, 8220], 2000], 22400)],\n [('regression: differential rounding 1', [[480, 960], 1999], 16192),\n  ('regression variant: differential rounding 2', [[7200, 7920], 90], 1229),\n  ('partial repair guard 3', [[9540, 10224], 2150], 27671),\n  ('boundary control 4', [[6600, 7260], 2000], 24200), ('boundary control 5', [[0, 3], 10], 1),\n  ('normal control 6', [[4561, 4804], 60], 270), ('normal control 7', [[4200, 4680], 60], 549),\n  ('normal control 8', [[3780, 4380], 2000], 22200)],\n [('regression: differential rounding 1', [[6720, 7320], 1999], 22289),\n  ('regression variant: differential rounding 2', [[9600, 10320], 2150], 29219),\n  ('partial repair guard 3', [[1800, 2040], 2150], 8923), ('boundary control 4', [[1320, 1500], 60], 204),\n  ('boundary control 5', [[6600, 7260], 2000], 24200), ('normal control 6', [[9480, 10080], 60], 674),\n  ('normal control 7', [[2340, 3060], 90], 1206), ('normal control 8', [[7080, 7140], 1999], 2199)],\n [('regression: differential rounding 1', [[9000, 9600], 90], 1011),\n  ('regression variant: differential rounding 2', [[5220, 5775], 2150], 22011),\n  ('partial repair guard 3', [[1440, 2040], 90], 995), ('boundary control 4', [[480, 960], 1999], 16192),\n  ('boundary control 5', [[1320, 1500], 60], 204), ('normal control 6', [[5763, 5823], 60], 69),\n  ('normal control 7', [[8040, 8520], 2150], 19264), ('normal control 8', [[9540, 10020], 1999], 17911)]]\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":"e90d432b3a6ed7f6f3a5ce1b7a9a7ac2f4e6f3e7835a1eabab21d7d3b8829b4e","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 or m < 420:\n            pct = 15\n        if day >= 5:\n            pct = max(pct, 12)\n        total += base * (100 + pct)\n    return total // 6000\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: differential rounding 1', [[0, 1], 30], 1),\n  ('regression variant: differential rounding 2', [[2880, 2940], 2150], 2473),\n  ('partial repair guard 3', [[9600, 10320], 2150], 29219),\n  ('boundary control 4', [[8580, 8700], 2000], 4600), ('boundary control 5', [[900, 960], 1800], 1980),\n  ('normal control 6', [[3840, 4440], 2000], 22300), ('normal control 7', [[2061, 2541], 2000], 16670),\n  ('normal control 8', [[7620, 7860], 90], 403)],\n [('regression: differential rounding 1', [[0, 3], 10], 1),\n  ('regression variant: differential rounding 2', [[9960, 10020], 90], 101),\n  ('partial repair guard 3', [[6720, 7200], 90], 797), ('boundary control 4', [[8580, 8700], 2000], 4600),\n  ('normal control 5', [[7620, 8340], 2000], 26880), ('normal control 6', [[1800, 2280], 2000], 16300),\n  ('normal control 7', [[8313, 8373], 60], 67), ('normal control 8', [[7620, 8220], 2000], 22400)],\n [('regression: differential rounding 1', [[480, 960], 1999], 16192),\n  ('regression variant: differential rounding 2', [[7200, 7920], 90], 1229),\n  ('partial repair guard 3', [[9540, 10224], 2150], 27671),\n  ('boundary control 4', [[6600, 7260], 2000], 24200), ('boundary control 5', [[0, 3], 10], 1),\n  ('normal control 6', [[4561, 4804], 60], 270), ('normal control 7', [[4200, 4680], 60], 549),\n  ('normal control 8', [[3780, 4380], 2000], 22200)],\n [('regression: differential rounding 1', [[6720, 7320], 1999], 22289),\n  ('regression variant: differential rounding 2', [[9600, 10320], 2150], 29219),\n  ('partial repair guard 3', [[1800, 2040], 2150], 8923), ('boundary control 4', [[1320, 1500], 60], 204),\n  ('boundary control 5', [[6600, 7260], 2000], 24200), ('normal control 6', [[9480, 10080], 60], 674),\n  ('normal control 7', [[2340, 3060], 90], 1206), ('normal control 8', [[7080, 7140], 1999], 2199)],\n [('regression: differential rounding 1', [[9000, 9600], 90], 1011),\n  ('regression variant: differential rounding 2', [[5220, 5775], 2150], 22011),\n  ('partial repair guard 3', [[1440, 2040], 90], 995), ('boundary control 4', [[480, 960], 1999], 16192),\n  ('boundary control 5', [[1320, 1500], 60], 204), ('normal control 6', [[5763, 5823], 60], 69),\n  ('normal control 7', [[8040, 8520], 2150], 19264), ('normal control 8', [[9540, 10020], 1999], 17911)]]\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-differential-rounding","generated_at":"2026-09-29T14:52:00.712009+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 exact total is floor-divided.","sha256":"db30892a76144d81855f95eb6bcc26108c14813f5c9a329ed5a3754a1fac3ce7","title":"Differential pay truncated to the cent · 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":39.644,"exit_code":1,"observations":[{"actual":1,"check":"regression: differential rounding 1","expected":1,"passed":true},{"actual":2472,"check":"regression variant: differential rounding 2","expected":2473,"passed":false},{"actual":29218,"check":"partial repair guard 3","expected":29219,"passed":false},{"actual":4600,"check":"boundary control 4","expected":4600,"passed":true},{"actual":1980,"check":"boundary control 5","expected":1980,"passed":true},{"actual":22300,"check":"normal control 6","expected":22300,"passed":true},{"actual":16670,"check":"normal control 7","expected":16670,"passed":true},{"actual":403,"check":"normal control 8","expected":403,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: differential rounding 1\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"regression variant: differential rounding 2\", \"actual\": 2472, \"expected\": 2473, \"passed\": false}, {\"check\": \"partial repair guard 3\", \"actual\": 29218, \"expected\": 29219, \"passed\": false}, {\"check\": \"boundary control 4\", \"actual\": 4600, \"expected\": 4600, \"passed\": true}, {\"check\": \"boundary control 5\", \"actual\": 1980, \"expected\": 1980, \"passed\": true}, {\"check\": \"normal control 6\", \"actual\": 22300, \"expected\": 22300, \"passed\": true}, {\"check\": \"normal control 7\", \"actual\": 16670, \"expected\": 16670, \"passed\": true}, {\"check\": \"normal control 8\", \"actual\": 403, \"expected\": 403, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.607,"exit_code":1,"observations":[{"actual":0,"check":"regression: differential rounding 1","expected":1,"passed":false},{"actual":2472,"check":"regression variant: differential rounding 2","expected":2473,"passed":false},{"actual":29218,"check":"partial repair guard 3","expected":29219,"passed":false},{"actual":4600,"check":"boundary control 4","expected":4600,"passed":true},{"actual":1980,"check":"boundary control 5","expected":1980,"passed":true},{"actual":22300,"check":"normal control 6","expected":22300,"passed":true},{"actual":16670,"check":"normal control 7","expected":16670,"passed":true},{"actual":403,"check":"normal control 8","expected":403,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: differential rounding 1\", \"actual\": 0, \"expected\": 1, \"passed\": false}, {\"check\": \"regression variant: differential rounding 2\", \"actual\": 2472, \"expected\": 2473, \"passed\": false}, {\"check\": \"partial repair guard 3\", \"actual\": 29218, \"expected\": 29219, \"passed\": false}, {\"check\": \"boundary control 4\", \"actual\": 4600, \"expected\": 4600, \"passed\": true}, {\"check\": \"boundary control 5\", \"actual\": 1980, \"expected\": 1980, \"passed\": true}, {\"check\": \"normal control 6\", \"actual\": 22300, \"expected\": 22300, \"passed\": true}, {\"check\": \"normal control 7\", \"actual\": 16670, \"expected\": 16670, \"passed\": true}, {\"check\": \"normal control 8\", \"actual\": 403, \"expected\": 403, \"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."}}