FAILURE MAP
← Case archive

FA-94256 / Shift rostering labor rules / Open access

Reference period not extended past skipped weeks · case 01

After a leave week the average covers fewer weeks than required.

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

ROOT CAUSE

Only the first ref calendar weeks are scanned.

VERIFIED REPAIR

Keep scanning following weeks until ref weeks are counted.

Unsuccessful approach: Allowing one extra week fails when more than one week is skipped.

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[:ref]:
        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: period extension 1', [[[3000, 0], [0, 7], [2800, 0], [2900, 0]], 3, 2880], [3, 2900, True]),
  ('regression variant: period extension 2',
   [[[3300, 3], [2400, 3], [2400, 0], [3300, 5], [2400, 0], [2400, 5]], 4, 2880], [2, 2400, 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', [[[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',
   [[[3300, 3], [2400, 7], [3000, 3], [2881, 0], [3000, 0], [1800, 0], [3300, 0], [2881, 7]], 3, 2880],
   [3, 2560, False]),
  ('normal control 7', [[[3300, 7], [1800, 7], [3000, 5], [2881, 3], [3300, 5]], 4, 2880], [0, 0, False]),
  ('normal control 8', [[[2880, 5], [2880, 3], [1800, 3], [3300, 5], [2880, 5], [2881, 0]], 4, 2880],
   [1, 2881, True])],
 [('regression: period extension 1', [[[3000, 0], [1000, 2], [3000, 0], [3000, 0]], 3, 2880],
   [3, 3000, True]),
  ('regression variant: period extension 2',
   [[[3000, 1], [3300, 7], [2880, 0], [2881, 7], [3300, 0], [3000, 0], [3300, 1], [2880, 0], [3000, 5]], 3,
    2880],
   [3, 3060, True]),
  ('boundary control 3', [[[2000, 1], [3000, 0]], 3, 2880], [1, 3000, True]),
  ('normal control 4', [[[0, 0], [1800, 0], [3000, 7], [3300, 0], [3000, 5], [2400, 0], [2880, 0]], 4, 2880],
   [4, 1875, False]),
  ('normal control 5',
   [[[2881, 0], [1800, 0], [2400, 5], [3300, 7], [3300, 3], [3300, 0], [1800, 0]], 3, 2880],
   [3, 2660, False]),
  ('normal control 6', [[[2880, 3], [0, 0], [2400, 1], [2880, 7], [2881, 5], [3300, 0], [3300, 1]], 3, 2880],
   [2, 1650, False]),
  ('normal control 7', [[[3000, 3], [1800, 3], [2400, 0]], 5, 2880], [1, 2400, False]),
  ('normal control 8', [[[1800, 5], [2880, 7], [2881, 3], [3000, 5]], 3, 2880], [0, 0, False])],
 [('regression: period extension 1',
   [[[2400, 5], [3300, 0], [0, 0], [0, 3], [1800, 0], [2881, 5], [2400, 7]], 3, 2880], [3, 1700, False]),
  ('regression variant: period extension 2',
   [[[1800, 1], [2400, 0], [3000, 3], [2880, 1], [2400, 0], [3000, 1], [0, 0], [0, 0], [0, 0]], 4, 2880],
   [4, 1200, False]),
  ('partial repair guard 3',
   [[[3000, 0], [2880, 5], [2880, 1], [1800, 1], [2881, 0], [2881, 5], [2880, 0]], 5, 2880],
   [3, 2920, 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', [[[3000, 0], [3000, 0], [2881, 7], [2400, 0], [3300, 7], [3000, 1]], 5, 2880],
   [3, 2800, False]),
  ('normal control 7', [[[3300, 0], [1800, 3], [0, 5]], 3, 2880], [1, 3300, True]),
  ('normal control 8', [[[3300, 1], [3300, 0], [3300, 7], [0, 7], [0, 0]], 3, 2880], [2, 1650, False])],
 [('regression: period extension 1',
   [[[2881, 0], [2880, 3], [3000, 3], [1800, 1], [0, 7], [1800, 0]], 4, 2880], [2, 2340, False]),
  ('regression variant: period extension 2',
   [[[2400, 3], [2881, 0], [3300, 0], [0, 3], [3000, 0], [3000, 5], [0, 7], [0, 7], [1800, 0]], 5, 2880],
   [4, 2745, False]),
  ('partial repair guard 3', [[[0, 3], [2880, 0], [3000, 3], [2881, 7], [1800, 0], [2400, 7]], 3, 2880],
   [2, 2340, 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', [[[1800, 5], [2881, 0], [1800, 0], [0, 0]], 3, 2880], [3, 1560, False]),
  ('normal control 7', [[[2881, 3], [3300, 3], [3000, 0], [3000, 3], [2400, 7]], 4, 2880], [1, 3000, True]),
  ('normal control 8',
   [[[1800, 0], [2400, 3], [2880, 7], [1800, 1], [2400, 0], [0, 7], [0, 7], [1800, 7]], 5, 2880],
   [2, 2100, False])],
 [('regression: period extension 1',
   [[[3300, 0], [3000, 5], [3300, 0], [0, 7], [0, 3], [1800, 0], [2400, 0], [0, 0], [2400, 7]], 3, 2880],
   [3, 2800, False]),
  ('regression variant: period extension 2',
   [[[0, 7], [0, 0], [0, 0], [3000, 1], [2880, 0], [2880, 0], [3000, 7], [3000, 0]], 5, 2880],
   [5, 1752, False]),
  ('partial repair guard 3',
   [[[2400, 7], [2400, 0], [3300, 3], [1800, 3], [3000, 7], [2881, 0], [3300, 7]], 4, 2880],
   [2, 2640, 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, 0], [3300, 0], [3000, 5], [2881, 1], [3300, 1], [0, 7], [1800, 0], [2400, 0]], 4, 2880],
   [4, 2325, False]),
  ('normal control 7', [[[3000, 3], [2880, 7], [1800, 3]], 4, 2880], [0, 0, False]),
  ('normal control 8', [[[2400, 3], [3300, 0], [2400, 1]], 3, 2880], [1, 3300, True])]]
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: period extension 1[2, 2900, True][3, 2900, True]Failed
regression variant: period extension 2[1, 2400, False][2, 2400, False]Failed
partial repair guard 3[1, 0, False][3, 1400, False]Failed
boundary control 4[1, 3000, True][1, 3000, True]Passed
boundary control 5[3, 2880, False][3, 2880, False]Passed
normal control 6[0, 0, False][3, 2560, False]Failed
normal control 7[0, 0, False][0, 0, False]Passed
normal control 8[0, 0, False][1, 2881, True]Failed

SHA-256 / fb6ca2d1cbb8a16dbea2f377c0064b00695af32c196773a3de122b327902f236

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[:ref + 1]:
        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: period extension 1', [[[3000, 0], [0, 7], [2800, 0], [2900, 0]], 3, 2880], [3, 2900, True]),
  ('regression variant: period extension 2',
   [[[3300, 3], [2400, 3], [2400, 0], [3300, 5], [2400, 0], [2400, 5]], 4, 2880], [2, 2400, 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', [[[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',
   [[[3300, 3], [2400, 7], [3000, 3], [2881, 0], [3000, 0], [1800, 0], [3300, 0], [2881, 7]], 3, 2880],
   [3, 2560, False]),
  ('normal control 7', [[[3300, 7], [1800, 7], [3000, 5], [2881, 3], [3300, 5]], 4, 2880], [0, 0, False]),
  ('normal control 8', [[[2880, 5], [2880, 3], [1800, 3], [3300, 5], [2880, 5], [2881, 0]], 4, 2880],
   [1, 2881, True])],
 [('regression: period extension 1', [[[3000, 0], [1000, 2], [3000, 0], [3000, 0]], 3, 2880],
   [3, 3000, True]),
  ('regression variant: period extension 2',
   [[[3000, 1], [3300, 7], [2880, 0], [2881, 7], [3300, 0], [3000, 0], [3300, 1], [2880, 0], [3000, 5]], 3,
    2880],
   [3, 3060, True]),
  ('boundary control 3', [[[2000, 1], [3000, 0]], 3, 2880], [1, 3000, True]),
  ('normal control 4', [[[0, 0], [1800, 0], [3000, 7], [3300, 0], [3000, 5], [2400, 0], [2880, 0]], 4, 2880],
   [4, 1875, False]),
  ('normal control 5',
   [[[2881, 0], [1800, 0], [2400, 5], [3300, 7], [3300, 3], [3300, 0], [1800, 0]], 3, 2880],
   [3, 2660, False]),
  ('normal control 6', [[[2880, 3], [0, 0], [2400, 1], [2880, 7], [2881, 5], [3300, 0], [3300, 1]], 3, 2880],
   [2, 1650, False]),
  ('normal control 7', [[[3000, 3], [1800, 3], [2400, 0]], 5, 2880], [1, 2400, False]),
  ('normal control 8', [[[1800, 5], [2880, 7], [2881, 3], [3000, 5]], 3, 2880], [0, 0, False])],
 [('regression: period extension 1',
   [[[2400, 5], [3300, 0], [0, 0], [0, 3], [1800, 0], [2881, 5], [2400, 7]], 3, 2880], [3, 1700, False]),
  ('regression variant: period extension 2',
   [[[1800, 1], [2400, 0], [3000, 3], [2880, 1], [2400, 0], [3000, 1], [0, 0], [0, 0], [0, 0]], 4, 2880],
   [4, 1200, False]),
  ('partial repair guard 3',
   [[[3000, 0], [2880, 5], [2880, 1], [1800, 1], [2881, 0], [2881, 5], [2880, 0]], 5, 2880],
   [3, 2920, 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', [[[3000, 0], [3000, 0], [2881, 7], [2400, 0], [3300, 7], [3000, 1]], 5, 2880],
   [3, 2800, False]),
  ('normal control 7', [[[3300, 0], [1800, 3], [0, 5]], 3, 2880], [1, 3300, True]),
  ('normal control 8', [[[3300, 1], [3300, 0], [3300, 7], [0, 7], [0, 0]], 3, 2880], [2, 1650, False])],
 [('regression: period extension 1',
   [[[2881, 0], [2880, 3], [3000, 3], [1800, 1], [0, 7], [1800, 0]], 4, 2880], [2, 2340, False]),
  ('regression variant: period extension 2',
   [[[2400, 3], [2881, 0], [3300, 0], [0, 3], [3000, 0], [3000, 5], [0, 7], [0, 7], [1800, 0]], 5, 2880],
   [4, 2745, False]),
  ('partial repair guard 3', [[[0, 3], [2880, 0], [3000, 3], [2881, 7], [1800, 0], [2400, 7]], 3, 2880],
   [2, 2340, 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', [[[1800, 5], [2881, 0], [1800, 0], [0, 0]], 3, 2880], [3, 1560, False]),
  ('normal control 7', [[[2881, 3], [3300, 3], [3000, 0], [3000, 3], [2400, 7]], 4, 2880], [1, 3000, True]),
  ('normal control 8',
   [[[1800, 0], [2400, 3], [2880, 7], [1800, 1], [2400, 0], [0, 7], [0, 7], [1800, 7]], 5, 2880],
   [2, 2100, False])],
 [('regression: period extension 1',
   [[[3300, 0], [3000, 5], [3300, 0], [0, 7], [0, 3], [1800, 0], [2400, 0], [0, 0], [2400, 7]], 3, 2880],
   [3, 2800, False]),
  ('regression variant: period extension 2',
   [[[0, 7], [0, 0], [0, 0], [3000, 1], [2880, 0], [2880, 0], [3000, 7], [3000, 0]], 5, 2880],
   [5, 1752, False]),
  ('partial repair guard 3',
   [[[2400, 7], [2400, 0], [3300, 3], [1800, 3], [3000, 7], [2881, 0], [3300, 7]], 4, 2880],
   [2, 2640, 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, 0], [3300, 0], [3000, 5], [2881, 1], [3300, 1], [0, 7], [1800, 0], [2400, 0]], 4, 2880],
   [4, 2325, False]),
  ('normal control 7', [[[3000, 3], [2880, 7], [1800, 3]], 4, 2880], [0, 0, False]),
  ('normal control 8', [[[2400, 3], [3300, 0], [2400, 1]], 3, 2880], [1, 3300, True])]]
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: period extension 1[3, 2900, True][3, 2900, True]Passed
regression variant: period extension 2[2, 2400, False][2, 2400, False]Passed
partial repair guard 3[1, 0, False][3, 1400, False]Failed
boundary control 4[1, 3000, True][1, 3000, True]Passed
boundary control 5[3, 2880, False][3, 2880, False]Passed
normal control 6[1, 2881, True][3, 2560, False]Failed
normal control 7[0, 0, False][0, 0, False]Passed
normal control 8[0, 0, False][1, 2881, True]Failed

SHA-256 / b7516b486b63daf9ac97b6c38609cb3abf44854b8152f209843b027b9d0436fb

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: period extension 1', [[[3000, 0], [0, 7], [2800, 0], [2900, 0]], 3, 2880], [3, 2900, True]),
  ('regression variant: period extension 2',
   [[[3300, 3], [2400, 3], [2400, 0], [3300, 5], [2400, 0], [2400, 5]], 4, 2880], [2, 2400, 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', [[[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',
   [[[3300, 3], [2400, 7], [3000, 3], [2881, 0], [3000, 0], [1800, 0], [3300, 0], [2881, 7]], 3, 2880],
   [3, 2560, False]),
  ('normal control 7', [[[3300, 7], [1800, 7], [3000, 5], [2881, 3], [3300, 5]], 4, 2880], [0, 0, False]),
  ('normal control 8', [[[2880, 5], [2880, 3], [1800, 3], [3300, 5], [2880, 5], [2881, 0]], 4, 2880],
   [1, 2881, True])],
 [('regression: period extension 1', [[[3000, 0], [1000, 2], [3000, 0], [3000, 0]], 3, 2880],
   [3, 3000, True]),
  ('regression variant: period extension 2',
   [[[3000, 1], [3300, 7], [2880, 0], [2881, 7], [3300, 0], [3000, 0], [3300, 1], [2880, 0], [3000, 5]], 3,
    2880],
   [3, 3060, True]),
  ('boundary control 3', [[[2000, 1], [3000, 0]], 3, 2880], [1, 3000, True]),
  ('normal control 4', [[[0, 0], [1800, 0], [3000, 7], [3300, 0], [3000, 5], [2400, 0], [2880, 0]], 4, 2880],
   [4, 1875, False]),
  ('normal control 5',
   [[[2881, 0], [1800, 0], [2400, 5], [3300, 7], [3300, 3], [3300, 0], [1800, 0]], 3, 2880],
   [3, 2660, False]),
  ('normal control 6', [[[2880, 3], [0, 0], [2400, 1], [2880, 7], [2881, 5], [3300, 0], [3300, 1]], 3, 2880],
   [2, 1650, False]),
  ('normal control 7', [[[3000, 3], [1800, 3], [2400, 0]], 5, 2880], [1, 2400, False]),
  ('normal control 8', [[[1800, 5], [2880, 7], [2881, 3], [3000, 5]], 3, 2880], [0, 0, False])],
 [('regression: period extension 1',
   [[[2400, 5], [3300, 0], [0, 0], [0, 3], [1800, 0], [2881, 5], [2400, 7]], 3, 2880], [3, 1700, False]),
  ('regression variant: period extension 2',
   [[[1800, 1], [2400, 0], [3000, 3], [2880, 1], [2400, 0], [3000, 1], [0, 0], [0, 0], [0, 0]], 4, 2880],
   [4, 1200, False]),
  ('partial repair guard 3',
   [[[3000, 0], [2880, 5], [2880, 1], [1800, 1], [2881, 0], [2881, 5], [2880, 0]], 5, 2880],
   [3, 2920, 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', [[[3000, 0], [3000, 0], [2881, 7], [2400, 0], [3300, 7], [3000, 1]], 5, 2880],
   [3, 2800, False]),
  ('normal control 7', [[[3300, 0], [1800, 3], [0, 5]], 3, 2880], [1, 3300, True]),
  ('normal control 8', [[[3300, 1], [3300, 0], [3300, 7], [0, 7], [0, 0]], 3, 2880], [2, 1650, False])],
 [('regression: period extension 1',
   [[[2881, 0], [2880, 3], [3000, 3], [1800, 1], [0, 7], [1800, 0]], 4, 2880], [2, 2340, False]),
  ('regression variant: period extension 2',
   [[[2400, 3], [2881, 0], [3300, 0], [0, 3], [3000, 0], [3000, 5], [0, 7], [0, 7], [1800, 0]], 5, 2880],
   [4, 2745, False]),
  ('partial repair guard 3', [[[0, 3], [2880, 0], [3000, 3], [2881, 7], [1800, 0], [2400, 7]], 3, 2880],
   [2, 2340, 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', [[[1800, 5], [2881, 0], [1800, 0], [0, 0]], 3, 2880], [3, 1560, False]),
  ('normal control 7', [[[2881, 3], [3300, 3], [3000, 0], [3000, 3], [2400, 7]], 4, 2880], [1, 3000, True]),
  ('normal control 8',
   [[[1800, 0], [2400, 3], [2880, 7], [1800, 1], [2400, 0], [0, 7], [0, 7], [1800, 7]], 5, 2880],
   [2, 2100, False])],
 [('regression: period extension 1',
   [[[3300, 0], [3000, 5], [3300, 0], [0, 7], [0, 3], [1800, 0], [2400, 0], [0, 0], [2400, 7]], 3, 2880],
   [3, 2800, False]),
  ('regression variant: period extension 2',
   [[[0, 7], [0, 0], [0, 0], [3000, 1], [2880, 0], [2880, 0], [3000, 7], [3000, 0]], 5, 2880],
   [5, 1752, False]),
  ('partial repair guard 3',
   [[[2400, 7], [2400, 0], [3300, 3], [1800, 3], [3000, 7], [2881, 0], [3300, 7]], 4, 2880],
   [2, 2640, 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, 0], [3300, 0], [3000, 5], [2881, 1], [3300, 1], [0, 7], [1800, 0], [2400, 0]], 4, 2880],
   [4, 2325, False]),
  ('normal control 7', [[[3000, 3], [2880, 7], [1800, 3]], 4, 2880], [0, 0, False]),
  ('normal control 8', [[[2400, 3], [3300, 0], [2400, 1]], 3, 2880], [1, 3300, True])]]
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: period extension 1[3, 2900, True][3, 2900, True]Passed
regression variant: period extension 2[2, 2400, False][2, 2400, False]Passed
partial repair guard 3[3, 1400, False][3, 1400, 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[3, 2560, False][3, 2560, False]Passed
normal control 7[0, 0, False][0, 0, False]Passed
normal control 8[1, 2881, True][1, 2881, True]Passed

SHA-256 / 49b1005cdb3a84d26cfaa02699e9c5c572cd8ba24044c75a7fec054874cd4ca0

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

Case digest / 679edf9a418b8aeec78983e1e5d6ee335defbcc7dab8ab93f364f7b1c44112ac