FA-94271 / Shift rostering labor rules / Open access
Weeks with partial leave kept in the reference period · case 01
A week with three leave days drags the average down.
ROOT CAUSE
Only fully absent weeks are excluded.
VERIFIED REPAIR
Exclude any week containing an excluded day.
Unsuccessful approach: A five-day threshold still keeps weeks with a few leave days.
Case contract
Weeks [worked minutes, excluded leave/sick days]. The reference period needs ref counted weeks: weeks with any excluded day are skipped and replaced by following weeks. If fewer weeks are available, average the counted weeks. Return [counted weeks, floor average, average > limit] or [0, 0, False] when none count.
Why this case matters
Averaged weekly-hours limits require excluding leave weeks and extending the reference period.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(weeks, ref, limit):
counted = []
for m, ex in weeks:
if len(counted) == ref:
break
if ex < 7:
counted.append(m)
if not counted:
return [0, 0, False]
avg = sum(counted) // len(counted)
return [len(counted), avg, avg > limit]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: partial week exclusion 1', [[[3000, 0], [1000, 2], [3000, 0], [3000, 0]], 3, 2880],
[3, 3000, True]),
('regression variant: partial week exclusion 2',
[[[3000, 7], [3000, 5], [2400, 5], [2400, 5], [2881, 7], [2880, 7], [3000, 0], [3300, 3]], 4, 2880],
[1, 3000, True]),
('partial repair guard 3',
[[[3300, 0], [3000, 5], [3300, 0], [0, 7], [0, 3], [1800, 0], [2400, 0], [0, 0], [2400, 7]], 3, 2880],
[3, 2800, False]),
('boundary control 4', [[[2000, 1], [3000, 0]], 3, 2880], [1, 3000, True]),
('boundary control 5', [[[2880, 0], [2880, 0], [2880, 0]], 3, 2880], [3, 2880, False]),
('normal control 6',
[[[1800, 7], [2880, 5], [3000, 0], [2881, 0], [0, 0], [2400, 0], [0, 0], [2881, 3]], 4, 2880],
[4, 2070, False]),
('normal control 7',
[[[3300, 7], [2880, 3], [0, 1], [3300, 0], [2880, 0], [3000, 1], [3000, 5], [2881, 3], [0, 3]], 3, 2880],
[2, 3090, True]),
('normal control 8', [[[3300, 5], [2400, 5], [2400, 0], [2881, 5], [3000, 7], [2881, 0]], 4, 2880],
[2, 2640, False])],
[('regression: partial week exclusion 1', [[[2000, 1], [3000, 0]], 3, 2880], [1, 3000, True]),
('regression variant: partial week exclusion 2',
[[[0, 1], [2880, 0], [2880, 0], [0, 5], [1800, 3], [2400, 7], [3000, 1], [2881, 7], [2880, 5]], 3, 2880],
[2, 2880, False]),
('partial repair guard 3',
[[[3300, 3], [0, 3], [0, 0], [2880, 5], [3000, 5], [1800, 3], [1800, 0], [2400, 0], [1800, 7]], 4, 2880],
[3, 1400, False]),
('boundary control 4', [[[3000, 0], [1000, 2], [3000, 0], [3000, 0]], 3, 2880], [3, 3000, True]),
('normal control 5', [[[2400, 5], [3300, 0], [0, 0], [0, 3], [1800, 0], [2881, 5], [2400, 7]], 3, 2880],
[3, 1700, False]),
('normal control 6',
[[[3000, 3], [2880, 0], [2881, 0], [3000, 0], [2400, 0], [2880, 0], [2881, 5], [2880, 0]], 3, 2880],
[3, 2920, True]),
('normal control 7',
[[[3300, 0], [2400, 0], [3300, 3], [3300, 1], [2880, 0], [3000, 0], [1800, 0], [2881, 1]], 3, 2880],
[3, 2860, False]),
('normal control 8', [[[2880, 0], [0, 0], [2881, 0], [2880, 5], [3000, 3], [2400, 0]], 5, 2880],
[4, 2040, False])],
[('regression: partial week exclusion 1', [[[2400, 1], [3000, 5], [3300, 1]], 3, 2880], [0, 0, False]),
('regression variant: partial week exclusion 2',
[[[3000, 5], [1800, 0], [1800, 0], [3300, 3], [2400, 0], [2880, 0], [2881, 7], [3000, 7], [2400, 0]], 5,
2880],
[5, 2256, False]),
('partial repair guard 3', [[[2400, 5], [3000, 1], [2400, 5]], 5, 2880], [0, 0, False]),
('boundary control 4', [[[3000, 0], [0, 7], [2800, 0], [2900, 0]], 3, 2880], [3, 2900, True]),
('boundary control 5', [[[3000, 0], [1000, 2], [3000, 0], [3000, 0]], 3, 2880], [3, 3000, True]),
('normal control 6',
[[[2400, 0], [2881, 3], [3000, 5], [2400, 0], [0, 7], [2400, 1], [2881, 0], [2880, 5]], 3, 2880],
[3, 2560, False]),
('normal control 7', [[[1800, 7], [2880, 1], [0, 0]], 3, 2880], [1, 0, False]),
('normal control 8',
[[[3300, 0], [2400, 0], [3300, 3], [3300, 1], [2880, 0], [3000, 0], [1800, 0], [2881, 1]], 3, 2880],
[3, 2860, False])],
[('regression: partial week exclusion 1',
[[[2400, 5], [3300, 0], [0, 0], [0, 3], [1800, 0], [2881, 5], [2400, 7]], 3, 2880], [3, 1700, False]),
('regression variant: partial week exclusion 2',
[[[2880, 1], [3300, 0], [3000, 0], [2400, 1], [2400, 5], [2881, 3], [2881, 1], [1800, 0], [2880, 0]], 4,
2880],
[4, 2745, False]),
('partial repair guard 3',
[[[3000, 1], [2400, 0], [1800, 1], [3300, 5], [1800, 5], [2881, 1], [1800, 1]], 3, 2880],
[1, 2400, False]),
('boundary control 4', [[[2880, 0], [2880, 0], [2880, 0]], 3, 2880], [3, 2880, False]),
('boundary control 5', [[[3000, 0], [0, 7], [2800, 0], [2900, 0]], 3, 2880], [3, 2900, True]),
('normal control 6', [[[0, 5], [2881, 3], [2881, 1], [1800, 7], [1800, 1], [2880, 3], [3000, 1]], 5, 2880],
[0, 0, False]),
('normal control 7', [[[0, 5], [0, 0], [1800, 7]], 4, 2880], [1, 0, False]),
('normal control 8', [[[2881, 0], [1800, 5], [2880, 0], [0, 0], [1800, 0]], 4, 2880], [4, 1890, False])],
[('regression: partial week exclusion 1', [[[2881, 3], [3300, 3], [3000, 0], [3000, 3], [2400, 7]], 4, 2880],
[1, 3000, True]),
('regression variant: partial week exclusion 2',
[[[2400, 7], [3000, 7], [3300, 0], [2881, 7], [2400, 3], [2881, 1], [1800, 3], [1800, 7], [2881, 7]], 3,
2880],
[1, 3300, True]),
('partial repair guard 3',
[[[2880, 1], [3300, 0], [3000, 0], [2400, 1], [2400, 5], [2881, 3], [2881, 1], [1800, 0], [2880, 0]], 4,
2880],
[4, 2745, False]),
('boundary control 4', [[[2000, 1], [3000, 0]], 3, 2880], [1, 3000, True]),
('boundary control 5', [[[2880, 0], [2880, 0], [2880, 0]], 3, 2880], [3, 2880, False]),
('normal control 6', [[[2880, 7], [3000, 0], [2400, 0], [1800, 0], [1800, 7]], 4, 2880], [3, 2400, False]),
('normal control 7', [[[3300, 5], [2881, 5], [0, 0], [0, 3]], 4, 2880], [1, 0, False]),
('normal control 8', [[[2400, 5], [3300, 5], [2881, 0], [0, 5], [0, 0], [3300, 3], [2400, 7]], 5, 2880],
[2, 1440, False])]]
for label, args, expected in fixtures[N-1]:
check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: partial week exclusion 1 | [3, 2333, False] | [3, 3000, True] | Failed |
| regression variant: partial week exclusion 2 | [4, 2700, False] | [1, 3000, True] | Failed |
| partial repair guard 3 | [3, 3200, True] | [3, 2800, False] | Failed |
| boundary control 4 | [2, 2500, False] | [1, 3000, True] | Failed |
| boundary control 5 | [3, 2880, False] | [3, 2880, False] | Passed |
| normal control 6 | [4, 2190, False] | [4, 2070, False] | Failed |
| normal control 7 | [3, 2060, False] | [2, 3090, True] | Failed |
| normal control 8 | [4, 2745, False] | [2, 2640, False] | Failed |
SHA-256 / b9c1e0abefc7dac2c9d2f6c687e0465a97c90686e5de468ceaf65ec2b04f68eb
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(weeks, ref, limit):
counted = []
for m, ex in weeks:
if len(counted) == ref:
break
if ex < 5:
counted.append(m)
if not counted:
return [0, 0, False]
avg = sum(counted) // len(counted)
return [len(counted), avg, avg > limit]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: partial week exclusion 1', [[[3000, 0], [1000, 2], [3000, 0], [3000, 0]], 3, 2880],
[3, 3000, True]),
('regression variant: partial week exclusion 2',
[[[3000, 7], [3000, 5], [2400, 5], [2400, 5], [2881, 7], [2880, 7], [3000, 0], [3300, 3]], 4, 2880],
[1, 3000, True]),
('partial repair guard 3',
[[[3300, 0], [3000, 5], [3300, 0], [0, 7], [0, 3], [1800, 0], [2400, 0], [0, 0], [2400, 7]], 3, 2880],
[3, 2800, False]),
('boundary control 4', [[[2000, 1], [3000, 0]], 3, 2880], [1, 3000, True]),
('boundary control 5', [[[2880, 0], [2880, 0], [2880, 0]], 3, 2880], [3, 2880, False]),
('normal control 6',
[[[1800, 7], [2880, 5], [3000, 0], [2881, 0], [0, 0], [2400, 0], [0, 0], [2881, 3]], 4, 2880],
[4, 2070, False]),
('normal control 7',
[[[3300, 7], [2880, 3], [0, 1], [3300, 0], [2880, 0], [3000, 1], [3000, 5], [2881, 3], [0, 3]], 3, 2880],
[2, 3090, True]),
('normal control 8', [[[3300, 5], [2400, 5], [2400, 0], [2881, 5], [3000, 7], [2881, 0]], 4, 2880],
[2, 2640, False])],
[('regression: partial week exclusion 1', [[[2000, 1], [3000, 0]], 3, 2880], [1, 3000, True]),
('regression variant: partial week exclusion 2',
[[[0, 1], [2880, 0], [2880, 0], [0, 5], [1800, 3], [2400, 7], [3000, 1], [2881, 7], [2880, 5]], 3, 2880],
[2, 2880, False]),
('partial repair guard 3',
[[[3300, 3], [0, 3], [0, 0], [2880, 5], [3000, 5], [1800, 3], [1800, 0], [2400, 0], [1800, 7]], 4, 2880],
[3, 1400, False]),
('boundary control 4', [[[3000, 0], [1000, 2], [3000, 0], [3000, 0]], 3, 2880], [3, 3000, True]),
('normal control 5', [[[2400, 5], [3300, 0], [0, 0], [0, 3], [1800, 0], [2881, 5], [2400, 7]], 3, 2880],
[3, 1700, False]),
('normal control 6',
[[[3000, 3], [2880, 0], [2881, 0], [3000, 0], [2400, 0], [2880, 0], [2881, 5], [2880, 0]], 3, 2880],
[3, 2920, True]),
('normal control 7',
[[[3300, 0], [2400, 0], [3300, 3], [3300, 1], [2880, 0], [3000, 0], [1800, 0], [2881, 1]], 3, 2880],
[3, 2860, False]),
('normal control 8', [[[2880, 0], [0, 0], [2881, 0], [2880, 5], [3000, 3], [2400, 0]], 5, 2880],
[4, 2040, False])],
[('regression: partial week exclusion 1', [[[2400, 1], [3000, 5], [3300, 1]], 3, 2880], [0, 0, False]),
('regression variant: partial week exclusion 2',
[[[3000, 5], [1800, 0], [1800, 0], [3300, 3], [2400, 0], [2880, 0], [2881, 7], [3000, 7], [2400, 0]], 5,
2880],
[5, 2256, False]),
('partial repair guard 3', [[[2400, 5], [3000, 1], [2400, 5]], 5, 2880], [0, 0, False]),
('boundary control 4', [[[3000, 0], [0, 7], [2800, 0], [2900, 0]], 3, 2880], [3, 2900, True]),
('boundary control 5', [[[3000, 0], [1000, 2], [3000, 0], [3000, 0]], 3, 2880], [3, 3000, True]),
('normal control 6',
[[[2400, 0], [2881, 3], [3000, 5], [2400, 0], [0, 7], [2400, 1], [2881, 0], [2880, 5]], 3, 2880],
[3, 2560, False]),
('normal control 7', [[[1800, 7], [2880, 1], [0, 0]], 3, 2880], [1, 0, False]),
('normal control 8',
[[[3300, 0], [2400, 0], [3300, 3], [3300, 1], [2880, 0], [3000, 0], [1800, 0], [2881, 1]], 3, 2880],
[3, 2860, False])],
[('regression: partial week exclusion 1',
[[[2400, 5], [3300, 0], [0, 0], [0, 3], [1800, 0], [2881, 5], [2400, 7]], 3, 2880], [3, 1700, False]),
('regression variant: partial week exclusion 2',
[[[2880, 1], [3300, 0], [3000, 0], [2400, 1], [2400, 5], [2881, 3], [2881, 1], [1800, 0], [2880, 0]], 4,
2880],
[4, 2745, False]),
('partial repair guard 3',
[[[3000, 1], [2400, 0], [1800, 1], [3300, 5], [1800, 5], [2881, 1], [1800, 1]], 3, 2880],
[1, 2400, False]),
('boundary control 4', [[[2880, 0], [2880, 0], [2880, 0]], 3, 2880], [3, 2880, False]),
('boundary control 5', [[[3000, 0], [0, 7], [2800, 0], [2900, 0]], 3, 2880], [3, 2900, True]),
('normal control 6', [[[0, 5], [2881, 3], [2881, 1], [1800, 7], [1800, 1], [2880, 3], [3000, 1]], 5, 2880],
[0, 0, False]),
('normal control 7', [[[0, 5], [0, 0], [1800, 7]], 4, 2880], [1, 0, False]),
('normal control 8', [[[2881, 0], [1800, 5], [2880, 0], [0, 0], [1800, 0]], 4, 2880], [4, 1890, False])],
[('regression: partial week exclusion 1', [[[2881, 3], [3300, 3], [3000, 0], [3000, 3], [2400, 7]], 4, 2880],
[1, 3000, True]),
('regression variant: partial week exclusion 2',
[[[2400, 7], [3000, 7], [3300, 0], [2881, 7], [2400, 3], [2881, 1], [1800, 3], [1800, 7], [2881, 7]], 3,
2880],
[1, 3300, True]),
('partial repair guard 3',
[[[2880, 1], [3300, 0], [3000, 0], [2400, 1], [2400, 5], [2881, 3], [2881, 1], [1800, 0], [2880, 0]], 4,
2880],
[4, 2745, False]),
('boundary control 4', [[[2000, 1], [3000, 0]], 3, 2880], [1, 3000, True]),
('boundary control 5', [[[2880, 0], [2880, 0], [2880, 0]], 3, 2880], [3, 2880, False]),
('normal control 6', [[[2880, 7], [3000, 0], [2400, 0], [1800, 0], [1800, 7]], 4, 2880], [3, 2400, False]),
('normal control 7', [[[3300, 5], [2881, 5], [0, 0], [0, 3]], 4, 2880], [1, 0, False]),
('normal control 8', [[[2400, 5], [3300, 5], [2881, 0], [0, 5], [0, 0], [3300, 3], [2400, 7]], 5, 2880],
[2, 1440, False])]]
for label, args, expected in fixtures[N-1]:
check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: partial week exclusion 1 | [3, 2333, False] | [3, 3000, True] | Failed |
| regression variant: partial week exclusion 2 | [2, 3150, True] | [1, 3000, True] | Failed |
| partial repair guard 3 | [3, 2200, False] | [3, 2800, False] | Failed |
| boundary control 4 | [2, 2500, False] | [1, 3000, True] | Failed |
| boundary control 5 | [3, 2880, False] | [3, 2880, False] | Passed |
| normal control 6 | [4, 2070, False] | [4, 2070, False] | Passed |
| normal control 7 | [3, 2060, False] | [2, 3090, True] | Failed |
| normal control 8 | [2, 2640, False] | [2, 2640, False] | Passed |
SHA-256 / 0300509b265d48e76ddf4ca0e166e6b8ae7091cefa527407bb61e8b4e4f5958c
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(weeks, ref, limit):
counted = []
for m, ex in weeks:
if len(counted) == ref:
break
if ex == 0:
counted.append(m)
if not counted:
return [0, 0, False]
avg = sum(counted) // len(counted)
return [len(counted), avg, avg > limit]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: partial week exclusion 1', [[[3000, 0], [1000, 2], [3000, 0], [3000, 0]], 3, 2880],
[3, 3000, True]),
('regression variant: partial week exclusion 2',
[[[3000, 7], [3000, 5], [2400, 5], [2400, 5], [2881, 7], [2880, 7], [3000, 0], [3300, 3]], 4, 2880],
[1, 3000, True]),
('partial repair guard 3',
[[[3300, 0], [3000, 5], [3300, 0], [0, 7], [0, 3], [1800, 0], [2400, 0], [0, 0], [2400, 7]], 3, 2880],
[3, 2800, False]),
('boundary control 4', [[[2000, 1], [3000, 0]], 3, 2880], [1, 3000, True]),
('boundary control 5', [[[2880, 0], [2880, 0], [2880, 0]], 3, 2880], [3, 2880, False]),
('normal control 6',
[[[1800, 7], [2880, 5], [3000, 0], [2881, 0], [0, 0], [2400, 0], [0, 0], [2881, 3]], 4, 2880],
[4, 2070, False]),
('normal control 7',
[[[3300, 7], [2880, 3], [0, 1], [3300, 0], [2880, 0], [3000, 1], [3000, 5], [2881, 3], [0, 3]], 3, 2880],
[2, 3090, True]),
('normal control 8', [[[3300, 5], [2400, 5], [2400, 0], [2881, 5], [3000, 7], [2881, 0]], 4, 2880],
[2, 2640, False])],
[('regression: partial week exclusion 1', [[[2000, 1], [3000, 0]], 3, 2880], [1, 3000, True]),
('regression variant: partial week exclusion 2',
[[[0, 1], [2880, 0], [2880, 0], [0, 5], [1800, 3], [2400, 7], [3000, 1], [2881, 7], [2880, 5]], 3, 2880],
[2, 2880, False]),
('partial repair guard 3',
[[[3300, 3], [0, 3], [0, 0], [2880, 5], [3000, 5], [1800, 3], [1800, 0], [2400, 0], [1800, 7]], 4, 2880],
[3, 1400, False]),
('boundary control 4', [[[3000, 0], [1000, 2], [3000, 0], [3000, 0]], 3, 2880], [3, 3000, True]),
('normal control 5', [[[2400, 5], [3300, 0], [0, 0], [0, 3], [1800, 0], [2881, 5], [2400, 7]], 3, 2880],
[3, 1700, False]),
('normal control 6',
[[[3000, 3], [2880, 0], [2881, 0], [3000, 0], [2400, 0], [2880, 0], [2881, 5], [2880, 0]], 3, 2880],
[3, 2920, True]),
('normal control 7',
[[[3300, 0], [2400, 0], [3300, 3], [3300, 1], [2880, 0], [3000, 0], [1800, 0], [2881, 1]], 3, 2880],
[3, 2860, False]),
('normal control 8', [[[2880, 0], [0, 0], [2881, 0], [2880, 5], [3000, 3], [2400, 0]], 5, 2880],
[4, 2040, False])],
[('regression: partial week exclusion 1', [[[2400, 1], [3000, 5], [3300, 1]], 3, 2880], [0, 0, False]),
('regression variant: partial week exclusion 2',
[[[3000, 5], [1800, 0], [1800, 0], [3300, 3], [2400, 0], [2880, 0], [2881, 7], [3000, 7], [2400, 0]], 5,
2880],
[5, 2256, False]),
('partial repair guard 3', [[[2400, 5], [3000, 1], [2400, 5]], 5, 2880], [0, 0, False]),
('boundary control 4', [[[3000, 0], [0, 7], [2800, 0], [2900, 0]], 3, 2880], [3, 2900, True]),
('boundary control 5', [[[3000, 0], [1000, 2], [3000, 0], [3000, 0]], 3, 2880], [3, 3000, True]),
('normal control 6',
[[[2400, 0], [2881, 3], [3000, 5], [2400, 0], [0, 7], [2400, 1], [2881, 0], [2880, 5]], 3, 2880],
[3, 2560, False]),
('normal control 7', [[[1800, 7], [2880, 1], [0, 0]], 3, 2880], [1, 0, False]),
('normal control 8',
[[[3300, 0], [2400, 0], [3300, 3], [3300, 1], [2880, 0], [3000, 0], [1800, 0], [2881, 1]], 3, 2880],
[3, 2860, False])],
[('regression: partial week exclusion 1',
[[[2400, 5], [3300, 0], [0, 0], [0, 3], [1800, 0], [2881, 5], [2400, 7]], 3, 2880], [3, 1700, False]),
('regression variant: partial week exclusion 2',
[[[2880, 1], [3300, 0], [3000, 0], [2400, 1], [2400, 5], [2881, 3], [2881, 1], [1800, 0], [2880, 0]], 4,
2880],
[4, 2745, False]),
('partial repair guard 3',
[[[3000, 1], [2400, 0], [1800, 1], [3300, 5], [1800, 5], [2881, 1], [1800, 1]], 3, 2880],
[1, 2400, False]),
('boundary control 4', [[[2880, 0], [2880, 0], [2880, 0]], 3, 2880], [3, 2880, False]),
('boundary control 5', [[[3000, 0], [0, 7], [2800, 0], [2900, 0]], 3, 2880], [3, 2900, True]),
('normal control 6', [[[0, 5], [2881, 3], [2881, 1], [1800, 7], [1800, 1], [2880, 3], [3000, 1]], 5, 2880],
[0, 0, False]),
('normal control 7', [[[0, 5], [0, 0], [1800, 7]], 4, 2880], [1, 0, False]),
('normal control 8', [[[2881, 0], [1800, 5], [2880, 0], [0, 0], [1800, 0]], 4, 2880], [4, 1890, False])],
[('regression: partial week exclusion 1', [[[2881, 3], [3300, 3], [3000, 0], [3000, 3], [2400, 7]], 4, 2880],
[1, 3000, True]),
('regression variant: partial week exclusion 2',
[[[2400, 7], [3000, 7], [3300, 0], [2881, 7], [2400, 3], [2881, 1], [1800, 3], [1800, 7], [2881, 7]], 3,
2880],
[1, 3300, True]),
('partial repair guard 3',
[[[2880, 1], [3300, 0], [3000, 0], [2400, 1], [2400, 5], [2881, 3], [2881, 1], [1800, 0], [2880, 0]], 4,
2880],
[4, 2745, False]),
('boundary control 4', [[[2000, 1], [3000, 0]], 3, 2880], [1, 3000, True]),
('boundary control 5', [[[2880, 0], [2880, 0], [2880, 0]], 3, 2880], [3, 2880, False]),
('normal control 6', [[[2880, 7], [3000, 0], [2400, 0], [1800, 0], [1800, 7]], 4, 2880], [3, 2400, False]),
('normal control 7', [[[3300, 5], [2881, 5], [0, 0], [0, 3]], 4, 2880], [1, 0, False]),
('normal control 8', [[[2400, 5], [3300, 5], [2881, 0], [0, 5], [0, 0], [3300, 3], [2400, 7]], 5, 2880],
[2, 1440, False])]]
for label, args, expected in fixtures[N-1]:
check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: partial week exclusion 1 | [3, 3000, True] | [3, 3000, True] | Passed |
| regression variant: partial week exclusion 2 | [1, 3000, True] | [1, 3000, True] | Passed |
| partial repair guard 3 | [3, 2800, False] | [3, 2800, False] | Passed |
| boundary control 4 | [1, 3000, True] | [1, 3000, True] | Passed |
| boundary control 5 | [3, 2880, False] | [3, 2880, False] | Passed |
| normal control 6 | [4, 2070, False] | [4, 2070, False] | Passed |
| normal control 7 | [2, 3090, True] | [2, 3090, True] | Passed |
| normal control 8 | [2, 2640, False] | [2, 2640, False] | Passed |
SHA-256 / 9b3c63afdbe56ce94ec16294d18d49634f3cd80b7f63a7d907fb0bf0f3251d5c
Verification & scope
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.
Observations recorded using Python 3.12.14 at 2026-09-29T14:52:02.757329+00:00.
Case digest / 0ee72d789f5a9e8e75cf3da95cde8425f937b58666729062e029cf74242c8741