{"abstract":"Late arrivals are paid from the scheduled start while early arrivals are rounded.","category":"Shift rostering labor rules","checks":8,"contract":"Scheduled [start, end] and raw punches in minutes. A punch in at most 7 minutes before the scheduled start is treated as the start; a punch out at most 7 minutes after the scheduled end is treated as the end. Then each time is rounded to the quarter hour: remainder 0-7 down, 8-14 up. Return [in, out, max(out - in, 0)].","contract_signature":"sched, punch_in, punch_out","evaluation_group":"w2-shift-rostering-labor-rules-punch-rounding-grace","failed_approach":"A symmetric window also forgives late arrivals.","family":"w2-shift-rostering-labor-rules-punch-rounding-grace-early-grace-direction","id":"FA-94156","implementations":{"attempt":{"sha256":"e27bed34d75b90ffab6641bd33e9ebc74c9ad0ee9d1b26feb4d197edc7d862e4","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(sched, punch_in, punch_out):\n    start, end = sched\n    def q(t):\n        r = t % 15\n        return t - r if r <= 7 else t + 15 - r\n    i = start if abs(start - punch_in) <= 7 else punch_in\n    o = end if 0 < punch_out - end <= 7 else punch_out\n    i, o = q(i), q(o)\n    return [i, o, max(o - i, 0)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: early grace direction 1', [[487, 727], 490, 736], [495, 735, 240]),\n  ('regression variant: early grace direction 2', [[487, 727], 494, 736], [495, 735, 240]),\n  ('partial repair guard 3', [[487, 967], 490, 972], [495, 960, 465]),\n  ('boundary control 4', [[480, 960], 488, 952], [495, 945, 450]),\n  ('boundary control 5', [[480, 960], 487, 953], [480, 960, 480]),\n  ('normal control 6', [[600, 1080], 595, 1081], [600, 1080, 480]),\n  ('normal control 7', [[600, 840], 609, 847], [615, 840, 225]),\n  ('normal control 8', [[540, 1050], 548, 1040], [555, 1035, 480])],\n [('regression: early grace direction 1', [[487, 997], 494, 998], [495, 990, 495]),\n  ('regression variant: early grace direction 2', [[487, 967], 490, 972], [495, 960, 465]),\n  ('partial repair guard 3', [[487, 727], 490, 736], [495, 735, 240]),\n  ('boundary control 4', [[480, 960], 473, 967], [480, 960, 480]),\n  ('boundary control 5', [[480, 960], 500, 490], [495, 495, 0]),\n  ('normal control 6', [[540, 1050], 539, 1049], [540, 1050, 510]),\n  ('normal control 7', [[600, 1080], 592, 1080], [585, 1080, 495]),\n  ('normal control 8', [[480, 720], 460, 719], [465, 720, 255])],\n [('regression: early grace direction 1', [[487, 997], 490, 1006], [495, 1005, 510]),\n  ('partial repair guard 2', [[487, 727], 494, 749], [495, 750, 255]),\n  ('boundary control 3', [[480, 960], 488, 952], [495, 945, 450]),\n  ('boundary control 4', [[480, 960], 487, 953], [480, 960, 480]),\n  ('normal control 5', [[540, 1050], 532, 1050], [525, 1050, 525]),\n  ('normal control 6', [[540, 1050], 535, 1057], [540, 1050, 510]),\n  ('normal control 7', [[420, 930], 427, 942], [420, 945, 525]),\n  ('normal control 8', [[540, 1050], 535, 1058], [540, 1065, 525])],\n [('regression: early grace direction 1', [[487, 727], 490, 726], [495, 720, 225]),\n  ('regression variant: early grace direction 2', [[487, 997], 494, 1005], [495, 1005, 510]),\n  ('partial repair guard 3', [[487, 727], 494, 736], [495, 735, 240]),\n  ('boundary control 4', [[480, 960], 473, 967], [480, 960, 480]),\n  ('boundary control 5', [[480, 960], 500, 490], [495, 495, 0]),\n  ('normal control 6', [[487, 727], 477, 739], [480, 735, 255]),\n  ('normal control 7', [[480, 990], 470, 989], [465, 990, 525]),\n  ('normal control 8', [[600, 840], 593, 849], [600, 855, 255])],\n [('regression: early grace direction 1', [[487, 727], 494, 483], [495, 480, 0]),\n  ('regression variant: early grace direction 2', [[487, 727], 494, 749], [495, 750, 255]),\n  ('boundary control 3', [[480, 960], 488, 952], [495, 945, 450]),\n  ('boundary control 4', [[480, 960], 487, 953], [480, 960, 480]),\n  ('normal control 5', [[600, 840], 614, 849], [615, 855, 240]),\n  ('normal control 6', [[540, 780], 548, 788], [555, 795, 240]),\n  ('normal control 7', [[480, 960], 480, 982], [480, 975, 495]),\n  ('normal control 8', [[540, 1020], 547, 1028], [540, 1035, 495])]]\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":"dcb38fc1cd39f4080f0bedb08378298e01531ec7b44ac2a9e109bd369f7d801d","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(sched, punch_in, punch_out):\n    start, end = sched\n    def q(t):\n        r = t % 15\n        return t - r if r <= 7 else t + 15 - r\n    i = start if 0 < punch_in - start <= 7 else punch_in\n    o = end if 0 < punch_out - end <= 7 else punch_out\n    i, o = q(i), q(o)\n    return [i, o, max(o - i, 0)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: early grace direction 1', [[487, 727], 490, 736], [495, 735, 240]),\n  ('regression variant: early grace direction 2', [[487, 727], 494, 736], [495, 735, 240]),\n  ('partial repair guard 3', [[487, 967], 490, 972], [495, 960, 465]),\n  ('boundary control 4', [[480, 960], 488, 952], [495, 945, 450]),\n  ('boundary control 5', [[480, 960], 487, 953], [480, 960, 480]),\n  ('normal control 6', [[600, 1080], 595, 1081], [600, 1080, 480]),\n  ('normal control 7', [[600, 840], 609, 847], [615, 840, 225]),\n  ('normal control 8', [[540, 1050], 548, 1040], [555, 1035, 480])],\n [('regression: early grace direction 1', [[487, 997], 494, 998], [495, 990, 495]),\n  ('regression variant: early grace direction 2', [[487, 967], 490, 972], [495, 960, 465]),\n  ('partial repair guard 3', [[487, 727], 490, 736], [495, 735, 240]),\n  ('boundary control 4', [[480, 960], 473, 967], [480, 960, 480]),\n  ('boundary control 5', [[480, 960], 500, 490], [495, 495, 0]),\n  ('normal control 6', [[540, 1050], 539, 1049], [540, 1050, 510]),\n  ('normal control 7', [[600, 1080], 592, 1080], [585, 1080, 495]),\n  ('normal control 8', [[480, 720], 460, 719], [465, 720, 255])],\n [('regression: early grace direction 1', [[487, 997], 490, 1006], [495, 1005, 510]),\n  ('partial repair guard 2', [[487, 727], 494, 749], [495, 750, 255]),\n  ('boundary control 3', [[480, 960], 488, 952], [495, 945, 450]),\n  ('boundary control 4', [[480, 960], 487, 953], [480, 960, 480]),\n  ('normal control 5', [[540, 1050], 532, 1050], [525, 1050, 525]),\n  ('normal control 6', [[540, 1050], 535, 1057], [540, 1050, 510]),\n  ('normal control 7', [[420, 930], 427, 942], [420, 945, 525]),\n  ('normal control 8', [[540, 1050], 535, 1058], [540, 1065, 525])],\n [('regression: early grace direction 1', [[487, 727], 490, 726], [495, 720, 225]),\n  ('regression variant: early grace direction 2', [[487, 997], 494, 1005], [495, 1005, 510]),\n  ('partial repair guard 3', [[487, 727], 494, 736], [495, 735, 240]),\n  ('boundary control 4', [[480, 960], 473, 967], [480, 960, 480]),\n  ('boundary control 5', [[480, 960], 500, 490], [495, 495, 0]),\n  ('normal control 6', [[487, 727], 477, 739], [480, 735, 255]),\n  ('normal control 7', [[480, 990], 470, 989], [465, 990, 525]),\n  ('normal control 8', [[600, 840], 593, 849], [600, 855, 255])],\n [('regression: early grace direction 1', [[487, 727], 494, 483], [495, 480, 0]),\n  ('regression variant: early grace direction 2', [[487, 727], 494, 749], [495, 750, 255]),\n  ('boundary control 3', [[480, 960], 488, 952], [495, 945, 450]),\n  ('boundary control 4', [[480, 960], 487, 953], [480, 960, 480]),\n  ('normal control 5', [[600, 840], 614, 849], [615, 855, 240]),\n  ('normal control 6', [[540, 780], 548, 788], [555, 795, 240]),\n  ('normal control 7', [[480, 960], 480, 982], [480, 975, 495]),\n  ('normal control 8', [[540, 1020], 547, 1028], [540, 1035, 495])]]\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-punch-rounding-grace-early-grace-direction","generated_at":"2026-09-29T14:52:01.713242+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Punch rounding and grace periods must be neutral; asymmetric boundaries systematically underpay.","root_cause":"The clock-in grace window is measured after the start instead of before it.","sha256":"6413e75ecd6ad861cd5948cae14155098c7c0f541baf6aa15897a53f2947f8b7","title":"Clock-in grace applied to late arrivals · 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.004,"exit_code":1,"observations":[{"actual":[480,735,255],"check":"regression: early grace direction 1","expected":[495,735,240],"passed":false},{"actual":[480,735,255],"check":"regression variant: early grace direction 2","expected":[495,735,240],"passed":false},{"actual":[480,960,480],"check":"partial repair guard 3","expected":[495,960,465],"passed":false},{"actual":[495,945,450],"check":"boundary control 4","expected":[495,945,450],"passed":true},{"actual":[480,960,480],"check":"boundary control 5","expected":[480,960,480],"passed":true},{"actual":[600,1080,480],"check":"normal control 6","expected":[600,1080,480],"passed":true},{"actual":[615,840,225],"check":"normal control 7","expected":[615,840,225],"passed":true},{"actual":[555,1035,480],"check":"normal control 8","expected":[555,1035,480],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: early grace direction 1\", \"actual\": [480, 735, 255], \"expected\": [495, 735, 240], \"passed\": false}, {\"check\": \"regression variant: early grace direction 2\", \"actual\": [480, 735, 255], \"expected\": [495, 735, 240], \"passed\": false}, {\"check\": \"partial repair guard 3\", \"actual\": [480, 960, 480], \"expected\": [495, 960, 465], \"passed\": false}, {\"check\": \"boundary control 4\", \"actual\": [495, 945, 450], \"expected\": [495, 945, 450], \"passed\": true}, {\"check\": \"boundary control 5\", \"actual\": [480, 960, 480], \"expected\": [480, 960, 480], \"passed\": true}, {\"check\": \"normal control 6\", \"actual\": [600, 1080, 480], \"expected\": [600, 1080, 480], \"passed\": true}, {\"check\": \"normal control 7\", \"actual\": [615, 840, 225], \"expected\": [615, 840, 225], \"passed\": true}, {\"check\": \"normal control 8\", \"actual\": [555, 1035, 480], \"expected\": [555, 1035, 480], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.487,"exit_code":1,"observations":[{"actual":[480,735,255],"check":"regression: early grace direction 1","expected":[495,735,240],"passed":false},{"actual":[480,735,255],"check":"regression variant: early grace direction 2","expected":[495,735,240],"passed":false},{"actual":[480,960,480],"check":"partial repair guard 3","expected":[495,960,465],"passed":false},{"actual":[495,945,450],"check":"boundary control 4","expected":[495,945,450],"passed":true},{"actual":[480,960,480],"check":"boundary control 5","expected":[480,960,480],"passed":true},{"actual":[600,1080,480],"check":"normal control 6","expected":[600,1080,480],"passed":true},{"actual":[615,840,225],"check":"normal control 7","expected":[615,840,225],"passed":true},{"actual":[555,1035,480],"check":"normal control 8","expected":[555,1035,480],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: early grace direction 1\", \"actual\": [480, 735, 255], \"expected\": [495, 735, 240], \"passed\": false}, {\"check\": \"regression variant: early grace direction 2\", \"actual\": [480, 735, 255], \"expected\": [495, 735, 240], \"passed\": false}, {\"check\": \"partial repair guard 3\", \"actual\": [480, 960, 480], \"expected\": [495, 960, 465], \"passed\": false}, {\"check\": \"boundary control 4\", \"actual\": [495, 945, 450], \"expected\": [495, 945, 450], \"passed\": true}, {\"check\": \"boundary control 5\", \"actual\": [480, 960, 480], \"expected\": [480, 960, 480], \"passed\": true}, {\"check\": \"normal control 6\", \"actual\": [600, 1080, 480], \"expected\": [600, 1080, 480], \"passed\": true}, {\"check\": \"normal control 7\", \"actual\": [615, 840, 225], \"expected\": [615, 840, 225], \"passed\": true}, {\"check\": \"normal control 8\", \"actual\": [555, 1035, 480], \"expected\": [555, 1035, 480], \"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."}}