{"abstract":"A large exam in the earliest avoided period is not penalised.","category":"Exam timetabling constraints","checks":8,"contract":"sizes exam -> candidates, period exam -> period index, n_periods, big = how many largest exams are front-loaded (ranked by size descending, ties by id), last = how many final periods to avoid. Return the sorted front-loaded exams scheduled in the final last periods and their count.","contract_signature":"sizes, period, n_periods, big, last","evaluation_group":"w2-exam-timetabling-constraints-front-load-large-exams","failed_approach":"Subtracting one more extends the avoided range by a period.","family":"w2-exam-timetabling-constraints-front-load-large-exams-final-period-boundary","id":"FA-94556","implementations":{"attempt":{"sha256":"72e3fdbd02469c54190782ab46820bba6606bb7d8bdfe490ab73fab97137eb46","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(sizes, period, n_periods, big, last):\n    ranked = sorted(sizes, key=lambda e: (-sizes[e], e))[:big]\n    bad = sorted(e for e in ranked if period[e] >= n_periods - last - 1)\n    return [bad, len(bad)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: final period boundary 1', [{'A': 100, 'B': 50}, {'A': 8, 'B': 9}, 10, 1, 2], [['A'], 1]),\n  ('regression variant: final period boundary 2',\n   [{'MATH101': 80, 'MATH101H': 50, 'PHYS110': 80, 'CHEM120': 20},\n    {'MATH101': 4, 'MATH101H': 7, 'PHYS110': 5, 'CHEM120': 4}, 8, 3, 3],\n   [['MATH101H', 'PHYS110'], 2]),\n  ('partial repair guard 3',\n   [{'MATH101': 50, 'MATH101H': 80, 'PHYS110': 200, 'CHEM120': 20, 'BIO130': 120, 'HIST140': 80},\n    {'MATH101': 3, 'MATH101H': 2, 'PHYS110': 3, 'CHEM120': 7, 'BIO130': 4, 'HIST140': 1}, 8, 2, 3],\n   [[], 0]),\n  ('boundary control 4', [{'A': 80, 'B': 80, 'C': 20}, {'A': 9, 'B': 9, 'C': 9}, 10, 2, 2], [['A', 'B'], 2]),\n  ('normal control 5',\n   [{'MATH101': 20, 'MATH101H': 120, 'PHYS110': 80}, {'MATH101': 7, 'MATH101H': 4, 'PHYS110': 2}, 8, 1, 2],\n   [[], 0]),\n  ('normal control 6',\n   [{'MATH101': 80, 'MATH101H': 20, 'PHYS110': 20}, {'MATH101': 0, 'MATH101H': 4, 'PHYS110': 3}, 10, 2, 3],\n   [[], 0]),\n  ('normal control 7',\n   [{'MATH101': 50, 'MATH101H': 80, 'PHYS110': 50}, {'MATH101': 0, 'MATH101H': 2, 'PHYS110': 2}, 8, 3, 3],\n   [[], 0]),\n  ('normal control 8',\n   [{'MATH101': 120, 'MATH101H': 50, 'PHYS110': 80}, {'MATH101': 0, 'MATH101H': 3, 'PHYS110': 5}, 6, 2, 3],\n   [['PHYS110'], 1])],\n [('regression: final period boundary 1',\n   [{'MATH101': 20, 'MATH101H': 80, 'PHYS110': 80}, {'MATH101': 7, 'MATH101H': 5, 'PHYS110': 3}, 8, 1, 3],\n   [['MATH101H'], 1]),\n  ('regression variant: final period boundary 2',\n   [{'MATH101': 200, 'MATH101H': 200, 'PHYS110': 200, 'CHEM120': 120, 'BIO130': 80, 'HIST140': 20},\n    {'MATH101': 3, 'MATH101H': 0, 'PHYS110': 7, 'CHEM120': 7, 'BIO130': 0, 'HIST140': 7}, 10, 3, 3],\n   [['PHYS110'], 1]),\n  ('partial repair guard 3',\n   [{'MATH101': 120, 'MATH101H': 80, 'PHYS110': 20, 'CHEM120': 120, 'BIO130': 80},\n    {'MATH101': 2, 'MATH101H': 4, 'PHYS110': 5, 'CHEM120': 0, 'BIO130': 0}, 6, 3, 3],\n   [[], 0]),\n  ('boundary control 4', [{'A': 80, 'B': 80, 'C': 20}, {'A': 1, 'B': 9, 'C': 9}, 10, 1, 2], [[], 0]),\n  ('boundary control 5', [{'A': 80, 'B': 80, 'C': 20}, {'A': 9, 'B': 9, 'C': 9}, 10, 2, 2], [['A', 'B'], 2]),\n  ('normal control 6',\n   [{'MATH101': 80, 'MATH101H': 200, 'PHYS110': 50, 'CHEM120': 200, 'BIO130': 50, 'HIST140': 80},\n    {'MATH101': 2, 'MATH101H': 0, 'PHYS110': 2, 'CHEM120': 7, 'BIO130': 1, 'HIST140': 9}, 10, 1, 2],\n   [[], 0]),\n  ('normal control 7',\n   [{'MATH101': 80, 'MATH101H': 20, 'PHYS110': 20, 'CHEM120': 80, 'BIO130': 80, 'HIST140': 80},\n    {'MATH101': 0, 'MATH101H': 1, 'PHYS110': 3, 'CHEM120': 1, 'BIO130': 5, 'HIST140': 8}, 10, 3, 2],\n   [['HIST140'], 1]),\n  ('normal control 8',\n   [{'MATH101': 50, 'MATH101H': 120, 'PHYS110': 120}, {'MATH101': 8, 'MATH101H': 4, 'PHYS110': 0}, 10, 1, 2],\n   [[], 0])],\n [('regression: final period boundary 1',\n   [{'MATH101': 20, 'MATH101H': 50, 'PHYS110': 120, 'CHEM120': 200, 'BIO130': 50, 'HIST140': 120},\n    {'MATH101': 5, 'MATH101H': 2, 'PHYS110': 5, 'CHEM120': 4, 'BIO130': 5, 'HIST140': 3}, 6, 2, 3],\n   [['CHEM120', 'HIST140'], 2]),\n  ('regression variant: final period boundary 2',\n   [{'MATH101': 20,\n     'MATH101H': 80,\n     'PHYS110': 20,\n     'CHEM120': 80,\n     'BIO130': 120,\n     'HIST140': 200,\n     'ECON150': 80},\n    {'MATH101': 0, 'MATH101H': 0, 'PHYS110': 7, 'CHEM120': 2, 'BIO130': 8, 'HIST140': 8, 'ECON150': 3}, 10, 3,\n    2],\n   [['BIO130', 'HIST140'], 2]),\n  ('partial repair guard 3',\n   [{'MATH101': 20, 'MATH101H': 50, 'PHYS110': 50, 'CHEM120': 200, 'BIO130': 200, 'HIST140': 80},\n    {'MATH101': 4, 'MATH101H': 3, 'PHYS110': 6, 'CHEM120': 6, 'BIO130': 3, 'HIST140': 5}, 10, 2, 3],\n   [[], 0]),\n  ('boundary control 4', [{'A': 100, 'B': 50}, {'A': 7, 'B': 9}, 10, 1, 2], [[], 0]),\n  ('boundary control 5', [{'A': 80, 'B': 80, 'C': 20}, {'A': 1, 'B': 9, 'C': 9}, 10, 1, 2], [[], 0]),\n  ('normal control 6',\n   [{'MATH101': 20, 'MATH101H': 200, 'PHYS110': 120, 'CHEM120': 80, 'BIO130': 20, 'HIST140': 80},\n    {'MATH101': 0, 'MATH101H': 0, 'PHYS110': 2, 'CHEM120': 4, 'BIO130': 4, 'HIST140': 6}, 8, 1, 3],\n   [[], 0]),\n  ('normal control 7',\n   [{'MATH101': 200, 'MATH101H': 200, 'PHYS110': 200, 'CHEM120': 120, 'BIO130': 80, 'HIST140': 20},\n    {'MATH101': 3, 'MATH101H': 0, 'PHYS110': 7, 'CHEM120': 7, 'BIO130': 0, 'HIST140': 7}, 10, 3, 3],\n   [['PHYS110'], 1]),\n  ('normal control 8',\n   [{'MATH101': 20, 'MATH101H': 120, 'PHYS110': 20}, {'MATH101': 6, 'MATH101H': 1, 'PHYS110': 9}, 10, 3, 2],\n   [['PHYS110'], 1])],\n [('regression: final period boundary 1',\n   [{'MATH101': 80,\n     'MATH101H': 120,\n     'PHYS110': 120,\n     'CHEM120': 80,\n     'BIO130': 200,\n     'HIST140': 20,\n     'ECON150': 80},\n    {'MATH101': 4, 'MATH101H': 0, 'PHYS110': 4, 'CHEM120': 5, 'BIO130': 0, 'HIST140': 2, 'ECON150': 0}, 6, 3,\n    2],\n   [['PHYS110'], 1]),\n  ('regression variant: final period boundary 2',\n   [{'MATH101': 20,\n     'MATH101H': 50,\n     'PHYS110': 50,\n     'CHEM120': 120,\n     'BIO130': 80,\n     'HIST140': 50,\n     'ECON150': 20},\n    {'MATH101': 5, 'MATH101H': 1, 'PHYS110': 1, 'CHEM120': 1, 'BIO130': 3, 'HIST140': 0, 'ECON150': 2}, 6, 3,\n    3],\n   [['BIO130'], 1]),\n  ('partial repair guard 3',\n   [{'MATH101': 80, 'MATH101H': 50, 'PHYS110': 50, 'CHEM120': 50, 'BIO130': 80, 'HIST140': 80, 'ECON150': 50},\n    {'MATH101': 4, 'MATH101H': 1, 'PHYS110': 0, 'CHEM120': 6, 'BIO130': 5, 'HIST140': 2, 'ECON150': 3}, 8, 3,\n    3],\n   [['BIO130'], 1]),\n  ('boundary control 4', [{'A': 100, 'B': 50}, {'A': 8, 'B': 9}, 10, 1, 2], [['A'], 1]),\n  ('boundary control 5', [{'A': 100, 'B': 50}, {'A': 7, 'B': 9}, 10, 1, 2], [[], 0]),\n  ('normal control 6',\n   [{'MATH101': 20, 'MATH101H': 200, 'PHYS110': 20, 'CHEM120': 120, 'BIO130': 80, 'HIST140': 50},\n    {'MATH101': 4, 'MATH101H': 0, 'PHYS110': 6, 'CHEM120': 1, 'BIO130': 5, 'HIST140': 5}, 8, 3, 3],\n   [['BIO130'], 1]),\n  ('normal control 7',\n   [{'MATH101': 80, 'MATH101H': 80, 'PHYS110': 80, 'CHEM120': 200, 'BIO130': 50},\n    {'MATH101': 1, 'MATH101H': 3, 'PHYS110': 4, 'CHEM120': 6, 'BIO130': 7}, 10, 3, 2],\n   [[], 0]),\n  ('normal control 8',\n   [{'MATH101': 200, 'MATH101H': 20, 'PHYS110': 20}, {'MATH101': 2, 'MATH101H': 0, 'PHYS110': 2}, 6, 3, 2],\n   [[], 0])],\n [('regression: final period boundary 1',\n   [{'MATH101': 50, 'MATH101H': 200, 'PHYS110': 50}, {'MATH101': 5, 'MATH101H': 3, 'PHYS110': 0}, 6, 2, 3],\n   [['MATH101', 'MATH101H'], 2]),\n  ('regression variant: final period boundary 2',\n   [{'MATH101': 50, 'MATH101H': 50, 'PHYS110': 80, 'CHEM120': 120, 'BIO130': 80, 'HIST140': 20},\n    {'MATH101': 6, 'MATH101H': 9, 'PHYS110': 7, 'CHEM120': 1, 'BIO130': 7, 'HIST140': 4}, 10, 2, 3],\n   [['BIO130'], 1]),\n  ('partial repair guard 3',\n   [{'MATH101': 80, 'MATH101H': 20, 'PHYS110': 200, 'CHEM120': 50, 'BIO130': 20},\n    {'MATH101': 6, 'MATH101H': 1, 'PHYS110': 7, 'CHEM120': 1, 'BIO130': 7}, 10, 2, 3],\n   [['PHYS110'], 1]),\n  ('boundary control 4', [{'A': 80, 'B': 80, 'C': 20}, {'A': 9, 'B': 9, 'C': 9}, 10, 2, 2], [['A', 'B'], 2]),\n  ('boundary control 5', [{'A': 100, 'B': 50}, {'A': 8, 'B': 9}, 10, 1, 2], [['A'], 1]),\n  ('normal control 6',\n   [{'MATH101': 80, 'MATH101H': 20, 'PHYS110': 20, 'CHEM120': 80, 'BIO130': 80},\n    {'MATH101': 3, 'MATH101H': 1, 'PHYS110': 8, 'CHEM120': 0, 'BIO130': 9}, 10, 1, 2],\n   [['BIO130'], 1]),\n  ('normal control 7',\n   [{'MATH101': 80, 'MATH101H': 20, 'PHYS110': 80}, {'MATH101': 1, 'MATH101H': 0, 'PHYS110': 5}, 6, 2, 2],\n   [['PHYS110'], 1]),\n  ('normal control 8',\n   [{'MATH101': 200, 'MATH101H': 80, 'PHYS110': 200, 'CHEM120': 80, 'BIO130': 20},\n    {'MATH101': 6, 'MATH101H': 6, 'PHYS110': 7, 'CHEM120': 3, 'BIO130': 4}, 8, 3, 2],\n   [['MATH101', 'PHYS110'], 2])]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"cf99e85103a711f9b82260f8f6c5ee26fd5209892d602b11b24b29f4d709a1fc","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(sizes, period, n_periods, big, last):\n    ranked = sorted(sizes, key=lambda e: (-sizes[e], e))[:big]\n    bad = sorted(e for e in ranked if period[e] > n_periods - last)\n    return [bad, len(bad)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: final period boundary 1', [{'A': 100, 'B': 50}, {'A': 8, 'B': 9}, 10, 1, 2], [['A'], 1]),\n  ('regression variant: final period boundary 2',\n   [{'MATH101': 80, 'MATH101H': 50, 'PHYS110': 80, 'CHEM120': 20},\n    {'MATH101': 4, 'MATH101H': 7, 'PHYS110': 5, 'CHEM120': 4}, 8, 3, 3],\n   [['MATH101H', 'PHYS110'], 2]),\n  ('partial repair guard 3',\n   [{'MATH101': 50, 'MATH101H': 80, 'PHYS110': 200, 'CHEM120': 20, 'BIO130': 120, 'HIST140': 80},\n    {'MATH101': 3, 'MATH101H': 2, 'PHYS110': 3, 'CHEM120': 7, 'BIO130': 4, 'HIST140': 1}, 8, 2, 3],\n   [[], 0]),\n  ('boundary control 4', [{'A': 80, 'B': 80, 'C': 20}, {'A': 9, 'B': 9, 'C': 9}, 10, 2, 2], [['A', 'B'], 2]),\n  ('normal control 5',\n   [{'MATH101': 20, 'MATH101H': 120, 'PHYS110': 80}, {'MATH101': 7, 'MATH101H': 4, 'PHYS110': 2}, 8, 1, 2],\n   [[], 0]),\n  ('normal control 6',\n   [{'MATH101': 80, 'MATH101H': 20, 'PHYS110': 20}, {'MATH101': 0, 'MATH101H': 4, 'PHYS110': 3}, 10, 2, 3],\n   [[], 0]),\n  ('normal control 7',\n   [{'MATH101': 50, 'MATH101H': 80, 'PHYS110': 50}, {'MATH101': 0, 'MATH101H': 2, 'PHYS110': 2}, 8, 3, 3],\n   [[], 0]),\n  ('normal control 8',\n   [{'MATH101': 120, 'MATH101H': 50, 'PHYS110': 80}, {'MATH101': 0, 'MATH101H': 3, 'PHYS110': 5}, 6, 2, 3],\n   [['PHYS110'], 1])],\n [('regression: final period boundary 1',\n   [{'MATH101': 20, 'MATH101H': 80, 'PHYS110': 80}, {'MATH101': 7, 'MATH101H': 5, 'PHYS110': 3}, 8, 1, 3],\n   [['MATH101H'], 1]),\n  ('regression variant: final period boundary 2',\n   [{'MATH101': 200, 'MATH101H': 200, 'PHYS110': 200, 'CHEM120': 120, 'BIO130': 80, 'HIST140': 20},\n    {'MATH101': 3, 'MATH101H': 0, 'PHYS110': 7, 'CHEM120': 7, 'BIO130': 0, 'HIST140': 7}, 10, 3, 3],\n   [['PHYS110'], 1]),\n  ('partial repair guard 3',\n   [{'MATH101': 120, 'MATH101H': 80, 'PHYS110': 20, 'CHEM120': 120, 'BIO130': 80},\n    {'MATH101': 2, 'MATH101H': 4, 'PHYS110': 5, 'CHEM120': 0, 'BIO130': 0}, 6, 3, 3],\n   [[], 0]),\n  ('boundary control 4', [{'A': 80, 'B': 80, 'C': 20}, {'A': 1, 'B': 9, 'C': 9}, 10, 1, 2], [[], 0]),\n  ('boundary control 5', [{'A': 80, 'B': 80, 'C': 20}, {'A': 9, 'B': 9, 'C': 9}, 10, 2, 2], [['A', 'B'], 2]),\n  ('normal control 6',\n   [{'MATH101': 80, 'MATH101H': 200, 'PHYS110': 50, 'CHEM120': 200, 'BIO130': 50, 'HIST140': 80},\n    {'MATH101': 2, 'MATH101H': 0, 'PHYS110': 2, 'CHEM120': 7, 'BIO130': 1, 'HIST140': 9}, 10, 1, 2],\n   [[], 0]),\n  ('normal control 7',\n   [{'MATH101': 80, 'MATH101H': 20, 'PHYS110': 20, 'CHEM120': 80, 'BIO130': 80, 'HIST140': 80},\n    {'MATH101': 0, 'MATH101H': 1, 'PHYS110': 3, 'CHEM120': 1, 'BIO130': 5, 'HIST140': 8}, 10, 3, 2],\n   [['HIST140'], 1]),\n  ('normal control 8',\n   [{'MATH101': 50, 'MATH101H': 120, 'PHYS110': 120}, {'MATH101': 8, 'MATH101H': 4, 'PHYS110': 0}, 10, 1, 2],\n   [[], 0])],\n [('regression: final period boundary 1',\n   [{'MATH101': 20, 'MATH101H': 50, 'PHYS110': 120, 'CHEM120': 200, 'BIO130': 50, 'HIST140': 120},\n    {'MATH101': 5, 'MATH101H': 2, 'PHYS110': 5, 'CHEM120': 4, 'BIO130': 5, 'HIST140': 3}, 6, 2, 3],\n   [['CHEM120', 'HIST140'], 2]),\n  ('regression variant: final period boundary 2',\n   [{'MATH101': 20,\n     'MATH101H': 80,\n     'PHYS110': 20,\n     'CHEM120': 80,\n     'BIO130': 120,\n     'HIST140': 200,\n     'ECON150': 80},\n    {'MATH101': 0, 'MATH101H': 0, 'PHYS110': 7, 'CHEM120': 2, 'BIO130': 8, 'HIST140': 8, 'ECON150': 3}, 10, 3,\n    2],\n   [['BIO130', 'HIST140'], 2]),\n  ('partial repair guard 3',\n   [{'MATH101': 20, 'MATH101H': 50, 'PHYS110': 50, 'CHEM120': 200, 'BIO130': 200, 'HIST140': 80},\n    {'MATH101': 4, 'MATH101H': 3, 'PHYS110': 6, 'CHEM120': 6, 'BIO130': 3, 'HIST140': 5}, 10, 2, 3],\n   [[], 0]),\n  ('boundary control 4', [{'A': 100, 'B': 50}, {'A': 7, 'B': 9}, 10, 1, 2], [[], 0]),\n  ('boundary control 5', [{'A': 80, 'B': 80, 'C': 20}, {'A': 1, 'B': 9, 'C': 9}, 10, 1, 2], [[], 0]),\n  ('normal control 6',\n   [{'MATH101': 20, 'MATH101H': 200, 'PHYS110': 120, 'CHEM120': 80, 'BIO130': 20, 'HIST140': 80},\n    {'MATH101': 0, 'MATH101H': 0, 'PHYS110': 2, 'CHEM120': 4, 'BIO130': 4, 'HIST140': 6}, 8, 1, 3],\n   [[], 0]),\n  ('normal control 7',\n   [{'MATH101': 200, 'MATH101H': 200, 'PHYS110': 200, 'CHEM120': 120, 'BIO130': 80, 'HIST140': 20},\n    {'MATH101': 3, 'MATH101H': 0, 'PHYS110': 7, 'CHEM120': 7, 'BIO130': 0, 'HIST140': 7}, 10, 3, 3],\n   [['PHYS110'], 1]),\n  ('normal control 8',\n   [{'MATH101': 20, 'MATH101H': 120, 'PHYS110': 20}, {'MATH101': 6, 'MATH101H': 1, 'PHYS110': 9}, 10, 3, 2],\n   [['PHYS110'], 1])],\n [('regression: final period boundary 1',\n   [{'MATH101': 80,\n     'MATH101H': 120,\n     'PHYS110': 120,\n     'CHEM120': 80,\n     'BIO130': 200,\n     'HIST140': 20,\n     'ECON150': 80},\n    {'MATH101': 4, 'MATH101H': 0, 'PHYS110': 4, 'CHEM120': 5, 'BIO130': 0, 'HIST140': 2, 'ECON150': 0}, 6, 3,\n    2],\n   [['PHYS110'], 1]),\n  ('regression variant: final period boundary 2',\n   [{'MATH101': 20,\n     'MATH101H': 50,\n     'PHYS110': 50,\n     'CHEM120': 120,\n     'BIO130': 80,\n     'HIST140': 50,\n     'ECON150': 20},\n    {'MATH101': 5, 'MATH101H': 1, 'PHYS110': 1, 'CHEM120': 1, 'BIO130': 3, 'HIST140': 0, 'ECON150': 2}, 6, 3,\n    3],\n   [['BIO130'], 1]),\n  ('partial repair guard 3',\n   [{'MATH101': 80, 'MATH101H': 50, 'PHYS110': 50, 'CHEM120': 50, 'BIO130': 80, 'HIST140': 80, 'ECON150': 50},\n    {'MATH101': 4, 'MATH101H': 1, 'PHYS110': 0, 'CHEM120': 6, 'BIO130': 5, 'HIST140': 2, 'ECON150': 3}, 8, 3,\n    3],\n   [['BIO130'], 1]),\n  ('boundary control 4', [{'A': 100, 'B': 50}, {'A': 8, 'B': 9}, 10, 1, 2], [['A'], 1]),\n  ('boundary control 5', [{'A': 100, 'B': 50}, {'A': 7, 'B': 9}, 10, 1, 2], [[], 0]),\n  ('normal control 6',\n   [{'MATH101': 20, 'MATH101H': 200, 'PHYS110': 20, 'CHEM120': 120, 'BIO130': 80, 'HIST140': 50},\n    {'MATH101': 4, 'MATH101H': 0, 'PHYS110': 6, 'CHEM120': 1, 'BIO130': 5, 'HIST140': 5}, 8, 3, 3],\n   [['BIO130'], 1]),\n  ('normal control 7',\n   [{'MATH101': 80, 'MATH101H': 80, 'PHYS110': 80, 'CHEM120': 200, 'BIO130': 50},\n    {'MATH101': 1, 'MATH101H': 3, 'PHYS110': 4, 'CHEM120': 6, 'BIO130': 7}, 10, 3, 2],\n   [[], 0]),\n  ('normal control 8',\n   [{'MATH101': 200, 'MATH101H': 20, 'PHYS110': 20}, {'MATH101': 2, 'MATH101H': 0, 'PHYS110': 2}, 6, 3, 2],\n   [[], 0])],\n [('regression: final period boundary 1',\n   [{'MATH101': 50, 'MATH101H': 200, 'PHYS110': 50}, {'MATH101': 5, 'MATH101H': 3, 'PHYS110': 0}, 6, 2, 3],\n   [['MATH101', 'MATH101H'], 2]),\n  ('regression variant: final period boundary 2',\n   [{'MATH101': 50, 'MATH101H': 50, 'PHYS110': 80, 'CHEM120': 120, 'BIO130': 80, 'HIST140': 20},\n    {'MATH101': 6, 'MATH101H': 9, 'PHYS110': 7, 'CHEM120': 1, 'BIO130': 7, 'HIST140': 4}, 10, 2, 3],\n   [['BIO130'], 1]),\n  ('partial repair guard 3',\n   [{'MATH101': 80, 'MATH101H': 20, 'PHYS110': 200, 'CHEM120': 50, 'BIO130': 20},\n    {'MATH101': 6, 'MATH101H': 1, 'PHYS110': 7, 'CHEM120': 1, 'BIO130': 7}, 10, 2, 3],\n   [['PHYS110'], 1]),\n  ('boundary control 4', [{'A': 80, 'B': 80, 'C': 20}, {'A': 9, 'B': 9, 'C': 9}, 10, 2, 2], [['A', 'B'], 2]),\n  ('boundary control 5', [{'A': 100, 'B': 50}, {'A': 8, 'B': 9}, 10, 1, 2], [['A'], 1]),\n  ('normal control 6',\n   [{'MATH101': 80, 'MATH101H': 20, 'PHYS110': 20, 'CHEM120': 80, 'BIO130': 80},\n    {'MATH101': 3, 'MATH101H': 1, 'PHYS110': 8, 'CHEM120': 0, 'BIO130': 9}, 10, 1, 2],\n   [['BIO130'], 1]),\n  ('normal control 7',\n   [{'MATH101': 80, 'MATH101H': 20, 'PHYS110': 80}, {'MATH101': 1, 'MATH101H': 0, 'PHYS110': 5}, 6, 2, 2],\n   [['PHYS110'], 1]),\n  ('normal control 8',\n   [{'MATH101': 200, 'MATH101H': 80, 'PHYS110': 200, 'CHEM120': 80, 'BIO130': 20},\n    {'MATH101': 6, 'MATH101H': 6, 'PHYS110': 7, 'CHEM120': 3, 'BIO130': 4}, 8, 3, 2],\n   [['MATH101', 'PHYS110'], 2])]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"Stipulated toy exam-timetabling rule set for a bounded model; it does not claim conformance with any institution's regulations or a benchmark specification, and it performs no search or optimisation. 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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"w2-exam-timetabling-constraints-front-load-large-exams-final-period-boundary","generated_at":"2026-09-29T14:52:05.444426+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Front-loading large exams gives markers time; it is a standard soft constraint.","root_cause":"The late-period test is strict.","sha256":"1cb215fc319153ca2e511890ed2ae599c9189ceadeb3869919f8faa0d03de437","title":"First of the final periods not treated as late · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":39.054,"exit_code":1,"observations":[{"actual":[["A"],1],"check":"regression: final period boundary 1","expected":[["A"],1],"passed":true},{"actual":[["MATH101","MATH101H","PHYS110"],3],"check":"regression variant: final period boundary 2","expected":[["MATH101H","PHYS110"],2],"passed":false},{"actual":[["BIO130"],1],"check":"partial repair guard 3","expected":[[],0],"passed":false},{"actual":[["A","B"],2],"check":"boundary control 4","expected":[["A","B"],2],"passed":true},{"actual":[[],0],"check":"normal control 5","expected":[[],0],"passed":true},{"actual":[[],0],"check":"normal control 6","expected":[[],0],"passed":true},{"actual":[[],0],"check":"normal control 7","expected":[[],0],"passed":true},{"actual":[["PHYS110"],1],"check":"normal control 8","expected":[["PHYS110"],1],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: final period boundary 1\", \"actual\": [[\"A\"], 1], \"expected\": [[\"A\"], 1], \"passed\": true}, {\"check\": \"regression variant: final period boundary 2\", \"actual\": [[\"MATH101\", \"MATH101H\", \"PHYS110\"], 3], \"expected\": [[\"MATH101H\", \"PHYS110\"], 2], \"passed\": false}, {\"check\": \"partial repair guard 3\", \"actual\": [[\"BIO130\"], 1], \"expected\": [[], 0], \"passed\": false}, {\"check\": \"boundary control 4\", \"actual\": [[\"A\", \"B\"], 2], \"expected\": [[\"A\", \"B\"], 2], \"passed\": true}, {\"check\": \"normal control 5\", \"actual\": [[], 0], \"expected\": [[], 0], \"passed\": true}, {\"check\": \"normal control 6\", \"actual\": [[], 0], \"expected\": [[], 0], \"passed\": true}, {\"check\": \"normal control 7\", \"actual\": [[], 0], \"expected\": [[], 0], \"passed\": true}, {\"check\": \"normal control 8\", \"actual\": [[\"PHYS110\"], 1], \"expected\": [[\"PHYS110\"], 1], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.062,"exit_code":1,"observations":[{"actual":[[],0],"check":"regression: final period boundary 1","expected":[["A"],1],"passed":false},{"actual":[["MATH101H"],1],"check":"regression variant: final period boundary 2","expected":[["MATH101H","PHYS110"],2],"passed":false},{"actual":[[],0],"check":"partial repair guard 3","expected":[[],0],"passed":true},{"actual":[["A","B"],2],"check":"boundary control 4","expected":[["A","B"],2],"passed":true},{"actual":[[],0],"check":"normal control 5","expected":[[],0],"passed":true},{"actual":[[],0],"check":"normal control 6","expected":[[],0],"passed":true},{"actual":[[],0],"check":"normal control 7","expected":[[],0],"passed":true},{"actual":[["PHYS110"],1],"check":"normal control 8","expected":[["PHYS110"],1],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: final period boundary 1\", \"actual\": [[], 0], \"expected\": [[\"A\"], 1], \"passed\": false}, {\"check\": \"regression variant: final period boundary 2\", \"actual\": [[\"MATH101H\"], 1], \"expected\": [[\"MATH101H\", \"PHYS110\"], 2], \"passed\": false}, {\"check\": \"partial repair guard 3\", \"actual\": [[], 0], \"expected\": [[], 0], \"passed\": true}, {\"check\": \"boundary control 4\", \"actual\": [[\"A\", \"B\"], 2], \"expected\": [[\"A\", \"B\"], 2], \"passed\": true}, {\"check\": \"normal control 5\", \"actual\": [[], 0], \"expected\": [[], 0], \"passed\": true}, {\"check\": \"normal control 6\", \"actual\": [[], 0], \"expected\": [[], 0], \"passed\": true}, {\"check\": \"normal control 7\", \"actual\": [[], 0], \"expected\": [[], 0], \"passed\": true}, {\"check\": \"normal control 8\", \"actual\": [[\"PHYS110\"], 1], \"expected\": [[\"PHYS110\"], 1], \"passed\": true}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}