FA-94301 / Shift rostering labor rules / Open access
Supplement tolerance computed as fractional minutes · case 01
Contracts not divisible by ten produce fractional supplement minutes.
ROOT CAUSE
The tolerance uses true division.
VERIFIED REPAIR
Use a whole-minute tolerance of contract // 10.
Unsuccessful approach: Ceiling division rounds the tolerance up, shrinking the supplement base.
Case contract
Contract minutes per week and worked minutes per week. Per week: top-up = shortfall below contract; additional = minutes between contract and 2400; supplement base = additional minutes beyond a tolerance of contract // 10; overtime = minutes above 2400. Return [top-up, additional, supplement base, overtime] per week.
Why this case matters
Part-time contracts pay guaranteed hours, additional hours and supplements; each band has its own boundary.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(contract, weeks):
out = []
free = contract / 10
for w in weeks:
top = max(contract - w, 0)
add = max(min(w, 2400) - contract, 0)
sup = max(add - free, 0)
ot = max(w - 2400, 0)
out.append([top, add, sup, ot])
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: tolerance integer minutes 1', [1205, [1325, 1326]], [[0, 120, 0, 0], [0, 121, 1, 0]]),
('regression variant: tolerance integer minutes 2', [1234, [1174, 2400]],
[[60, 0, 0, 0], [0, 1166, 1043, 0]]),
('partial repair guard 3', [1234, [1174, 2400, 1358]], [[60, 0, 0, 0], [0, 1166, 1043, 0], [0, 124, 1, 0]]),
('boundary control 4', [1800, [2400, 3000]], [[0, 600, 420, 0], [0, 600, 420, 600]]),
('boundary control 5', [1200, [1320, 1321]], [[0, 120, 0, 0], [0, 121, 1, 0]]),
('normal control 6', [1200, [391, 1320]], [[809, 0, 0, 0], [0, 120, 0, 0]]),
('normal control 7', [1234, [2880, 2400]], [[0, 1166, 1043, 480], [0, 1166, 1043, 0]]),
('normal control 8', [1234, [2880, 1358, 2500]],
[[0, 1166, 1043, 480], [0, 124, 1, 0], [0, 1166, 1043, 100]])],
[('regression: tolerance integer minutes 1', [1205, [2880, 1229]], [[0, 1195, 1075, 480], [0, 24, 0, 0]]),
('regression variant: tolerance integer minutes 2', [1234, [2880, 1358, 2500]],
[[0, 1166, 1043, 480], [0, 124, 1, 0], [0, 1166, 1043, 100]]),
('partial repair guard 3', [1205, [1381, 415, 1325]], [[0, 176, 56, 0], [790, 0, 0, 0], [0, 120, 0, 0]]),
('boundary control 4', [1500, [2500, 1000]], [[0, 900, 750, 100], [500, 0, 0, 0]]),
('boundary control 5', [1800, [2400, 3000]], [[0, 600, 420, 0], [0, 600, 420, 600]]),
('normal control 6', [1200, [1321, 1321]], [[0, 121, 1, 0], [0, 121, 1, 0]]),
('normal control 7', [1500, [1650, 2880]], [[0, 150, 0, 0], [0, 900, 750, 480]]),
('normal control 8', [2100, [2040, 0, 2100, 2500, 2880]],
[[60, 0, 0, 0], [2100, 0, 0, 0], [0, 0, 0, 0], [0, 300, 90, 100], [0, 300, 90, 480]])],
[('regression: tolerance integer minutes 1', [1234, [2880, 1056, 2880, 2400, 1357]],
[[0, 1166, 1043, 480], [178, 0, 0, 0], [0, 1166, 1043, 480], [0, 1166, 1043, 0], [0, 123, 0, 0]]),
('regression variant: tolerance integer minutes 2', [1205, [2508, 2500, 2400, 1700]],
[[0, 1195, 1075, 108], [0, 1195, 1075, 100], [0, 1195, 1075, 0], [0, 495, 375, 0]]),
('partial repair guard 3', [1234, [2400, 2400, 1234, 2500, 1174]],
[[0, 1166, 1043, 0], [0, 1166, 1043, 0], [0, 0, 0, 0], [0, 1166, 1043, 100], [60, 0, 0, 0]]),
('boundary control 4', [1205, [1325, 1326]], [[0, 120, 0, 0], [0, 121, 1, 0]]),
('boundary control 5', [1500, [2500, 1000]], [[0, 900, 750, 100], [500, 0, 0, 0]]),
('normal control 6', [1500, [1440, 1651]], [[60, 0, 0, 0], [0, 151, 1, 0]]),
('normal control 7', [2100, [2500, 2310, 0]], [[0, 300, 90, 100], [0, 210, 0, 0], [2100, 0, 0, 0]]),
('normal control 8', [1800, [1981, 1980, 1981]], [[0, 181, 1, 0], [0, 180, 0, 0], [0, 181, 1, 0]])],
[('regression: tolerance integer minutes 1', [1205, [2373, 1325, 1326, 1205]],
[[0, 1168, 1048, 0], [0, 120, 0, 0], [0, 121, 1, 0], [0, 0, 0, 0]]),
('regression variant: tolerance integer minutes 2', [1234, [1357, 143, 2500, 1604]],
[[0, 123, 0, 0], [1091, 0, 0, 0], [0, 1166, 1043, 100], [0, 370, 247, 0]]),
('partial repair guard 3', [1234, [1234, 2500, 1358]],
[[0, 0, 0, 0], [0, 1166, 1043, 100], [0, 124, 1, 0]]),
('boundary control 4', [1200, [1320, 1321]], [[0, 120, 0, 0], [0, 121, 1, 0]]),
('boundary control 5', [1205, [1325, 1326]], [[0, 120, 0, 0], [0, 121, 1, 0]]),
('normal control 6', [1500, [0, 2400, 0]], [[1500, 0, 0, 0], [0, 900, 750, 0], [1500, 0, 0, 0]]),
('normal control 7', [1200, [84, 1200, 1140, 0, 2755]],
[[1116, 0, 0, 0], [0, 0, 0, 0], [60, 0, 0, 0], [1200, 0, 0, 0], [0, 1200, 1080, 355]]),
('normal control 8', [1234, [1357, 2400, 175, 1433, 2473]],
[[0, 123, 0, 0], [0, 1166, 1043, 0], [1059, 0, 0, 0], [0, 199, 76, 0], [0, 1166, 1043, 73]])],
[('regression: tolerance integer minutes 1', [1205, [1145, 2400, 0, 2880]],
[[60, 0, 0, 0], [0, 1195, 1075, 0], [1205, 0, 0, 0], [0, 1195, 1075, 480]]),
('regression variant: tolerance integer minutes 2', [1205, [1205, 2400, 2400, 2400]],
[[0, 0, 0, 0], [0, 1195, 1075, 0], [0, 1195, 1075, 0], [0, 1195, 1075, 0]]),
('partial repair guard 3', [1205, [1205, 2880, 0]], [[0, 0, 0, 0], [0, 1195, 1075, 480], [1205, 0, 0, 0]]),
('boundary control 4', [1800, [2400, 3000]], [[0, 600, 420, 0], [0, 600, 420, 600]]),
('boundary control 5', [1200, [1320, 1321]], [[0, 120, 0, 0], [0, 121, 1, 0]]),
('normal control 6', [1234, [1357, 2500, 0, 1234]],
[[0, 123, 0, 0], [0, 1166, 1043, 100], [1234, 0, 0, 0], [0, 0, 0, 0]]),
('normal control 7', [1500, [1650, 0, 1500, 0, 1500]],
[[0, 150, 0, 0], [1500, 0, 0, 0], [0, 0, 0, 0], [1500, 0, 0, 0], [0, 0, 0, 0]]),
('normal control 8', [1200, [2267, 2400]], [[0, 1067, 947, 0], [0, 1200, 1080, 0]])]]
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: tolerance integer minutes 1 | [[0, 120, 0, 0], [0, 121, 0.5, 0]] | [[0, 120, 0, 0], [0, 121, 1, 0]] | Failed |
| regression variant: tolerance integer minutes 2 | [[60, 0, 0, 0], [0, 1166, 1042.6, 0]] | [[60, 0, 0, 0], [0, 1166, 1043, 0]] | Failed |
| partial repair guard 3 | [[60, 0, 0, 0], [0, 1166, 1042.6, 0], [0, 124, 0.5999999999999943, 0]] | [[60, 0, 0, 0], [0, 1166, 1043, 0], [0, 124, 1, 0]] | Failed |
| boundary control 4 | [[0, 600, 420.0, 0], [0, 600, 420.0, 600]] | [[0, 600, 420, 0], [0, 600, 420, 600]] | Passed |
| boundary control 5 | [[0, 120, 0.0, 0], [0, 121, 1.0, 0]] | [[0, 120, 0, 0], [0, 121, 1, 0]] | Passed |
| normal control 6 | [[809, 0, 0, 0], [0, 120, 0.0, 0]] | [[809, 0, 0, 0], [0, 120, 0, 0]] | Passed |
| normal control 7 | [[0, 1166, 1042.6, 480], [0, 1166, 1042.6, 0]] | [[0, 1166, 1043, 480], [0, 1166, 1043, 0]] | Failed |
| normal control 8 | [[0, 1166, 1042.6, 480], [0, 124, 0.5999999999999943, 0], [0, 1166, 1042.6, 100]] | [[0, 1166, 1043, 480], [0, 124, 1, 0], [0, 1166, 1043, 100]] | Failed |
SHA-256 / 5bdffbec73fcad8e20a63144b12d9670b9751f4de48958d03a2a3b4b91b500ad
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(contract, weeks):
out = []
free = -(-contract // 10)
for w in weeks:
top = max(contract - w, 0)
add = max(min(w, 2400) - contract, 0)
sup = max(add - free, 0)
ot = max(w - 2400, 0)
out.append([top, add, sup, ot])
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: tolerance integer minutes 1', [1205, [1325, 1326]], [[0, 120, 0, 0], [0, 121, 1, 0]]),
('regression variant: tolerance integer minutes 2', [1234, [1174, 2400]],
[[60, 0, 0, 0], [0, 1166, 1043, 0]]),
('partial repair guard 3', [1234, [1174, 2400, 1358]], [[60, 0, 0, 0], [0, 1166, 1043, 0], [0, 124, 1, 0]]),
('boundary control 4', [1800, [2400, 3000]], [[0, 600, 420, 0], [0, 600, 420, 600]]),
('boundary control 5', [1200, [1320, 1321]], [[0, 120, 0, 0], [0, 121, 1, 0]]),
('normal control 6', [1200, [391, 1320]], [[809, 0, 0, 0], [0, 120, 0, 0]]),
('normal control 7', [1234, [2880, 2400]], [[0, 1166, 1043, 480], [0, 1166, 1043, 0]]),
('normal control 8', [1234, [2880, 1358, 2500]],
[[0, 1166, 1043, 480], [0, 124, 1, 0], [0, 1166, 1043, 100]])],
[('regression: tolerance integer minutes 1', [1205, [2880, 1229]], [[0, 1195, 1075, 480], [0, 24, 0, 0]]),
('regression variant: tolerance integer minutes 2', [1234, [2880, 1358, 2500]],
[[0, 1166, 1043, 480], [0, 124, 1, 0], [0, 1166, 1043, 100]]),
('partial repair guard 3', [1205, [1381, 415, 1325]], [[0, 176, 56, 0], [790, 0, 0, 0], [0, 120, 0, 0]]),
('boundary control 4', [1500, [2500, 1000]], [[0, 900, 750, 100], [500, 0, 0, 0]]),
('boundary control 5', [1800, [2400, 3000]], [[0, 600, 420, 0], [0, 600, 420, 600]]),
('normal control 6', [1200, [1321, 1321]], [[0, 121, 1, 0], [0, 121, 1, 0]]),
('normal control 7', [1500, [1650, 2880]], [[0, 150, 0, 0], [0, 900, 750, 480]]),
('normal control 8', [2100, [2040, 0, 2100, 2500, 2880]],
[[60, 0, 0, 0], [2100, 0, 0, 0], [0, 0, 0, 0], [0, 300, 90, 100], [0, 300, 90, 480]])],
[('regression: tolerance integer minutes 1', [1234, [2880, 1056, 2880, 2400, 1357]],
[[0, 1166, 1043, 480], [178, 0, 0, 0], [0, 1166, 1043, 480], [0, 1166, 1043, 0], [0, 123, 0, 0]]),
('regression variant: tolerance integer minutes 2', [1205, [2508, 2500, 2400, 1700]],
[[0, 1195, 1075, 108], [0, 1195, 1075, 100], [0, 1195, 1075, 0], [0, 495, 375, 0]]),
('partial repair guard 3', [1234, [2400, 2400, 1234, 2500, 1174]],
[[0, 1166, 1043, 0], [0, 1166, 1043, 0], [0, 0, 0, 0], [0, 1166, 1043, 100], [60, 0, 0, 0]]),
('boundary control 4', [1205, [1325, 1326]], [[0, 120, 0, 0], [0, 121, 1, 0]]),
('boundary control 5', [1500, [2500, 1000]], [[0, 900, 750, 100], [500, 0, 0, 0]]),
('normal control 6', [1500, [1440, 1651]], [[60, 0, 0, 0], [0, 151, 1, 0]]),
('normal control 7', [2100, [2500, 2310, 0]], [[0, 300, 90, 100], [0, 210, 0, 0], [2100, 0, 0, 0]]),
('normal control 8', [1800, [1981, 1980, 1981]], [[0, 181, 1, 0], [0, 180, 0, 0], [0, 181, 1, 0]])],
[('regression: tolerance integer minutes 1', [1205, [2373, 1325, 1326, 1205]],
[[0, 1168, 1048, 0], [0, 120, 0, 0], [0, 121, 1, 0], [0, 0, 0, 0]]),
('regression variant: tolerance integer minutes 2', [1234, [1357, 143, 2500, 1604]],
[[0, 123, 0, 0], [1091, 0, 0, 0], [0, 1166, 1043, 100], [0, 370, 247, 0]]),
('partial repair guard 3', [1234, [1234, 2500, 1358]],
[[0, 0, 0, 0], [0, 1166, 1043, 100], [0, 124, 1, 0]]),
('boundary control 4', [1200, [1320, 1321]], [[0, 120, 0, 0], [0, 121, 1, 0]]),
('boundary control 5', [1205, [1325, 1326]], [[0, 120, 0, 0], [0, 121, 1, 0]]),
('normal control 6', [1500, [0, 2400, 0]], [[1500, 0, 0, 0], [0, 900, 750, 0], [1500, 0, 0, 0]]),
('normal control 7', [1200, [84, 1200, 1140, 0, 2755]],
[[1116, 0, 0, 0], [0, 0, 0, 0], [60, 0, 0, 0], [1200, 0, 0, 0], [0, 1200, 1080, 355]]),
('normal control 8', [1234, [1357, 2400, 175, 1433, 2473]],
[[0, 123, 0, 0], [0, 1166, 1043, 0], [1059, 0, 0, 0], [0, 199, 76, 0], [0, 1166, 1043, 73]])],
[('regression: tolerance integer minutes 1', [1205, [1145, 2400, 0, 2880]],
[[60, 0, 0, 0], [0, 1195, 1075, 0], [1205, 0, 0, 0], [0, 1195, 1075, 480]]),
('regression variant: tolerance integer minutes 2', [1205, [1205, 2400, 2400, 2400]],
[[0, 0, 0, 0], [0, 1195, 1075, 0], [0, 1195, 1075, 0], [0, 1195, 1075, 0]]),
('partial repair guard 3', [1205, [1205, 2880, 0]], [[0, 0, 0, 0], [0, 1195, 1075, 480], [1205, 0, 0, 0]]),
('boundary control 4', [1800, [2400, 3000]], [[0, 600, 420, 0], [0, 600, 420, 600]]),
('boundary control 5', [1200, [1320, 1321]], [[0, 120, 0, 0], [0, 121, 1, 0]]),
('normal control 6', [1234, [1357, 2500, 0, 1234]],
[[0, 123, 0, 0], [0, 1166, 1043, 100], [1234, 0, 0, 0], [0, 0, 0, 0]]),
('normal control 7', [1500, [1650, 0, 1500, 0, 1500]],
[[0, 150, 0, 0], [1500, 0, 0, 0], [0, 0, 0, 0], [1500, 0, 0, 0], [0, 0, 0, 0]]),
('normal control 8', [1200, [2267, 2400]], [[0, 1067, 947, 0], [0, 1200, 1080, 0]])]]
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: tolerance integer minutes 1 | [[0, 120, 0, 0], [0, 121, 0, 0]] | [[0, 120, 0, 0], [0, 121, 1, 0]] | Failed |
| regression variant: tolerance integer minutes 2 | [[60, 0, 0, 0], [0, 1166, 1042, 0]] | [[60, 0, 0, 0], [0, 1166, 1043, 0]] | Failed |
| partial repair guard 3 | [[60, 0, 0, 0], [0, 1166, 1042, 0], [0, 124, 0, 0]] | [[60, 0, 0, 0], [0, 1166, 1043, 0], [0, 124, 1, 0]] | Failed |
| boundary control 4 | [[0, 600, 420, 0], [0, 600, 420, 600]] | [[0, 600, 420, 0], [0, 600, 420, 600]] | Passed |
| boundary control 5 | [[0, 120, 0, 0], [0, 121, 1, 0]] | [[0, 120, 0, 0], [0, 121, 1, 0]] | Passed |
| normal control 6 | [[809, 0, 0, 0], [0, 120, 0, 0]] | [[809, 0, 0, 0], [0, 120, 0, 0]] | Passed |
| normal control 7 | [[0, 1166, 1042, 480], [0, 1166, 1042, 0]] | [[0, 1166, 1043, 480], [0, 1166, 1043, 0]] | Failed |
| normal control 8 | [[0, 1166, 1042, 480], [0, 124, 0, 0], [0, 1166, 1042, 100]] | [[0, 1166, 1043, 480], [0, 124, 1, 0], [0, 1166, 1043, 100]] | Failed |
SHA-256 / 274f3df1a41363b755d15c95c9b8828371a5848f1cf63dc075d9d91295037e20
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(contract, weeks):
out = []
free = contract // 10
for w in weeks:
top = max(contract - w, 0)
add = max(min(w, 2400) - contract, 0)
sup = max(add - free, 0)
ot = max(w - 2400, 0)
out.append([top, add, sup, ot])
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: tolerance integer minutes 1', [1205, [1325, 1326]], [[0, 120, 0, 0], [0, 121, 1, 0]]),
('regression variant: tolerance integer minutes 2', [1234, [1174, 2400]],
[[60, 0, 0, 0], [0, 1166, 1043, 0]]),
('partial repair guard 3', [1234, [1174, 2400, 1358]], [[60, 0, 0, 0], [0, 1166, 1043, 0], [0, 124, 1, 0]]),
('boundary control 4', [1800, [2400, 3000]], [[0, 600, 420, 0], [0, 600, 420, 600]]),
('boundary control 5', [1200, [1320, 1321]], [[0, 120, 0, 0], [0, 121, 1, 0]]),
('normal control 6', [1200, [391, 1320]], [[809, 0, 0, 0], [0, 120, 0, 0]]),
('normal control 7', [1234, [2880, 2400]], [[0, 1166, 1043, 480], [0, 1166, 1043, 0]]),
('normal control 8', [1234, [2880, 1358, 2500]],
[[0, 1166, 1043, 480], [0, 124, 1, 0], [0, 1166, 1043, 100]])],
[('regression: tolerance integer minutes 1', [1205, [2880, 1229]], [[0, 1195, 1075, 480], [0, 24, 0, 0]]),
('regression variant: tolerance integer minutes 2', [1234, [2880, 1358, 2500]],
[[0, 1166, 1043, 480], [0, 124, 1, 0], [0, 1166, 1043, 100]]),
('partial repair guard 3', [1205, [1381, 415, 1325]], [[0, 176, 56, 0], [790, 0, 0, 0], [0, 120, 0, 0]]),
('boundary control 4', [1500, [2500, 1000]], [[0, 900, 750, 100], [500, 0, 0, 0]]),
('boundary control 5', [1800, [2400, 3000]], [[0, 600, 420, 0], [0, 600, 420, 600]]),
('normal control 6', [1200, [1321, 1321]], [[0, 121, 1, 0], [0, 121, 1, 0]]),
('normal control 7', [1500, [1650, 2880]], [[0, 150, 0, 0], [0, 900, 750, 480]]),
('normal control 8', [2100, [2040, 0, 2100, 2500, 2880]],
[[60, 0, 0, 0], [2100, 0, 0, 0], [0, 0, 0, 0], [0, 300, 90, 100], [0, 300, 90, 480]])],
[('regression: tolerance integer minutes 1', [1234, [2880, 1056, 2880, 2400, 1357]],
[[0, 1166, 1043, 480], [178, 0, 0, 0], [0, 1166, 1043, 480], [0, 1166, 1043, 0], [0, 123, 0, 0]]),
('regression variant: tolerance integer minutes 2', [1205, [2508, 2500, 2400, 1700]],
[[0, 1195, 1075, 108], [0, 1195, 1075, 100], [0, 1195, 1075, 0], [0, 495, 375, 0]]),
('partial repair guard 3', [1234, [2400, 2400, 1234, 2500, 1174]],
[[0, 1166, 1043, 0], [0, 1166, 1043, 0], [0, 0, 0, 0], [0, 1166, 1043, 100], [60, 0, 0, 0]]),
('boundary control 4', [1205, [1325, 1326]], [[0, 120, 0, 0], [0, 121, 1, 0]]),
('boundary control 5', [1500, [2500, 1000]], [[0, 900, 750, 100], [500, 0, 0, 0]]),
('normal control 6', [1500, [1440, 1651]], [[60, 0, 0, 0], [0, 151, 1, 0]]),
('normal control 7', [2100, [2500, 2310, 0]], [[0, 300, 90, 100], [0, 210, 0, 0], [2100, 0, 0, 0]]),
('normal control 8', [1800, [1981, 1980, 1981]], [[0, 181, 1, 0], [0, 180, 0, 0], [0, 181, 1, 0]])],
[('regression: tolerance integer minutes 1', [1205, [2373, 1325, 1326, 1205]],
[[0, 1168, 1048, 0], [0, 120, 0, 0], [0, 121, 1, 0], [0, 0, 0, 0]]),
('regression variant: tolerance integer minutes 2', [1234, [1357, 143, 2500, 1604]],
[[0, 123, 0, 0], [1091, 0, 0, 0], [0, 1166, 1043, 100], [0, 370, 247, 0]]),
('partial repair guard 3', [1234, [1234, 2500, 1358]],
[[0, 0, 0, 0], [0, 1166, 1043, 100], [0, 124, 1, 0]]),
('boundary control 4', [1200, [1320, 1321]], [[0, 120, 0, 0], [0, 121, 1, 0]]),
('boundary control 5', [1205, [1325, 1326]], [[0, 120, 0, 0], [0, 121, 1, 0]]),
('normal control 6', [1500, [0, 2400, 0]], [[1500, 0, 0, 0], [0, 900, 750, 0], [1500, 0, 0, 0]]),
('normal control 7', [1200, [84, 1200, 1140, 0, 2755]],
[[1116, 0, 0, 0], [0, 0, 0, 0], [60, 0, 0, 0], [1200, 0, 0, 0], [0, 1200, 1080, 355]]),
('normal control 8', [1234, [1357, 2400, 175, 1433, 2473]],
[[0, 123, 0, 0], [0, 1166, 1043, 0], [1059, 0, 0, 0], [0, 199, 76, 0], [0, 1166, 1043, 73]])],
[('regression: tolerance integer minutes 1', [1205, [1145, 2400, 0, 2880]],
[[60, 0, 0, 0], [0, 1195, 1075, 0], [1205, 0, 0, 0], [0, 1195, 1075, 480]]),
('regression variant: tolerance integer minutes 2', [1205, [1205, 2400, 2400, 2400]],
[[0, 0, 0, 0], [0, 1195, 1075, 0], [0, 1195, 1075, 0], [0, 1195, 1075, 0]]),
('partial repair guard 3', [1205, [1205, 2880, 0]], [[0, 0, 0, 0], [0, 1195, 1075, 480], [1205, 0, 0, 0]]),
('boundary control 4', [1800, [2400, 3000]], [[0, 600, 420, 0], [0, 600, 420, 600]]),
('boundary control 5', [1200, [1320, 1321]], [[0, 120, 0, 0], [0, 121, 1, 0]]),
('normal control 6', [1234, [1357, 2500, 0, 1234]],
[[0, 123, 0, 0], [0, 1166, 1043, 100], [1234, 0, 0, 0], [0, 0, 0, 0]]),
('normal control 7', [1500, [1650, 0, 1500, 0, 1500]],
[[0, 150, 0, 0], [1500, 0, 0, 0], [0, 0, 0, 0], [1500, 0, 0, 0], [0, 0, 0, 0]]),
('normal control 8', [1200, [2267, 2400]], [[0, 1067, 947, 0], [0, 1200, 1080, 0]])]]
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: tolerance integer minutes 1 | [[0, 120, 0, 0], [0, 121, 1, 0]] | [[0, 120, 0, 0], [0, 121, 1, 0]] | Passed |
| regression variant: tolerance integer minutes 2 | [[60, 0, 0, 0], [0, 1166, 1043, 0]] | [[60, 0, 0, 0], [0, 1166, 1043, 0]] | Passed |
| partial repair guard 3 | [[60, 0, 0, 0], [0, 1166, 1043, 0], [0, 124, 1, 0]] | [[60, 0, 0, 0], [0, 1166, 1043, 0], [0, 124, 1, 0]] | Passed |
| boundary control 4 | [[0, 600, 420, 0], [0, 600, 420, 600]] | [[0, 600, 420, 0], [0, 600, 420, 600]] | Passed |
| boundary control 5 | [[0, 120, 0, 0], [0, 121, 1, 0]] | [[0, 120, 0, 0], [0, 121, 1, 0]] | Passed |
| normal control 6 | [[809, 0, 0, 0], [0, 120, 0, 0]] | [[809, 0, 0, 0], [0, 120, 0, 0]] | Passed |
| normal control 7 | [[0, 1166, 1043, 480], [0, 1166, 1043, 0]] | [[0, 1166, 1043, 480], [0, 1166, 1043, 0]] | Passed |
| normal control 8 | [[0, 1166, 1043, 480], [0, 124, 1, 0], [0, 1166, 1043, 100]] | [[0, 1166, 1043, 480], [0, 124, 1, 0], [0, 1166, 1043, 100]] | Passed |
SHA-256 / 2cad21fe86f4dc56a0c6452bf6b4a9797252093cbd20a5eb98afb1c0d6b418a5
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:03.236349+00:00.
Case digest / b664879295b36b436eb9e6102ecffab3839a89d6b77423800f3d0a9978a15aff