FAILURE MAP
← Case archive

FA-94251 / Shift rostering labor rules / Open access

Leave weeks averaged in as zero-hour weeks · case 01

Taking leave lowers the average, hiding excessive hours in other weeks.

Verified by executionVariant 1 · 8 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

Weeks with excluded days are counted as zero instead of being skipped.

VERIFIED REPAIR

Skip weeks with any excluded day and extend the period.

Unsuccessful approach: Pro-rating leave weeks still includes them in the reference period.

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
        counted.append(m if ex == 0 else 0)
    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: excluded week as zero 1', [[[3000, 0], [0, 7], [2800, 0], [2900, 0]], 3, 2880],
   [3, 2900, True]),
  ('regression variant: excluded week as zero 2',
   [[[0, 1], [0, 3], [3300, 0], [3000, 5], [2880, 0], [3300, 3], [3300, 1]], 3, 2880], [2, 3090, True]),
  ('partial repair guard 3', [[[2881, 0], [2880, 3], [3000, 3], [1800, 1], [0, 7], [1800, 0]], 4, 2880],
   [2, 2340, 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, 1], [2881, 3], [3000, 0]], 3, 2880], [1, 3000, True]),
  ('normal control 7',
   [[[2881, 5], [3000, 7], [3300, 0], [3000, 0], [2880, 3], [3300, 7], [2880, 0]], 5, 2880],
   [3, 3060, True]),
  ('normal control 8',
   [[[3300, 1], [3300, 7], [2400, 7], [3000, 0], [1800, 0], [1800, 7], [2881, 1]], 3, 2880],
   [2, 2400, False])],
 [('regression: excluded week as zero 1', [[[3000, 0], [1000, 2], [3000, 0], [3000, 0]], 3, 2880],
   [3, 3000, True]),
  ('regression variant: excluded week as zero 2', [[[0, 0], [2400, 0], [0, 1], [2881, 3]], 5, 2880],
   [2, 1200, False]),
  ('partial repair guard 3',
   [[[3000, 7], [3000, 5], [2400, 5], [2400, 5], [2881, 7], [2880, 7], [3000, 0], [3300, 3]], 4, 2880],
   [1, 3000, True]),
  ('boundary control 4', [[[2000, 1], [3000, 0]], 3, 2880], [1, 3000, True]),
  ('normal control 5', [[[2400, 5], [3300, 5], [2881, 0], [0, 5], [0, 0], [3300, 3], [2400, 7]], 5, 2880],
   [2, 1440, False]),
  ('normal control 6',
   [[[3300, 0], [2881, 5], [2881, 3], [2400, 5], [3000, 0], [1800, 7], [0, 0], [0, 0]], 5, 2880],
   [4, 1575, False]),
  ('normal control 7',
   [[[0, 1], [0, 0], [2881, 5], [2880, 1], [2880, 3], [3300, 5], [3300, 3], [1800, 7], [3000, 5]], 3, 2880],
   [1, 0, False]),
  ('normal control 8', [[[3300, 5], [2881, 0], [3300, 5], [0, 5], [3300, 0], [0, 5], [2400, 0]], 5, 2880],
   [3, 2860, False])],
 [('regression: excluded week as zero 1', [[[2000, 1], [3000, 0]], 3, 2880], [1, 3000, True]),
  ('regression variant: excluded week as zero 2',
   [[[3300, 5], [2400, 5], [2400, 0], [2881, 5], [3000, 7], [2881, 0]], 4, 2880], [2, 2640, False]),
  ('partial repair guard 3', [[[1800, 1], [2881, 3], [3000, 0]], 3, 2880], [1, 3000, True]),
  ('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', [[[0, 0], [1800, 0], [3000, 7], [3300, 0], [3000, 5], [2400, 0], [2880, 0]], 4, 2880],
   [4, 1875, False]),
  ('normal control 7', [[[1800, 3], [0, 0], [0, 5], [2880, 3], [2880, 1], [2400, 5], [1800, 3]], 4, 2880],
   [1, 0, False]),
  ('normal control 8', [[[2881, 7], [2880, 0], [2400, 3], [2880, 3]], 3, 2880], [1, 2880, False])],
 [('regression: excluded week as zero 1', [[[2400, 1], [3000, 5], [3300, 1]], 3, 2880], [0, 0, False]),
  ('regression variant: excluded week as zero 2',
   [[[2400, 0], [2880, 0], [2881, 3], [3000, 1], [1800, 0], [2400, 0]], 5, 2880], [4, 2370, False]),
  ('partial repair guard 3', [[[0, 0], [2881, 3], [2881, 7], [3000, 0], [2880, 5], [0, 0]], 5, 2880],
   [3, 1000, 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', [[[3300, 7], [1800, 7], [3000, 5], [2881, 3], [3300, 5]], 4, 2880], [0, 0, False]),
  ('normal control 7', [[[2880, 3], [0, 0], [2400, 1], [2880, 7], [2881, 5], [3300, 0], [3300, 1]], 3, 2880],
   [2, 1650, False]),
  ('normal control 8',
   [[[2880, 7], [3000, 7], [1800, 0], [0, 5], [2880, 7], [1800, 5], [3300, 0], [1800, 0]], 5, 2880],
   [3, 2300, False])],
 [('regression: excluded week as zero 1',
   [[[2400, 5], [3300, 0], [0, 0], [0, 3], [1800, 0], [2881, 5], [2400, 7]], 3, 2880], [3, 1700, False]),
  ('regression variant: excluded week as zero 2',
   [[[2881, 0], [1800, 0], [2400, 5], [3300, 7], [3300, 3], [3300, 0], [1800, 0]], 3, 2880],
   [3, 2660, False]),
  ('partial repair guard 3',
   [[[3000, 5], [1800, 0], [1800, 0], [3300, 3], [2400, 0], [2880, 0], [2881, 7], [3000, 7], [2400, 0]], 5,
    2880],
   [5, 2256, 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', [[[2400, 0], [0, 0], [3300, 7], [3000, 3]], 4, 2880], [2, 1200, False]),
  ('normal control 7', [[[1800, 0], [0, 0], [1800, 0], [0, 1], [2881, 1], [3300, 0], [3000, 0]], 4, 2880],
   [4, 1725, False]),
  ('normal control 8', [[[2400, 1], [2881, 7], [3000, 5], [0, 0], [2881, 3], [3300, 3]], 3, 2880],
   [1, 0, 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 fixtureActualExpectedOutcome
regression: excluded week as zero 1[3, 1933, False][3, 2900, True]Failed
regression variant: excluded week as zero 2[3, 1100, False][2, 3090, True]Failed
partial repair guard 3[4, 720, False][2, 2340, False]Failed
boundary control 4[2, 1500, False][1, 3000, True]Failed
boundary control 5[3, 2880, False][3, 2880, False]Passed
normal control 6[3, 1000, False][1, 3000, True]Failed
normal control 7[5, 1260, False][3, 3060, True]Failed
normal control 8[3, 0, False][2, 2400, False]Failed

SHA-256 / cdd649c4cc6e74ed7ab006ad23d4e065a5d574b5b239bb43f7ef5bd0ace91ff7

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
        counted.append(m * (7 - ex) // 7)
    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: excluded week as zero 1', [[[3000, 0], [0, 7], [2800, 0], [2900, 0]], 3, 2880],
   [3, 2900, True]),
  ('regression variant: excluded week as zero 2',
   [[[0, 1], [0, 3], [3300, 0], [3000, 5], [2880, 0], [3300, 3], [3300, 1]], 3, 2880], [2, 3090, True]),
  ('partial repair guard 3', [[[2881, 0], [2880, 3], [3000, 3], [1800, 1], [0, 7], [1800, 0]], 4, 2880],
   [2, 2340, 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, 1], [2881, 3], [3000, 0]], 3, 2880], [1, 3000, True]),
  ('normal control 7',
   [[[2881, 5], [3000, 7], [3300, 0], [3000, 0], [2880, 3], [3300, 7], [2880, 0]], 5, 2880],
   [3, 3060, True]),
  ('normal control 8',
   [[[3300, 1], [3300, 7], [2400, 7], [3000, 0], [1800, 0], [1800, 7], [2881, 1]], 3, 2880],
   [2, 2400, False])],
 [('regression: excluded week as zero 1', [[[3000, 0], [1000, 2], [3000, 0], [3000, 0]], 3, 2880],
   [3, 3000, True]),
  ('regression variant: excluded week as zero 2', [[[0, 0], [2400, 0], [0, 1], [2881, 3]], 5, 2880],
   [2, 1200, False]),
  ('partial repair guard 3',
   [[[3000, 7], [3000, 5], [2400, 5], [2400, 5], [2881, 7], [2880, 7], [3000, 0], [3300, 3]], 4, 2880],
   [1, 3000, True]),
  ('boundary control 4', [[[2000, 1], [3000, 0]], 3, 2880], [1, 3000, True]),
  ('normal control 5', [[[2400, 5], [3300, 5], [2881, 0], [0, 5], [0, 0], [3300, 3], [2400, 7]], 5, 2880],
   [2, 1440, False]),
  ('normal control 6',
   [[[3300, 0], [2881, 5], [2881, 3], [2400, 5], [3000, 0], [1800, 7], [0, 0], [0, 0]], 5, 2880],
   [4, 1575, False]),
  ('normal control 7',
   [[[0, 1], [0, 0], [2881, 5], [2880, 1], [2880, 3], [3300, 5], [3300, 3], [1800, 7], [3000, 5]], 3, 2880],
   [1, 0, False]),
  ('normal control 8', [[[3300, 5], [2881, 0], [3300, 5], [0, 5], [3300, 0], [0, 5], [2400, 0]], 5, 2880],
   [3, 2860, False])],
 [('regression: excluded week as zero 1', [[[2000, 1], [3000, 0]], 3, 2880], [1, 3000, True]),
  ('regression variant: excluded week as zero 2',
   [[[3300, 5], [2400, 5], [2400, 0], [2881, 5], [3000, 7], [2881, 0]], 4, 2880], [2, 2640, False]),
  ('partial repair guard 3', [[[1800, 1], [2881, 3], [3000, 0]], 3, 2880], [1, 3000, True]),
  ('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', [[[0, 0], [1800, 0], [3000, 7], [3300, 0], [3000, 5], [2400, 0], [2880, 0]], 4, 2880],
   [4, 1875, False]),
  ('normal control 7', [[[1800, 3], [0, 0], [0, 5], [2880, 3], [2880, 1], [2400, 5], [1800, 3]], 4, 2880],
   [1, 0, False]),
  ('normal control 8', [[[2881, 7], [2880, 0], [2400, 3], [2880, 3]], 3, 2880], [1, 2880, False])],
 [('regression: excluded week as zero 1', [[[2400, 1], [3000, 5], [3300, 1]], 3, 2880], [0, 0, False]),
  ('regression variant: excluded week as zero 2',
   [[[2400, 0], [2880, 0], [2881, 3], [3000, 1], [1800, 0], [2400, 0]], 5, 2880], [4, 2370, False]),
  ('partial repair guard 3', [[[0, 0], [2881, 3], [2881, 7], [3000, 0], [2880, 5], [0, 0]], 5, 2880],
   [3, 1000, 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', [[[3300, 7], [1800, 7], [3000, 5], [2881, 3], [3300, 5]], 4, 2880], [0, 0, False]),
  ('normal control 7', [[[2880, 3], [0, 0], [2400, 1], [2880, 7], [2881, 5], [3300, 0], [3300, 1]], 3, 2880],
   [2, 1650, False]),
  ('normal control 8',
   [[[2880, 7], [3000, 7], [1800, 0], [0, 5], [2880, 7], [1800, 5], [3300, 0], [1800, 0]], 5, 2880],
   [3, 2300, False])],
 [('regression: excluded week as zero 1',
   [[[2400, 5], [3300, 0], [0, 0], [0, 3], [1800, 0], [2881, 5], [2400, 7]], 3, 2880], [3, 1700, False]),
  ('regression variant: excluded week as zero 2',
   [[[2881, 0], [1800, 0], [2400, 5], [3300, 7], [3300, 3], [3300, 0], [1800, 0]], 3, 2880],
   [3, 2660, False]),
  ('partial repair guard 3',
   [[[3000, 5], [1800, 0], [1800, 0], [3300, 3], [2400, 0], [2880, 0], [2881, 7], [3000, 7], [2400, 0]], 5,
    2880],
   [5, 2256, 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', [[[2400, 0], [0, 0], [3300, 7], [3000, 3]], 4, 2880], [2, 1200, False]),
  ('normal control 7', [[[1800, 0], [0, 0], [1800, 0], [0, 1], [2881, 1], [3300, 0], [3000, 0]], 4, 2880],
   [4, 1725, False]),
  ('normal control 8', [[[2400, 1], [2881, 7], [3000, 5], [0, 0], [2881, 3], [3300, 3]], 3, 2880],
   [1, 0, 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 fixtureActualExpectedOutcome
regression: excluded week as zero 1[3, 1933, False][3, 2900, True]Failed
regression variant: excluded week as zero 2[3, 1100, False][2, 3090, True]Failed
partial repair guard 3[4, 1945, False][2, 2340, False]Failed
boundary control 4[2, 2357, False][1, 3000, True]Failed
boundary control 5[3, 2880, False][3, 2880, False]Passed
normal control 6[3, 2062, False][1, 3000, True]Failed
normal control 7[5, 1753, False][3, 3060, True]Failed
normal control 8[3, 942, False][2, 2400, False]Failed

SHA-256 / 9641c2905e8a6f5215291ed9117652fd4e63c8dca8aec563abc938dc899d8d7d

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: excluded week as zero 1', [[[3000, 0], [0, 7], [2800, 0], [2900, 0]], 3, 2880],
   [3, 2900, True]),
  ('regression variant: excluded week as zero 2',
   [[[0, 1], [0, 3], [3300, 0], [3000, 5], [2880, 0], [3300, 3], [3300, 1]], 3, 2880], [2, 3090, True]),
  ('partial repair guard 3', [[[2881, 0], [2880, 3], [3000, 3], [1800, 1], [0, 7], [1800, 0]], 4, 2880],
   [2, 2340, 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, 1], [2881, 3], [3000, 0]], 3, 2880], [1, 3000, True]),
  ('normal control 7',
   [[[2881, 5], [3000, 7], [3300, 0], [3000, 0], [2880, 3], [3300, 7], [2880, 0]], 5, 2880],
   [3, 3060, True]),
  ('normal control 8',
   [[[3300, 1], [3300, 7], [2400, 7], [3000, 0], [1800, 0], [1800, 7], [2881, 1]], 3, 2880],
   [2, 2400, False])],
 [('regression: excluded week as zero 1', [[[3000, 0], [1000, 2], [3000, 0], [3000, 0]], 3, 2880],
   [3, 3000, True]),
  ('regression variant: excluded week as zero 2', [[[0, 0], [2400, 0], [0, 1], [2881, 3]], 5, 2880],
   [2, 1200, False]),
  ('partial repair guard 3',
   [[[3000, 7], [3000, 5], [2400, 5], [2400, 5], [2881, 7], [2880, 7], [3000, 0], [3300, 3]], 4, 2880],
   [1, 3000, True]),
  ('boundary control 4', [[[2000, 1], [3000, 0]], 3, 2880], [1, 3000, True]),
  ('normal control 5', [[[2400, 5], [3300, 5], [2881, 0], [0, 5], [0, 0], [3300, 3], [2400, 7]], 5, 2880],
   [2, 1440, False]),
  ('normal control 6',
   [[[3300, 0], [2881, 5], [2881, 3], [2400, 5], [3000, 0], [1800, 7], [0, 0], [0, 0]], 5, 2880],
   [4, 1575, False]),
  ('normal control 7',
   [[[0, 1], [0, 0], [2881, 5], [2880, 1], [2880, 3], [3300, 5], [3300, 3], [1800, 7], [3000, 5]], 3, 2880],
   [1, 0, False]),
  ('normal control 8', [[[3300, 5], [2881, 0], [3300, 5], [0, 5], [3300, 0], [0, 5], [2400, 0]], 5, 2880],
   [3, 2860, False])],
 [('regression: excluded week as zero 1', [[[2000, 1], [3000, 0]], 3, 2880], [1, 3000, True]),
  ('regression variant: excluded week as zero 2',
   [[[3300, 5], [2400, 5], [2400, 0], [2881, 5], [3000, 7], [2881, 0]], 4, 2880], [2, 2640, False]),
  ('partial repair guard 3', [[[1800, 1], [2881, 3], [3000, 0]], 3, 2880], [1, 3000, True]),
  ('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', [[[0, 0], [1800, 0], [3000, 7], [3300, 0], [3000, 5], [2400, 0], [2880, 0]], 4, 2880],
   [4, 1875, False]),
  ('normal control 7', [[[1800, 3], [0, 0], [0, 5], [2880, 3], [2880, 1], [2400, 5], [1800, 3]], 4, 2880],
   [1, 0, False]),
  ('normal control 8', [[[2881, 7], [2880, 0], [2400, 3], [2880, 3]], 3, 2880], [1, 2880, False])],
 [('regression: excluded week as zero 1', [[[2400, 1], [3000, 5], [3300, 1]], 3, 2880], [0, 0, False]),
  ('regression variant: excluded week as zero 2',
   [[[2400, 0], [2880, 0], [2881, 3], [3000, 1], [1800, 0], [2400, 0]], 5, 2880], [4, 2370, False]),
  ('partial repair guard 3', [[[0, 0], [2881, 3], [2881, 7], [3000, 0], [2880, 5], [0, 0]], 5, 2880],
   [3, 1000, 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', [[[3300, 7], [1800, 7], [3000, 5], [2881, 3], [3300, 5]], 4, 2880], [0, 0, False]),
  ('normal control 7', [[[2880, 3], [0, 0], [2400, 1], [2880, 7], [2881, 5], [3300, 0], [3300, 1]], 3, 2880],
   [2, 1650, False]),
  ('normal control 8',
   [[[2880, 7], [3000, 7], [1800, 0], [0, 5], [2880, 7], [1800, 5], [3300, 0], [1800, 0]], 5, 2880],
   [3, 2300, False])],
 [('regression: excluded week as zero 1',
   [[[2400, 5], [3300, 0], [0, 0], [0, 3], [1800, 0], [2881, 5], [2400, 7]], 3, 2880], [3, 1700, False]),
  ('regression variant: excluded week as zero 2',
   [[[2881, 0], [1800, 0], [2400, 5], [3300, 7], [3300, 3], [3300, 0], [1800, 0]], 3, 2880],
   [3, 2660, False]),
  ('partial repair guard 3',
   [[[3000, 5], [1800, 0], [1800, 0], [3300, 3], [2400, 0], [2880, 0], [2881, 7], [3000, 7], [2400, 0]], 5,
    2880],
   [5, 2256, 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', [[[2400, 0], [0, 0], [3300, 7], [3000, 3]], 4, 2880], [2, 1200, False]),
  ('normal control 7', [[[1800, 0], [0, 0], [1800, 0], [0, 1], [2881, 1], [3300, 0], [3000, 0]], 4, 2880],
   [4, 1725, False]),
  ('normal control 8', [[[2400, 1], [2881, 7], [3000, 5], [0, 0], [2881, 3], [3300, 3]], 3, 2880],
   [1, 0, 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 fixtureActualExpectedOutcome
regression: excluded week as zero 1[3, 2900, True][3, 2900, True]Passed
regression variant: excluded week as zero 2[2, 3090, True][2, 3090, True]Passed
partial repair guard 3[2, 2340, False][2, 2340, 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[1, 3000, True][1, 3000, True]Passed
normal control 7[3, 3060, True][3, 3060, True]Passed
normal control 8[2, 2400, False][2, 2400, False]Passed

SHA-256 / 69bf3508bd0afb36190ee5855ebcda751dd930ea967e868aea6ca61b0d2cd961

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.623556+00:00.

Case digest / 0422c2580a3f90eddeeb3ed2ae043f81863ca600b326219b969a3b1a5fb98988