FA-94181 / Shift rostering labor rules / Open access
Fifteen-minute addition treated as de minimis · case 01
Adding exactly 15 minutes earns no premium.
ROOT CAUSE
The de-minimis comparison excludes 15 minutes.
VERIFIED REPAIR
Additions of 15 minutes or more earn the premium.
Unsuccessful approach: Paying the changed minutes for small additions breaks the de-minimis exemption.
Case contract
Each change is [kind (add/cut/cancel), notice minutes before the shift, changed minutes, initiator]. Changes initiated by the worker or mutual swaps, or with at least 14 days (20160 minutes) notice, earn nothing. Additions of at least 15 minutes earn 60 premium minutes. Cuts or cancellations earn 60, or max(60, lost // 2) with less than 24 hours notice. Return [per-change premiums, total].
Why this case matters
Fair-workweek predictability pay depends on precise notice thresholds and exemptions.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(changes):
out = []
for kind, notice, delta, by in changes:
p = 0
if by not in ('worker', 'mutual') and notice < 20160:
if kind == 'add':
p = 60 if delta > 15 else 0
elif notice < 1440:
p = max(60, delta // 2)
else:
p = 60
out.append(p)
return [out, sum(out)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: de minimis addition 1', [[['add', 20159, 15, 'employer']]], [[60], 60]),
('regression variant: de minimis addition 2',
[[['cancel', 1441, 240, 'employer'], ['add', 18720, 240, 'employer'], ['cancel', 30000, 60, 'employer'],
['add', 18720, 15, 'employer'], ['cut', 1440, 15, 'employer']]],
[[60, 60, 0, 60, 60], 240]),
('partial repair guard 3',
[[['add', 1439, 14, 'employer'], ['cancel', 18720, 90, 'employer'], ['add', 1440, 15, 'mutual']]],
[[0, 60, 0], 60]),
('boundary control 4', [[['cut', 1440, 240, 'employer']]], [[60], 60]),
('normal control 5', [[['cancel', 30000, 240, 'worker'], ['add', 20159, 90, 'employer']]], [[0, 60], 60]),
('normal control 6',
[[['cancel', 20161, 121, 'worker'], ['cut', 1441, 90, 'mutual'], ['add', 18720, 121, 'employer']]],
[[0, 0, 60], 60]),
('normal control 7',
[[['cancel', 1439, 30, 'employer'], ['cut', 30000, 10, 'employer'], ['add', 20159, 15, 'worker'],
['cut', 20160, 10, 'employer'], ['cut', 20161, 10, 'employer']]],
[[60, 0, 0, 0, 0], 60]),
('normal control 8',
[[['add', 1440, 16, 'worker'], ['cut', 1441, 15, 'employer'], ['cut', 5000, 14, 'worker'],
['cut', 1439, 240, 'employer']]],
[[0, 60, 0, 120], 180])],
[('regression: de minimis addition 1',
[[['add', 20160, 16, 'employer'], ['add', 60, 60, 'employer'], ['add', 18720, 15, 'employer']]],
[[0, 60, 60], 120]),
('regression variant: de minimis addition 2', [[['add', 60, 10, 'mutual'], ['add', 18720, 15, 'employer']]],
[[0, 60], 60]),
('partial repair guard 3',
[[['add', 30000, 16, 'worker'], ['add', 20159, 14, 'employer'], ['cancel', 30000, 15, 'worker']]],
[[0, 0, 0], 0]),
('boundary control 4', [[['cut', 100, 300, 'mutual']]], [[0], 0]),
('boundary control 5', [[['cancel', 1439, 240, 'employer']]], [[120], 120]),
('normal control 6',
[[['cut', 20159, 480, 'worker'], ['cancel', 60, 10, 'employer'], ['cut', 20159, 60, 'employer'],
['add', 20159, 14, 'employer'], ['cancel', 20161, 14, 'worker']]],
[[0, 60, 60, 0, 0], 120]),
('normal control 7',
[[['cancel', 60, 240, 'mutual'], ['add', 60, 60, 'mutual'], ['cancel', 1440, 10, 'mutual'],
['cancel', 20161, 121, 'worker'], ['cut', 1441, 90, 'employer']]],
[[0, 0, 0, 0, 60], 60]),
('normal control 8', [[['cut', 30000, 90, 'worker']]], [[0], 0])],
[('regression: de minimis addition 1', [[['add', 60, 10, 'mutual'], ['add', 18720, 15, 'employer']]],
[[0, 60], 60]),
('regression variant: de minimis addition 2',
[[['add', 1440, 480, 'employer'], ['cancel', 5000, 10, 'mutual'], ['cut', 20160, 90, 'employer'],
['add', 1439, 16, 'employer'], ['add', 1441, 15, 'employer']]],
[[60, 0, 0, 60, 60], 180]),
('partial repair guard 3',
[[['add', 5000, 90, 'employer'], ['cancel', 18720, 14, 'employer'], ['cut', 30000, 14, 'mutual'],
['cut', 1439, 30, 'employer'], ['add', 18720, 14, 'employer']]],
[[60, 60, 0, 60, 0], 180]),
('boundary control 4', [[['add', 1000, 14, 'employer']]], [[0], 0]),
('boundary control 5', [[['add', 20160, 60, 'employer']]], [[0], 0]),
('normal control 6',
[[['cut', 20161, 14, 'mutual'], ['add', 1439, 60, 'employer'], ['cut', 1440, 15, 'mutual']]],
[[0, 60, 0], 60]),
('normal control 7', [[['cancel', 5000, 240, 'employer'], ['cut', 1441, 121, 'worker']]], [[60, 0], 60]),
('normal control 8',
[[['add', 20161, 15, 'employer'], ['add', 60, 30, 'employer'], ['cancel', 5000, 15, 'employer'],
['add', 1439, 10, 'worker']]],
[[0, 60, 60, 0], 120])],
[('regression: de minimis addition 1',
[[['add', 18720, 90, 'employer'], ['add', 18720, 60, 'employer'], ['add', 5000, 15, 'employer'],
['cut', 30000, 10, 'worker'], ['add', 1439, 15, 'mutual']]],
[[60, 60, 60, 0, 0], 180]),
('regression variant: de minimis addition 2',
[[['add', 20160, 16, 'employer'], ['add', 60, 60, 'employer'], ['add', 18720, 15, 'employer']]],
[[0, 60, 60], 120]),
('partial repair guard 3', [[['add', 5000, 240, 'mutual'], ['add', 18720, 10, 'employer']]], [[0, 0], 0]),
('boundary control 4', [[['cancel', 100, 60, 'employer']]], [[60], 60]),
('boundary control 5', [[['cut', 1440, 240, 'employer']]], [[60], 60]),
('normal control 6',
[[['cut', 20161, 30, 'employer'], ['cancel', 30000, 121, 'worker'], ['add', 20161, 30, 'worker']]],
[[0, 0, 0], 0]),
('normal control 7', [[['cancel', 1439, 16, 'worker']]], [[0], 0]),
('normal control 8',
[[['add', 5000, 480, 'mutual'], ['add', 20160, 90, 'worker'], ['cut', 60, 16, 'mutual'],
['cancel', 1439, 14, 'mutual']]],
[[0, 0, 0, 0], 0])],
[('regression: de minimis addition 1',
[[['add', 1441, 15, 'employer'], ['cancel', 5000, 16, 'employer'], ['cut', 20160, 60, 'mutual'],
['cancel', 1440, 60, 'employer'], ['cancel', 18720, 30, 'employer']]],
[[60, 60, 0, 60, 60], 240]),
('regression variant: de minimis addition 2',
[[['cancel', 20160, 60, 'mutual'], ['add', 5000, 15, 'employer'], ['cancel', 20161, 121, 'employer'],
['cancel', 60, 240, 'worker'], ['cancel', 20161, 121, 'mutual']]],
[[0, 60, 0, 0, 0], 60]),
('partial repair guard 3',
[[['add', 1439, 14, 'employer'], ['cancel', 18720, 90, 'employer'], ['add', 1440, 15, 'mutual']]],
[[0, 60, 0], 60]),
('boundary control 4', [[['add', 20159, 15, 'employer']]], [[60], 60]),
('boundary control 5', [[['cut', 100, 300, 'mutual']]], [[0], 0]),
('normal control 6',
[[['cancel', 60, 16, 'worker'], ['cut', 20159, 14, 'mutual'], ['cut', 20160, 16, 'employer']]],
[[0, 0, 0], 0]),
('normal control 7',
[[['cancel', 1439, 121, 'worker'], ['cancel', 60, 240, 'worker'], ['cut', 20161, 30, 'worker'],
['cancel', 20160, 480, 'employer']]],
[[0, 0, 0, 0], 0]),
('normal control 8', [[['add', 1439, 480, 'mutual']]], [[0], 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: de minimis addition 1 | [[0], 0] | [[60], 60] | Failed |
| regression variant: de minimis addition 2 | [[60, 60, 0, 0, 60], 180] | [[60, 60, 0, 60, 60], 240] | Failed |
| partial repair guard 3 | [[0, 60, 0], 60] | [[0, 60, 0], 60] | Passed |
| boundary control 4 | [[60], 60] | [[60], 60] | Passed |
| normal control 5 | [[0, 60], 60] | [[0, 60], 60] | Passed |
| normal control 6 | [[0, 0, 60], 60] | [[0, 0, 60], 60] | Passed |
| normal control 7 | [[60, 0, 0, 0, 0], 60] | [[60, 0, 0, 0, 0], 60] | Passed |
| normal control 8 | [[0, 60, 0, 120], 180] | [[0, 60, 0, 120], 180] | Passed |
SHA-256 / 8dfd58bbe71c9b96949e7a172beb221ef3a5ef9f5266a08b393427e2eb656200
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(changes):
out = []
for kind, notice, delta, by in changes:
p = 0
if by not in ('worker', 'mutual') and notice < 20160:
if kind == 'add':
p = 60 if delta >= 15 else delta
elif notice < 1440:
p = max(60, delta // 2)
else:
p = 60
out.append(p)
return [out, sum(out)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: de minimis addition 1', [[['add', 20159, 15, 'employer']]], [[60], 60]),
('regression variant: de minimis addition 2',
[[['cancel', 1441, 240, 'employer'], ['add', 18720, 240, 'employer'], ['cancel', 30000, 60, 'employer'],
['add', 18720, 15, 'employer'], ['cut', 1440, 15, 'employer']]],
[[60, 60, 0, 60, 60], 240]),
('partial repair guard 3',
[[['add', 1439, 14, 'employer'], ['cancel', 18720, 90, 'employer'], ['add', 1440, 15, 'mutual']]],
[[0, 60, 0], 60]),
('boundary control 4', [[['cut', 1440, 240, 'employer']]], [[60], 60]),
('normal control 5', [[['cancel', 30000, 240, 'worker'], ['add', 20159, 90, 'employer']]], [[0, 60], 60]),
('normal control 6',
[[['cancel', 20161, 121, 'worker'], ['cut', 1441, 90, 'mutual'], ['add', 18720, 121, 'employer']]],
[[0, 0, 60], 60]),
('normal control 7',
[[['cancel', 1439, 30, 'employer'], ['cut', 30000, 10, 'employer'], ['add', 20159, 15, 'worker'],
['cut', 20160, 10, 'employer'], ['cut', 20161, 10, 'employer']]],
[[60, 0, 0, 0, 0], 60]),
('normal control 8',
[[['add', 1440, 16, 'worker'], ['cut', 1441, 15, 'employer'], ['cut', 5000, 14, 'worker'],
['cut', 1439, 240, 'employer']]],
[[0, 60, 0, 120], 180])],
[('regression: de minimis addition 1',
[[['add', 20160, 16, 'employer'], ['add', 60, 60, 'employer'], ['add', 18720, 15, 'employer']]],
[[0, 60, 60], 120]),
('regression variant: de minimis addition 2', [[['add', 60, 10, 'mutual'], ['add', 18720, 15, 'employer']]],
[[0, 60], 60]),
('partial repair guard 3',
[[['add', 30000, 16, 'worker'], ['add', 20159, 14, 'employer'], ['cancel', 30000, 15, 'worker']]],
[[0, 0, 0], 0]),
('boundary control 4', [[['cut', 100, 300, 'mutual']]], [[0], 0]),
('boundary control 5', [[['cancel', 1439, 240, 'employer']]], [[120], 120]),
('normal control 6',
[[['cut', 20159, 480, 'worker'], ['cancel', 60, 10, 'employer'], ['cut', 20159, 60, 'employer'],
['add', 20159, 14, 'employer'], ['cancel', 20161, 14, 'worker']]],
[[0, 60, 60, 0, 0], 120]),
('normal control 7',
[[['cancel', 60, 240, 'mutual'], ['add', 60, 60, 'mutual'], ['cancel', 1440, 10, 'mutual'],
['cancel', 20161, 121, 'worker'], ['cut', 1441, 90, 'employer']]],
[[0, 0, 0, 0, 60], 60]),
('normal control 8', [[['cut', 30000, 90, 'worker']]], [[0], 0])],
[('regression: de minimis addition 1', [[['add', 60, 10, 'mutual'], ['add', 18720, 15, 'employer']]],
[[0, 60], 60]),
('regression variant: de minimis addition 2',
[[['add', 1440, 480, 'employer'], ['cancel', 5000, 10, 'mutual'], ['cut', 20160, 90, 'employer'],
['add', 1439, 16, 'employer'], ['add', 1441, 15, 'employer']]],
[[60, 0, 0, 60, 60], 180]),
('partial repair guard 3',
[[['add', 5000, 90, 'employer'], ['cancel', 18720, 14, 'employer'], ['cut', 30000, 14, 'mutual'],
['cut', 1439, 30, 'employer'], ['add', 18720, 14, 'employer']]],
[[60, 60, 0, 60, 0], 180]),
('boundary control 4', [[['add', 1000, 14, 'employer']]], [[0], 0]),
('boundary control 5', [[['add', 20160, 60, 'employer']]], [[0], 0]),
('normal control 6',
[[['cut', 20161, 14, 'mutual'], ['add', 1439, 60, 'employer'], ['cut', 1440, 15, 'mutual']]],
[[0, 60, 0], 60]),
('normal control 7', [[['cancel', 5000, 240, 'employer'], ['cut', 1441, 121, 'worker']]], [[60, 0], 60]),
('normal control 8',
[[['add', 20161, 15, 'employer'], ['add', 60, 30, 'employer'], ['cancel', 5000, 15, 'employer'],
['add', 1439, 10, 'worker']]],
[[0, 60, 60, 0], 120])],
[('regression: de minimis addition 1',
[[['add', 18720, 90, 'employer'], ['add', 18720, 60, 'employer'], ['add', 5000, 15, 'employer'],
['cut', 30000, 10, 'worker'], ['add', 1439, 15, 'mutual']]],
[[60, 60, 60, 0, 0], 180]),
('regression variant: de minimis addition 2',
[[['add', 20160, 16, 'employer'], ['add', 60, 60, 'employer'], ['add', 18720, 15, 'employer']]],
[[0, 60, 60], 120]),
('partial repair guard 3', [[['add', 5000, 240, 'mutual'], ['add', 18720, 10, 'employer']]], [[0, 0], 0]),
('boundary control 4', [[['cancel', 100, 60, 'employer']]], [[60], 60]),
('boundary control 5', [[['cut', 1440, 240, 'employer']]], [[60], 60]),
('normal control 6',
[[['cut', 20161, 30, 'employer'], ['cancel', 30000, 121, 'worker'], ['add', 20161, 30, 'worker']]],
[[0, 0, 0], 0]),
('normal control 7', [[['cancel', 1439, 16, 'worker']]], [[0], 0]),
('normal control 8',
[[['add', 5000, 480, 'mutual'], ['add', 20160, 90, 'worker'], ['cut', 60, 16, 'mutual'],
['cancel', 1439, 14, 'mutual']]],
[[0, 0, 0, 0], 0])],
[('regression: de minimis addition 1',
[[['add', 1441, 15, 'employer'], ['cancel', 5000, 16, 'employer'], ['cut', 20160, 60, 'mutual'],
['cancel', 1440, 60, 'employer'], ['cancel', 18720, 30, 'employer']]],
[[60, 60, 0, 60, 60], 240]),
('regression variant: de minimis addition 2',
[[['cancel', 20160, 60, 'mutual'], ['add', 5000, 15, 'employer'], ['cancel', 20161, 121, 'employer'],
['cancel', 60, 240, 'worker'], ['cancel', 20161, 121, 'mutual']]],
[[0, 60, 0, 0, 0], 60]),
('partial repair guard 3',
[[['add', 1439, 14, 'employer'], ['cancel', 18720, 90, 'employer'], ['add', 1440, 15, 'mutual']]],
[[0, 60, 0], 60]),
('boundary control 4', [[['add', 20159, 15, 'employer']]], [[60], 60]),
('boundary control 5', [[['cut', 100, 300, 'mutual']]], [[0], 0]),
('normal control 6',
[[['cancel', 60, 16, 'worker'], ['cut', 20159, 14, 'mutual'], ['cut', 20160, 16, 'employer']]],
[[0, 0, 0], 0]),
('normal control 7',
[[['cancel', 1439, 121, 'worker'], ['cancel', 60, 240, 'worker'], ['cut', 20161, 30, 'worker'],
['cancel', 20160, 480, 'employer']]],
[[0, 0, 0, 0], 0]),
('normal control 8', [[['add', 1439, 480, 'mutual']]], [[0], 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: de minimis addition 1 | [[60], 60] | [[60], 60] | Passed |
| regression variant: de minimis addition 2 | [[60, 60, 0, 60, 60], 240] | [[60, 60, 0, 60, 60], 240] | Passed |
| partial repair guard 3 | [[14, 60, 0], 74] | [[0, 60, 0], 60] | Failed |
| boundary control 4 | [[60], 60] | [[60], 60] | Passed |
| normal control 5 | [[0, 60], 60] | [[0, 60], 60] | Passed |
| normal control 6 | [[0, 0, 60], 60] | [[0, 0, 60], 60] | Passed |
| normal control 7 | [[60, 0, 0, 0, 0], 60] | [[60, 0, 0, 0, 0], 60] | Passed |
| normal control 8 | [[0, 60, 0, 120], 180] | [[0, 60, 0, 120], 180] | Passed |
SHA-256 / e46755444f1db1284ef6e720c02ddde707ebccee2d516ea58db7d690de82c9d8
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(changes):
out = []
for kind, notice, delta, by in changes:
p = 0
if by not in ('worker', 'mutual') and notice < 20160:
if kind == 'add':
p = 60 if delta >= 15 else 0
elif notice < 1440:
p = max(60, delta // 2)
else:
p = 60
out.append(p)
return [out, sum(out)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: de minimis addition 1', [[['add', 20159, 15, 'employer']]], [[60], 60]),
('regression variant: de minimis addition 2',
[[['cancel', 1441, 240, 'employer'], ['add', 18720, 240, 'employer'], ['cancel', 30000, 60, 'employer'],
['add', 18720, 15, 'employer'], ['cut', 1440, 15, 'employer']]],
[[60, 60, 0, 60, 60], 240]),
('partial repair guard 3',
[[['add', 1439, 14, 'employer'], ['cancel', 18720, 90, 'employer'], ['add', 1440, 15, 'mutual']]],
[[0, 60, 0], 60]),
('boundary control 4', [[['cut', 1440, 240, 'employer']]], [[60], 60]),
('normal control 5', [[['cancel', 30000, 240, 'worker'], ['add', 20159, 90, 'employer']]], [[0, 60], 60]),
('normal control 6',
[[['cancel', 20161, 121, 'worker'], ['cut', 1441, 90, 'mutual'], ['add', 18720, 121, 'employer']]],
[[0, 0, 60], 60]),
('normal control 7',
[[['cancel', 1439, 30, 'employer'], ['cut', 30000, 10, 'employer'], ['add', 20159, 15, 'worker'],
['cut', 20160, 10, 'employer'], ['cut', 20161, 10, 'employer']]],
[[60, 0, 0, 0, 0], 60]),
('normal control 8',
[[['add', 1440, 16, 'worker'], ['cut', 1441, 15, 'employer'], ['cut', 5000, 14, 'worker'],
['cut', 1439, 240, 'employer']]],
[[0, 60, 0, 120], 180])],
[('regression: de minimis addition 1',
[[['add', 20160, 16, 'employer'], ['add', 60, 60, 'employer'], ['add', 18720, 15, 'employer']]],
[[0, 60, 60], 120]),
('regression variant: de minimis addition 2', [[['add', 60, 10, 'mutual'], ['add', 18720, 15, 'employer']]],
[[0, 60], 60]),
('partial repair guard 3',
[[['add', 30000, 16, 'worker'], ['add', 20159, 14, 'employer'], ['cancel', 30000, 15, 'worker']]],
[[0, 0, 0], 0]),
('boundary control 4', [[['cut', 100, 300, 'mutual']]], [[0], 0]),
('boundary control 5', [[['cancel', 1439, 240, 'employer']]], [[120], 120]),
('normal control 6',
[[['cut', 20159, 480, 'worker'], ['cancel', 60, 10, 'employer'], ['cut', 20159, 60, 'employer'],
['add', 20159, 14, 'employer'], ['cancel', 20161, 14, 'worker']]],
[[0, 60, 60, 0, 0], 120]),
('normal control 7',
[[['cancel', 60, 240, 'mutual'], ['add', 60, 60, 'mutual'], ['cancel', 1440, 10, 'mutual'],
['cancel', 20161, 121, 'worker'], ['cut', 1441, 90, 'employer']]],
[[0, 0, 0, 0, 60], 60]),
('normal control 8', [[['cut', 30000, 90, 'worker']]], [[0], 0])],
[('regression: de minimis addition 1', [[['add', 60, 10, 'mutual'], ['add', 18720, 15, 'employer']]],
[[0, 60], 60]),
('regression variant: de minimis addition 2',
[[['add', 1440, 480, 'employer'], ['cancel', 5000, 10, 'mutual'], ['cut', 20160, 90, 'employer'],
['add', 1439, 16, 'employer'], ['add', 1441, 15, 'employer']]],
[[60, 0, 0, 60, 60], 180]),
('partial repair guard 3',
[[['add', 5000, 90, 'employer'], ['cancel', 18720, 14, 'employer'], ['cut', 30000, 14, 'mutual'],
['cut', 1439, 30, 'employer'], ['add', 18720, 14, 'employer']]],
[[60, 60, 0, 60, 0], 180]),
('boundary control 4', [[['add', 1000, 14, 'employer']]], [[0], 0]),
('boundary control 5', [[['add', 20160, 60, 'employer']]], [[0], 0]),
('normal control 6',
[[['cut', 20161, 14, 'mutual'], ['add', 1439, 60, 'employer'], ['cut', 1440, 15, 'mutual']]],
[[0, 60, 0], 60]),
('normal control 7', [[['cancel', 5000, 240, 'employer'], ['cut', 1441, 121, 'worker']]], [[60, 0], 60]),
('normal control 8',
[[['add', 20161, 15, 'employer'], ['add', 60, 30, 'employer'], ['cancel', 5000, 15, 'employer'],
['add', 1439, 10, 'worker']]],
[[0, 60, 60, 0], 120])],
[('regression: de minimis addition 1',
[[['add', 18720, 90, 'employer'], ['add', 18720, 60, 'employer'], ['add', 5000, 15, 'employer'],
['cut', 30000, 10, 'worker'], ['add', 1439, 15, 'mutual']]],
[[60, 60, 60, 0, 0], 180]),
('regression variant: de minimis addition 2',
[[['add', 20160, 16, 'employer'], ['add', 60, 60, 'employer'], ['add', 18720, 15, 'employer']]],
[[0, 60, 60], 120]),
('partial repair guard 3', [[['add', 5000, 240, 'mutual'], ['add', 18720, 10, 'employer']]], [[0, 0], 0]),
('boundary control 4', [[['cancel', 100, 60, 'employer']]], [[60], 60]),
('boundary control 5', [[['cut', 1440, 240, 'employer']]], [[60], 60]),
('normal control 6',
[[['cut', 20161, 30, 'employer'], ['cancel', 30000, 121, 'worker'], ['add', 20161, 30, 'worker']]],
[[0, 0, 0], 0]),
('normal control 7', [[['cancel', 1439, 16, 'worker']]], [[0], 0]),
('normal control 8',
[[['add', 5000, 480, 'mutual'], ['add', 20160, 90, 'worker'], ['cut', 60, 16, 'mutual'],
['cancel', 1439, 14, 'mutual']]],
[[0, 0, 0, 0], 0])],
[('regression: de minimis addition 1',
[[['add', 1441, 15, 'employer'], ['cancel', 5000, 16, 'employer'], ['cut', 20160, 60, 'mutual'],
['cancel', 1440, 60, 'employer'], ['cancel', 18720, 30, 'employer']]],
[[60, 60, 0, 60, 60], 240]),
('regression variant: de minimis addition 2',
[[['cancel', 20160, 60, 'mutual'], ['add', 5000, 15, 'employer'], ['cancel', 20161, 121, 'employer'],
['cancel', 60, 240, 'worker'], ['cancel', 20161, 121, 'mutual']]],
[[0, 60, 0, 0, 0], 60]),
('partial repair guard 3',
[[['add', 1439, 14, 'employer'], ['cancel', 18720, 90, 'employer'], ['add', 1440, 15, 'mutual']]],
[[0, 60, 0], 60]),
('boundary control 4', [[['add', 20159, 15, 'employer']]], [[60], 60]),
('boundary control 5', [[['cut', 100, 300, 'mutual']]], [[0], 0]),
('normal control 6',
[[['cancel', 60, 16, 'worker'], ['cut', 20159, 14, 'mutual'], ['cut', 20160, 16, 'employer']]],
[[0, 0, 0], 0]),
('normal control 7',
[[['cancel', 1439, 121, 'worker'], ['cancel', 60, 240, 'worker'], ['cut', 20161, 30, 'worker'],
['cancel', 20160, 480, 'employer']]],
[[0, 0, 0, 0], 0]),
('normal control 8', [[['add', 1439, 480, 'mutual']]], [[0], 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: de minimis addition 1 | [[60], 60] | [[60], 60] | Passed |
| regression variant: de minimis addition 2 | [[60, 60, 0, 60, 60], 240] | [[60, 60, 0, 60, 60], 240] | Passed |
| partial repair guard 3 | [[0, 60, 0], 60] | [[0, 60, 0], 60] | Passed |
| boundary control 4 | [[60], 60] | [[60], 60] | Passed |
| normal control 5 | [[0, 60], 60] | [[0, 60], 60] | Passed |
| normal control 6 | [[0, 0, 60], 60] | [[0, 0, 60], 60] | Passed |
| normal control 7 | [[60, 0, 0, 0, 0], 60] | [[60, 0, 0, 0, 0], 60] | Passed |
| normal control 8 | [[0, 60, 0, 120], 180] | [[0, 60, 0, 120], 180] | Passed |
SHA-256 / aec50b370c22bc60f174247ac5e933f07508488320cb3ffde0e2cbf45e8d2a5c
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:01.972842+00:00.
Case digest / 9b6694e16bef66b752926e3fb0b9a956d360977af82a5c77fcd0393529a3ae04