{"abstract":"Weeks with long days move extra regular minutes into overtime, even making regular minutes negative.","category":"Shift rostering labor rules","checks":8,"contract":"Seven daily worked minutes (Mon..Sun) and an hourly rate in cents. Daily: first 480 minutes regular, next 240 at 1.5x, beyond 720 at 2x. If all seven days are worked, day 7 pays its first 480 minutes at 1.5x and the rest at 2x. Regular minutes above 2400 in the week move to 1.5x (daily overtime minutes never count toward the weekly threshold). Pay is computed exactly and rounded half up to a cent once. Return [regular, ot15, ot2, pay_cents].","contract_signature":"days, rate","evaluation_group":"w2-shift-rostering-labor-rules-daily-weekly-overtime","failed_approach":"Adding the 1.5x minutes to the weekly base still double counts daily overtime.","family":"w2-shift-rostering-labor-rules-daily-weekly-overtime-weekly-threshold-pyramiding","id":"FA-93881","implementations":{"attempt":{"sha256":"e76dd972ec8522548e5f51bbde7b4ce4957f3f7501cbef2ab75342de52a7f619","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(days, rate):\n    reg = ot15 = ot2 = 0\n    seventh = all(m > 0 for m in days)\n    for d, m in enumerate(days):\n        if d == 6 and seventh:\n            ot15 += min(m, 480)\n            ot2 += max(m - 480, 0)\n            continue\n        reg += min(m, 480)\n        ot15 += min(max(m - 480, 0), 240)\n        ot2 += max(m - 720, 0)\n    excess = max(reg + ot15 - 2400, 0)\n    reg -= excess\n    ot15 += excess\n    units = reg * rate * 2 + ot15 * rate * 3 + ot2 * rate * 4\n    pay = (units + 60) // 120\n    return [reg, ot15, ot2, pay]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: weekly threshold pyramiding 1', [[480, 480, 480, 480, 480, 480, 480], 2000],\n   [2400, 960, 0, 128000]),\n  ('regression variant: weekly threshold pyramiding 2', [[0, 450, 480, 480, 540, 481, 540], 2000],\n   [2400, 571, 0, 108550]),\n  ('partial repair guard 3', [[480, 510, 300, 600, 300, 510, 300], 2250], [2400, 600, 0, 123750]),\n  ('boundary control 4', [[480, 480, 480, 480, 480, 480, 0], 2000], [2400, 480, 0, 104000]),\n  ('boundary control 5', [[9, 0, 0, 0, 0, 0, 0], 30], [9, 0, 0, 5]),\n  ('normal control 6', [[540, 540, 780, 240, 480, 480, 0], 90], [2400, 600, 60, 5130]),\n  ('normal control 7', [[900, 721, 0, 900, 481, 450, 780], 30], [2400, 1411, 421, 2679]),\n  ('normal control 8', [[721, 0, 813, 720, 600, 780, 480], 1810], [2400, 1560, 154, 152281])],\n [('regression: weekly threshold pyramiding 1', [[600, 600, 600, 600, 600, 0, 0], 1500],\n   [2400, 600, 0, 82500]),\n  ('regression variant: weekly threshold pyramiding 2', [[600, 480, 600, 510, 300, 300, 300], 1500],\n   [2400, 690, 0, 85875]),\n  ('partial repair guard 3', [[600, 481, 0, 540, 0, 450, 720], 2250], [2370, 421, 0, 112556]),\n  ('boundary control 4', [[0, 480, 480, 480, 480, 480, 480], 1500], [2400, 480, 0, 78000]),\n  ('boundary control 5', [[480, 480, 480, 480, 480, 480, 0], 2000], [2400, 480, 0, 104000]),\n  ('normal control 6', [[600, 707, 480, 0, 240, 506, 600], 2250], [2400, 733, 0, 131231]),\n  ('normal control 7', [[721, 211, 0, 720, 780, 721, 780], 2250], [2400, 1411, 122, 178519]),\n  ('normal control 8', [[480, 510, 300, 600, 300, 510, 300], 2250], [2400, 600, 0, 123750])],\n [('regression: weekly threshold pyramiding 1', [[540, 540, 540, 540, 540, 540, 60], 2000],\n   [2400, 900, 0, 125000]),\n  ('regression variant: weekly threshold pyramiding 2', [[540, 176, 0, 780, 450, 0, 481], 2250],\n   [2066, 301, 60, 98906]),\n  ('partial repair guard 3', [[600, 480, 600, 510, 300, 300, 300], 1500], [2400, 690, 0, 85875]),\n  ('boundary control 4', [[27, 0, 0, 0, 0, 0, 0], 30], [27, 0, 0, 14]),\n  ('boundary control 5', [[0, 480, 480, 480, 480, 480, 480], 1500], [2400, 480, 0, 78000]),\n  ('normal control 6', [[780, 540, 0, 0, 450, 481, 540], 90], [2370, 361, 60, 4547]),\n  ('normal control 7', [[600, 240, 900, 780, 0, 240, 590], 30], [2400, 710, 240, 1973]),\n  ('normal control 8', [[450, 450, 780, 721, 480, 450, 525], 2250], [2400, 1350, 106, 173888])],\n [('regression: weekly threshold pyramiding 1', [[300, 600, 300, 600, 510, 600, 480], 90],\n   [2400, 990, 0, 5828]),\n  ('regression variant: weekly threshold pyramiding 2', [[510, 510, 600, 480, 300, 600, 480], 1725],\n   [2400, 1080, 0, 115575]),\n  ('partial repair guard 3', [[540, 480, 240, 780, 600, 481, 0], 90], [2400, 661, 60, 5267]),\n  ('boundary control 4', [[600, 600, 600, 600, 600, 0, 0], 1500], [2400, 600, 0, 82500]),\n  ('boundary control 5', [[27, 0, 0, 0, 0, 0, 0], 30], [27, 0, 0, 14]),\n  ('normal control 6', [[900, 720, 0, 480, 450, 240, 600], 2250], [2400, 810, 180, 149063]),\n  ('normal control 7', [[721, 450, 540, 0, 190, 480, 900], 90], [2400, 700, 181, 5718]),\n  ('normal control 8', [[300, 510, 300, 510, 300, 480, 600], 2250], [2340, 540, 120, 127125])],\n [('regression: weekly threshold pyramiding 1', [[300, 600, 510, 600, 510, 600, 600], 1810],\n   [2400, 1200, 120, 133940]),\n  ('regression variant: weekly threshold pyramiding 2', [[510, 600, 480, 300, 510, 480, 300], 1725],\n   [2400, 780, 0, 102638]),\n  ('partial repair guard 3', [[450, 0, 908, 480, 721, 540, 540], 2250], [2400, 1050, 189, 163238]),\n  ('boundary control 4', [[540, 540, 540, 540, 540, 540, 60], 2000], [2400, 900, 0, 125000]),\n  ('boundary control 5', [[600, 600, 600, 600, 600, 0, 0], 1500], [2400, 600, 0, 82500]),\n  ('normal control 6', [[480, 480, 480, 480, 300, 480, 510], 90], [2400, 780, 30, 5445]),\n  ('normal control 7', [[240, 721, 780, 900, 900, 600, 721], 1810], [2400, 1800, 662, 193791]),\n  ('normal control 8', [[240, 240, 720, 240, 720, 450, 540], 1810], [2130, 960, 60, 111315])]]\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":"273061aee1d2f9a1b2a77499221007106933d105144e893b5cb68747f74ea9c7","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(days, rate):\n    reg = ot15 = ot2 = 0\n    seventh = all(m > 0 for m in days)\n    for d, m in enumerate(days):\n        if d == 6 and seventh:\n            ot15 += min(m, 480)\n            ot2 += max(m - 480, 0)\n            continue\n        reg += min(m, 480)\n        ot15 += min(max(m - 480, 0), 240)\n        ot2 += max(m - 720, 0)\n    excess = max(sum(days) - 2400, 0)\n    reg -= excess\n    ot15 += excess\n    units = reg * rate * 2 + ot15 * rate * 3 + ot2 * rate * 4\n    pay = (units + 60) // 120\n    return [reg, ot15, ot2, pay]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: weekly threshold pyramiding 1', [[480, 480, 480, 480, 480, 480, 480], 2000],\n   [2400, 960, 0, 128000]),\n  ('regression variant: weekly threshold pyramiding 2', [[0, 450, 480, 480, 540, 481, 540], 2000],\n   [2400, 571, 0, 108550]),\n  ('partial repair guard 3', [[480, 510, 300, 600, 300, 510, 300], 2250], [2400, 600, 0, 123750]),\n  ('boundary control 4', [[480, 480, 480, 480, 480, 480, 0], 2000], [2400, 480, 0, 104000]),\n  ('boundary control 5', [[9, 0, 0, 0, 0, 0, 0], 30], [9, 0, 0, 5]),\n  ('normal control 6', [[540, 540, 780, 240, 480, 480, 0], 90], [2400, 600, 60, 5130]),\n  ('normal control 7', [[900, 721, 0, 900, 481, 450, 780], 30], [2400, 1411, 421, 2679]),\n  ('normal control 8', [[721, 0, 813, 720, 600, 780, 480], 1810], [2400, 1560, 154, 152281])],\n [('regression: weekly threshold pyramiding 1', [[600, 600, 600, 600, 600, 0, 0], 1500],\n   [2400, 600, 0, 82500]),\n  ('regression variant: weekly threshold pyramiding 2', [[600, 480, 600, 510, 300, 300, 300], 1500],\n   [2400, 690, 0, 85875]),\n  ('partial repair guard 3', [[600, 481, 0, 540, 0, 450, 720], 2250], [2370, 421, 0, 112556]),\n  ('boundary control 4', [[0, 480, 480, 480, 480, 480, 480], 1500], [2400, 480, 0, 78000]),\n  ('boundary control 5', [[480, 480, 480, 480, 480, 480, 0], 2000], [2400, 480, 0, 104000]),\n  ('normal control 6', [[600, 707, 480, 0, 240, 506, 600], 2250], [2400, 733, 0, 131231]),\n  ('normal control 7', [[721, 211, 0, 720, 780, 721, 780], 2250], [2400, 1411, 122, 178519]),\n  ('normal control 8', [[480, 510, 300, 600, 300, 510, 300], 2250], [2400, 600, 0, 123750])],\n [('regression: weekly threshold pyramiding 1', [[540, 540, 540, 540, 540, 540, 60], 2000],\n   [2400, 900, 0, 125000]),\n  ('regression variant: weekly threshold pyramiding 2', [[540, 176, 0, 780, 450, 0, 481], 2250],\n   [2066, 301, 60, 98906]),\n  ('partial repair guard 3', [[600, 480, 600, 510, 300, 300, 300], 1500], [2400, 690, 0, 85875]),\n  ('boundary control 4', [[27, 0, 0, 0, 0, 0, 0], 30], [27, 0, 0, 14]),\n  ('boundary control 5', [[0, 480, 480, 480, 480, 480, 480], 1500], [2400, 480, 0, 78000]),\n  ('normal control 6', [[780, 540, 0, 0, 450, 481, 540], 90], [2370, 361, 60, 4547]),\n  ('normal control 7', [[600, 240, 900, 780, 0, 240, 590], 30], [2400, 710, 240, 1973]),\n  ('normal control 8', [[450, 450, 780, 721, 480, 450, 525], 2250], [2400, 1350, 106, 173888])],\n [('regression: weekly threshold pyramiding 1', [[300, 600, 300, 600, 510, 600, 480], 90],\n   [2400, 990, 0, 5828]),\n  ('regression variant: weekly threshold pyramiding 2', [[510, 510, 600, 480, 300, 600, 480], 1725],\n   [2400, 1080, 0, 115575]),\n  ('partial repair guard 3', [[540, 480, 240, 780, 600, 481, 0], 90], [2400, 661, 60, 5267]),\n  ('boundary control 4', [[600, 600, 600, 600, 600, 0, 0], 1500], [2400, 600, 0, 82500]),\n  ('boundary control 5', [[27, 0, 0, 0, 0, 0, 0], 30], [27, 0, 0, 14]),\n  ('normal control 6', [[900, 720, 0, 480, 450, 240, 600], 2250], [2400, 810, 180, 149063]),\n  ('normal control 7', [[721, 450, 540, 0, 190, 480, 900], 90], [2400, 700, 181, 5718]),\n  ('normal control 8', [[300, 510, 300, 510, 300, 480, 600], 2250], [2340, 540, 120, 127125])],\n [('regression: weekly threshold pyramiding 1', [[300, 600, 510, 600, 510, 600, 600], 1810],\n   [2400, 1200, 120, 133940]),\n  ('regression variant: weekly threshold pyramiding 2', [[510, 600, 480, 300, 510, 480, 300], 1725],\n   [2400, 780, 0, 102638]),\n  ('partial repair guard 3', [[450, 0, 908, 480, 721, 540, 540], 2250], [2400, 1050, 189, 163238]),\n  ('boundary control 4', [[540, 540, 540, 540, 540, 540, 60], 2000], [2400, 900, 0, 125000]),\n  ('boundary control 5', [[600, 600, 600, 600, 600, 0, 0], 1500], [2400, 600, 0, 82500]),\n  ('normal control 6', [[480, 480, 480, 480, 300, 480, 510], 90], [2400, 780, 30, 5445]),\n  ('normal control 7', [[240, 721, 780, 900, 900, 600, 721], 1810], [2400, 1800, 662, 193791]),\n  ('normal control 8', [[240, 240, 720, 240, 720, 450, 540], 1810], [2130, 960, 60, 111315])]]\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-daily-weekly-overtime-weekly-threshold-pyramiding","generated_at":"2026-09-29T14:51:59.345353+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Overtime classification mistakes are a classic payroll-roster defect: pyramiding, seventh-day rules and rounding stage all change what workers are paid.","root_cause":"The weekly 40-hour threshold is measured on all worked minutes including already-premium daily overtime.","sha256":"49d3c1e8e8ed8717c90753cd20b9ad7dd6737805e2d943f119fe66a0b5b4b506","title":"Weekly overtime pyramids on top of daily overtime minutes · 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.385,"exit_code":1,"observations":[{"actual":[1920,1440,0,136000],"check":"regression: weekly threshold pyramiding 1","expected":[2400,960,0,128000],"passed":false},{"actual":[2279,692,0,110567],"check":"regression variant: weekly threshold pyramiding 2","expected":[2400,571,0,108550],"passed":false},{"actual":[1920,1080,0,132750],"check":"partial repair guard 3","expected":[2400,600,0,123750],"passed":false},{"actual":[2400,480,0,104000],"check":"boundary control 4","expected":[2400,480,0,104000],"passed":true},{"actual":[9,0,0,5],"check":"boundary control 5","expected":[9,0,0,5],"passed":true},{"actual":[2040,960,60,5400],"check":"normal control 6","expected":[2400,600,60,5130],"passed":false},{"actual":[1439,2372,421,2920],"check":"normal control 7","expected":[2400,1411,421,2679],"passed":false},{"actual":[1320,2640,154,168571],"check":"normal control 8","expected":[2400,1560,154,152281],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: weekly threshold pyramiding 1\", \"actual\": [1920, 1440, 0, 136000], \"expected\": [2400, 960, 0, 128000], \"passed\": false}, {\"check\": \"regression variant: weekly threshold pyramiding 2\", \"actual\": [2279, 692, 0, 110567], \"expected\": [2400, 571, 0, 108550], \"passed\": false}, {\"check\": \"partial repair guard 3\", \"actual\": [1920, 1080, 0, 132750], \"expected\": [2400, 600, 0, 123750], \"passed\": false}, {\"check\": \"boundary control 4\", \"actual\": [2400, 480, 0, 104000], \"expected\": [2400, 480, 0, 104000], \"passed\": true}, {\"check\": \"boundary control 5\", \"actual\": [9, 0, 0, 5], \"expected\": [9, 0, 0, 5], \"passed\": true}, {\"check\": \"normal control 6\", \"actual\": [2040, 960, 60, 5400], \"expected\": [2400, 600, 60, 5130], \"passed\": false}, {\"check\": \"normal control 7\", \"actual\": [1439, 2372, 421, 2920], \"expected\": [2400, 1411, 421, 2679], \"passed\": false}, {\"check\": \"normal control 8\", \"actual\": [1320, 2640, 154, 168571], \"expected\": [2400, 1560, 154, 152281], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.477,"exit_code":1,"observations":[{"actual":[1920,1440,0,136000],"check":"regression: weekly threshold pyramiding 1","expected":[2400,960,0,128000],"passed":false},{"actual":[2279,692,0,110567],"check":"regression variant: weekly threshold pyramiding 2","expected":[2400,571,0,108550],"passed":false},{"actual":[1920,1080,0,132750],"check":"partial repair guard 3","expected":[2400,600,0,123750],"passed":false},{"actual":[2400,480,0,104000],"check":"boundary control 4","expected":[2400,480,0,104000],"passed":true},{"actual":[9,0,0,5],"check":"boundary control 5","expected":[9,0,0,5],"passed":true},{"actual":[1980,1020,60,5445],"check":"normal control 6","expected":[2400,600,60,5130],"passed":false},{"actual":[1018,2793,421,3025],"check":"normal control 7","expected":[2400,1411,421,2679],"passed":false},{"actual":[1166,2794,154,170894],"check":"normal control 8","expected":[2400,1560,154,152281],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: weekly threshold pyramiding 1\", \"actual\": [1920, 1440, 0, 136000], \"expected\": [2400, 960, 0, 128000], \"passed\": false}, {\"check\": \"regression variant: weekly threshold pyramiding 2\", \"actual\": [2279, 692, 0, 110567], \"expected\": [2400, 571, 0, 108550], \"passed\": false}, {\"check\": \"partial repair guard 3\", \"actual\": [1920, 1080, 0, 132750], \"expected\": [2400, 600, 0, 123750], \"passed\": false}, {\"check\": \"boundary control 4\", \"actual\": [2400, 480, 0, 104000], \"expected\": [2400, 480, 0, 104000], \"passed\": true}, {\"check\": \"boundary control 5\", \"actual\": [9, 0, 0, 5], \"expected\": [9, 0, 0, 5], \"passed\": true}, {\"check\": \"normal control 6\", \"actual\": [1980, 1020, 60, 5445], \"expected\": [2400, 600, 60, 5130], \"passed\": false}, {\"check\": \"normal control 7\", \"actual\": [1018, 2793, 421, 3025], \"expected\": [2400, 1411, 421, 2679], \"passed\": false}, {\"check\": \"normal control 8\", \"actual\": [1166, 2794, 154, 170894], \"expected\": [2400, 1560, 154, 152281], \"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."}}