{"abstract":"A marinade starting the previous evening prints \"-3:00\".","category":"Recipe scaling and nutrition","checks":8,"contract":"Steps [name, minutes, depends_on]; a step must finish before any step depending on it starts. Latest start = min(latest start of dependents, serve time) - minutes. Unknown dependency -> \"error: unknown step X\"; a cycle -> \"error: cycle\". Serve \"HH:MM\"; starts print as \"HH:MM\" modulo 24h (previous day wraps). Output [[name, time]] sorted by absolute start then name.","contract_signature":"steps, serve","evaluation_group":"w2-recipe_scaling_and_nutrition-backward-schedule","failed_approach":"abs() mirrors the time instead of wrapping: -180 becomes 03:00 instead of 21:00.","family":"w2-recipe_scaling_and_nutrition-backward-schedule-midnight-wraparound","id":"FA-97301","implementations":{"attempt":{"sha256":"7055420024ccec468bca3be1ee564af43f4ec220cd8521a652924401c970108c","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(steps, serve):\n    by = {s[0]: s for s in steps}\n    for s in steps:\n        for d in s[2]:\n            if d not in by:\n                return 'error: unknown step ' + d\n    h, m = serve.split(':')\n    T = int(h) * 60 + int(m)\n    latest = {}\n    visiting = set()\n    def ls(n):\n        if n in latest:\n            return latest[n]\n        if n in visiting:\n            return None\n        visiting.add(n)\n        finish = T\n        for s in steps:\n            if n in s[2]:\n                v = ls(s[0])\n                if v is None:\n                    return None\n                finish = min(finish, v)\n        visiting.discard(n)\n        latest[n] = finish - by[n][1]\n        return latest[n]\n    rows = []\n    for s in steps:\n        v = ls(s[0])\n        if v is None:\n            return 'error: cycle'\n        rows.append((v, s[0]))\n    rows.sort()\n    return [[n, '%02d:%02d' % divmod(abs(v) % 1440, 60)] for v, n in rows]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['chain', [[['prep', 10, []], ['roast', 90, ['prep']], ['rest', 15, ['roast']]], '18:30'],\n   [['prep', '16:35'], ['roast', '16:45'], ['rest', '18:15']]],\n  ['overnight marinade', [[['marinate', 480, []], ['grill', 20, ['marinate']]], '12:00'],\n   [['marinate', '03:40'], ['grill', '11:40']]],\n  ['cycle', [[['a', 5, ['b']], ['b', 5, ['a']]], '18:00'], 'error: cycle'],\n  ['regression: midnight wraparound',\n   [[['marinate', 90, []], ['roast', 90, ['marinate']], ['prep', 45, []]], '02:00'],\n   [['marinate', '23:00'], ['roast', '00:30'], ['prep', '01:15']]],\n  ['repair check: midnight wraparound',\n   [[['roast', 45, ['prep']], ['prep', 15, []], ['sauce', 10, ['roast']], ['marinate', 10, []]], '00:30'],\n   [['prep', '23:20'], ['roast', '23:35'], ['marinate', '00:20'], ['sauce', '00:20']]],\n  ['generated control 1',\n   [[['roast', 240, []], ['prep', 15, []], ['marinate', 240, ['prep', 'shop']]], '18:30'],\n   'error: unknown step shop'],\n  ['generated control 2',\n   [[['prep', 5, []], ['roast', 15, ['prep']], ['rest', 10, ['marinate']], ['marinate', 5, []],\n     ['sauce', 30, []], ['plate', 5, ['marinate', 'roast', 'rest']]],\n    '12:00'],\n   [['sauce', '11:30'], ['prep', '11:35'], ['marinate', '11:40'], ['roast', '11:40'], ['rest', '11:45'],\n    ['plate', '11:55']]],\n  ['generated control 3', [[['roast', 45, []], ['prep', 30, []], ['marinate', 90, ['prep']]], '02:00'],\n   [['prep', '00:00'], ['marinate', '00:30'], ['roast', '01:15']]]],\n [['overnight marinade', [[['marinate', 480, []], ['grill', 20, ['marinate']]], '12:00'],\n   [['marinate', '03:40'], ['grill', '11:40']]],\n  ['cycle', [[['a', 5, ['b']], ['b', 5, ['a']]], '18:00'], 'error: cycle'],\n  ['unknown dependency', [[['a', 5, ['shop']]], '18:00'], 'error: unknown step shop'],\n  ['regression: midnight wraparound',\n   [[['prep', 30, []], ['roast', 90, ['prep', 'marinate']], ['marinate', 30, ['prep']],\n     ['sauce', 90, ['roast']]],\n    '01:15'],\n   [['prep', '21:15'], ['marinate', '21:45'], ['roast', '22:15'], ['sauce', '23:45']]],\n  ['repair check: midnight wraparound',\n   [[['rest', 30, ['prep', 'sauce']], ['sauce', 5, ['prep', 'roast']], ['marinate', 90, []], ['prep', 45, []],\n     ['roast', 90, []]],\n    '02:00'],\n   [['roast', '23:55'], ['marinate', '00:30'], ['prep', '00:40'], ['sauce', '01:25'], ['rest', '01:30']]],\n  ['generated control 1',\n   [[['sauce', 30, ['marinate', 'shop']], ['marinate', 90, ['prep']], ['prep', 5, []],\n     ['rest', 240, ['sauce']], ['roast', 15, ['prep', 'marinate']],\n     ['plate', 90, ['prep', 'roast', 'rest']]],\n    '01:15'],\n   'error: unknown step shop'],\n  ['generated control 2',\n   [[['roast', 5, ['prep', 'marinate']], ['marinate', 10, ['prep']], ['prep', 30, []]], '12:00'],\n   [['prep', '11:15'], ['marinate', '11:45'], ['roast', '11:55']]],\n  ['generated control 3',\n   [[['marinate', 30, []], ['prep', 90, []], ['rest', 30, ['prep']], ['plate', 45, ['prep', 'rest']],\n     ['roast', 10, []], ['sauce', 30, ['prep']]],\n    '01:15'],\n   [['prep', '22:30'], ['rest', '00:00'], ['plate', '00:30'], ['marinate', '00:45'], ['sauce', '00:45'],\n    ['roast', '01:05']]]],\n [['cycle', [[['a', 5, ['b']], ['b', 5, ['a']]], '18:00'], 'error: cycle'],\n  ['unknown dependency', [[['a', 5, ['shop']]], '18:00'], 'error: unknown step shop'],\n  ['chain', [[['prep', 10, []], ['roast', 90, ['prep']], ['rest', 15, ['roast']]], '18:30'],\n   [['prep', '16:35'], ['roast', '16:45'], ['rest', '18:15']]],\n  ['regression: midnight wraparound',\n   [[['rest', 90, ['sauce']], ['marinate', 90, ['prep']], ['plate', 30, ['rest']], ['roast', 45, ['prep']],\n     ['prep', 90, []], ['sauce', 5, ['prep', 'marinate']]],\n    '01:15'],\n   [['prep', '20:10'], ['marinate', '21:40'], ['sauce', '23:10'], ['rest', '23:15'], ['roast', '00:30'],\n    ['plate', '00:45']]],\n  ['repair check: midnight wraparound',\n   [[['sauce', 30, ['marinate']], ['marinate', 45, ['prep']], ['rest', 30, ['marinate', 'sauce']],\n     ['prep', 5, []], ['roast', 15, []]],\n    '01:15'],\n   [['prep', '23:25'], ['marinate', '23:30'], ['sauce', '00:15'], ['rest', '00:45'], ['roast', '01:00']]],\n  ['generated control 1',\n   [[['prep', 15, ['sauce']], ['roast', 15, []], ['marinate', 15, []], ['sauce', 30, ['marinate', 'roast']]],\n    '19:45'],\n   [['marinate', '18:45'], ['roast', '18:45'], ['sauce', '19:00'], ['prep', '19:30']]],\n  ['generated control 2',\n   [[['prep', 45, []], ['sauce', 30, ['prep']], ['marinate', 90, []], ['roast', 90, ['prep', 'marinate']]],\n    '12:00'],\n   [['marinate', '09:00'], ['prep', '09:45'], ['roast', '10:30'], ['sauce', '11:30']]],\n  ['generated control 3',\n   [[['roast', 15, ['marinate']], ['prep', 45, []], ['rest', 30, ['roast']], ['marinate', 45, ['prep']],\n     ['sauce', 45, ['roast']]],\n    '19:45'],\n   [['prep', '17:15'], ['marinate', '18:00'], ['roast', '18:45'], ['sauce', '19:00'], ['rest', '19:15']]]],\n [['unknown dependency', [[['a', 5, ['shop']]], '18:00'], 'error: unknown step shop'],\n  ['chain', [[['prep', 10, []], ['roast', 90, ['prep']], ['rest', 15, ['roast']]], '18:30'],\n   [['prep', '16:35'], ['roast', '16:45'], ['rest', '18:15']]],\n  ['overnight marinade', [[['marinate', 480, []], ['grill', 20, ['marinate']]], '12:00'],\n   [['marinate', '03:40'], ['grill', '11:40']]],\n  ['regression: midnight wraparound',\n   [[['prep', 15, []], ['roast', 30, ['prep']], ['sauce', 90, []], ['marinate', 45, []]], '00:30'],\n   [['sauce', '23:00'], ['marinate', '23:45'], ['prep', '23:45'], ['roast', '00:00']]],\n  ['repair check: midnight wraparound',\n   [[['roast', 5, ['marinate']], ['prep', 5, []], ['marinate', 240, ['prep']]], '00:30'],\n   [['prep', '20:20'], ['marinate', '20:25'], ['roast', '00:25']]],\n  ['generated control 1',\n   [[['roast', 90, []], ['rest', 90, ['prep', 'shop']], ['marinate', 5, []],\n     ['plate', 90, ['roast', 'sauce']], ['prep', 5, []], ['sauce', 10, ['roast']]],\n    '19:45'],\n   'error: unknown step shop'],\n  ['generated control 2', [[['prep', 10, []], ['roast', 45, ['prep']], ['marinate', 240, ['prep']]], '12:00'],\n   [['prep', '07:50'], ['marinate', '08:00'], ['roast', '11:15']]],\n  ['generated control 3',\n   [[['plate', 5, []], ['prep', 10, []], ['rest', 90, ['roast', 'sauce']], ['sauce', 5, ['marinate']],\n     ['marinate', 5, ['prep']], ['roast', 15, []]],\n    '19:45'],\n   [['prep', '17:55'], ['roast', '18:00'], ['marinate', '18:05'], ['sauce', '18:10'], ['rest', '18:15'],\n    ['plate', '19:40']]]],\n [['chain', [[['prep', 10, []], ['roast', 90, ['prep']], ['rest', 15, ['roast']]], '18:30'],\n   [['prep', '16:35'], ['roast', '16:45'], ['rest', '18:15']]],\n  ['overnight marinade', [[['marinate', 480, []], ['grill', 20, ['marinate']]], '12:00'],\n   [['marinate', '03:40'], ['grill', '11:40']]],\n  ['cycle', [[['a', 5, ['b']], ['b', 5, ['a']]], '18:00'], 'error: cycle'],\n  ['regression: midnight wraparound',\n   [[['roast', 30, []], ['marinate', 30, []], ['sauce', 240, ['marinate']], ['prep', 10, []]], '02:00'],\n   [['marinate', '21:30'], ['sauce', '22:00'], ['roast', '01:30'], ['prep', '01:50']]],\n  ['repair check: midnight wraparound',\n   [[['sauce', 240, ['prep', 'roast']], ['marinate', 240, []], ['prep', 5, []], ['roast', 240, ['marinate']],\n     ['rest', 90, ['prep']]],\n    '02:00'],\n   [['marinate', '14:00'], ['roast', '18:00'], ['prep', '21:55'], ['sauce', '22:00'], ['rest', '00:30']]],\n  ['generated control 1',\n   [[['prep', 90, []], ['marinate', 15, ['prep']], ['roast', 10, ['shop']], ['rest', 45, ['roast', 'sauce']],\n     ['sauce', 90, ['marinate']]],\n    '00:30'],\n   'error: unknown step shop'],\n  ['generated control 2', [[['roast', 30, []], ['marinate', 45, []], ['prep', 15, []]], '01:15'],\n   [['marinate', '00:30'], ['roast', '00:45'], ['prep', '01:00']]],\n  ['generated control 3',\n   [[['marinate', 15, ['prep']], ['prep', 5, ['roast']], ['roast', 240, ['marinate']]], '19:45'],\n   'error: cycle']]]\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":"b1a1790a97ccba2a8ba39d7d18ef8dee1c5ea45163d30ca9c23d03095f352999","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(steps, serve):\n    by = {s[0]: s for s in steps}\n    for s in steps:\n        for d in s[2]:\n            if d not in by:\n                return 'error: unknown step ' + d\n    h, m = serve.split(':')\n    T = int(h) * 60 + int(m)\n    latest = {}\n    visiting = set()\n    def ls(n):\n        if n in latest:\n            return latest[n]\n        if n in visiting:\n            return None\n        visiting.add(n)\n        finish = T\n        for s in steps:\n            if n in s[2]:\n                v = ls(s[0])\n                if v is None:\n                    return None\n                finish = min(finish, v)\n        visiting.discard(n)\n        latest[n] = finish - by[n][1]\n        return latest[n]\n    rows = []\n    for s in steps:\n        v = ls(s[0])\n        if v is None:\n            return 'error: cycle'\n        rows.append((v, s[0]))\n    rows.sort()\n    return [[n, '%02d:%02d' % divmod(v, 60)] for v, n in rows]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['chain', [[['prep', 10, []], ['roast', 90, ['prep']], ['rest', 15, ['roast']]], '18:30'],\n   [['prep', '16:35'], ['roast', '16:45'], ['rest', '18:15']]],\n  ['overnight marinade', [[['marinate', 480, []], ['grill', 20, ['marinate']]], '12:00'],\n   [['marinate', '03:40'], ['grill', '11:40']]],\n  ['cycle', [[['a', 5, ['b']], ['b', 5, ['a']]], '18:00'], 'error: cycle'],\n  ['regression: midnight wraparound',\n   [[['marinate', 90, []], ['roast', 90, ['marinate']], ['prep', 45, []]], '02:00'],\n   [['marinate', '23:00'], ['roast', '00:30'], ['prep', '01:15']]],\n  ['repair check: midnight wraparound',\n   [[['roast', 45, ['prep']], ['prep', 15, []], ['sauce', 10, ['roast']], ['marinate', 10, []]], '00:30'],\n   [['prep', '23:20'], ['roast', '23:35'], ['marinate', '00:20'], ['sauce', '00:20']]],\n  ['generated control 1',\n   [[['roast', 240, []], ['prep', 15, []], ['marinate', 240, ['prep', 'shop']]], '18:30'],\n   'error: unknown step shop'],\n  ['generated control 2',\n   [[['prep', 5, []], ['roast', 15, ['prep']], ['rest', 10, ['marinate']], ['marinate', 5, []],\n     ['sauce', 30, []], ['plate', 5, ['marinate', 'roast', 'rest']]],\n    '12:00'],\n   [['sauce', '11:30'], ['prep', '11:35'], ['marinate', '11:40'], ['roast', '11:40'], ['rest', '11:45'],\n    ['plate', '11:55']]],\n  ['generated control 3', [[['roast', 45, []], ['prep', 30, []], ['marinate', 90, ['prep']]], '02:00'],\n   [['prep', '00:00'], ['marinate', '00:30'], ['roast', '01:15']]]],\n [['overnight marinade', [[['marinate', 480, []], ['grill', 20, ['marinate']]], '12:00'],\n   [['marinate', '03:40'], ['grill', '11:40']]],\n  ['cycle', [[['a', 5, ['b']], ['b', 5, ['a']]], '18:00'], 'error: cycle'],\n  ['unknown dependency', [[['a', 5, ['shop']]], '18:00'], 'error: unknown step shop'],\n  ['regression: midnight wraparound',\n   [[['prep', 30, []], ['roast', 90, ['prep', 'marinate']], ['marinate', 30, ['prep']],\n     ['sauce', 90, ['roast']]],\n    '01:15'],\n   [['prep', '21:15'], ['marinate', '21:45'], ['roast', '22:15'], ['sauce', '23:45']]],\n  ['repair check: midnight wraparound',\n   [[['rest', 30, ['prep', 'sauce']], ['sauce', 5, ['prep', 'roast']], ['marinate', 90, []], ['prep', 45, []],\n     ['roast', 90, []]],\n    '02:00'],\n   [['roast', '23:55'], ['marinate', '00:30'], ['prep', '00:40'], ['sauce', '01:25'], ['rest', '01:30']]],\n  ['generated control 1',\n   [[['sauce', 30, ['marinate', 'shop']], ['marinate', 90, ['prep']], ['prep', 5, []],\n     ['rest', 240, ['sauce']], ['roast', 15, ['prep', 'marinate']],\n     ['plate', 90, ['prep', 'roast', 'rest']]],\n    '01:15'],\n   'error: unknown step shop'],\n  ['generated control 2',\n   [[['roast', 5, ['prep', 'marinate']], ['marinate', 10, ['prep']], ['prep', 30, []]], '12:00'],\n   [['prep', '11:15'], ['marinate', '11:45'], ['roast', '11:55']]],\n  ['generated control 3',\n   [[['marinate', 30, []], ['prep', 90, []], ['rest', 30, ['prep']], ['plate', 45, ['prep', 'rest']],\n     ['roast', 10, []], ['sauce', 30, ['prep']]],\n    '01:15'],\n   [['prep', '22:30'], ['rest', '00:00'], ['plate', '00:30'], ['marinate', '00:45'], ['sauce', '00:45'],\n    ['roast', '01:05']]]],\n [['cycle', [[['a', 5, ['b']], ['b', 5, ['a']]], '18:00'], 'error: cycle'],\n  ['unknown dependency', [[['a', 5, ['shop']]], '18:00'], 'error: unknown step shop'],\n  ['chain', [[['prep', 10, []], ['roast', 90, ['prep']], ['rest', 15, ['roast']]], '18:30'],\n   [['prep', '16:35'], ['roast', '16:45'], ['rest', '18:15']]],\n  ['regression: midnight wraparound',\n   [[['rest', 90, ['sauce']], ['marinate', 90, ['prep']], ['plate', 30, ['rest']], ['roast', 45, ['prep']],\n     ['prep', 90, []], ['sauce', 5, ['prep', 'marinate']]],\n    '01:15'],\n   [['prep', '20:10'], ['marinate', '21:40'], ['sauce', '23:10'], ['rest', '23:15'], ['roast', '00:30'],\n    ['plate', '00:45']]],\n  ['repair check: midnight wraparound',\n   [[['sauce', 30, ['marinate']], ['marinate', 45, ['prep']], ['rest', 30, ['marinate', 'sauce']],\n     ['prep', 5, []], ['roast', 15, []]],\n    '01:15'],\n   [['prep', '23:25'], ['marinate', '23:30'], ['sauce', '00:15'], ['rest', '00:45'], ['roast', '01:00']]],\n  ['generated control 1',\n   [[['prep', 15, ['sauce']], ['roast', 15, []], ['marinate', 15, []], ['sauce', 30, ['marinate', 'roast']]],\n    '19:45'],\n   [['marinate', '18:45'], ['roast', '18:45'], ['sauce', '19:00'], ['prep', '19:30']]],\n  ['generated control 2',\n   [[['prep', 45, []], ['sauce', 30, ['prep']], ['marinate', 90, []], ['roast', 90, ['prep', 'marinate']]],\n    '12:00'],\n   [['marinate', '09:00'], ['prep', '09:45'], ['roast', '10:30'], ['sauce', '11:30']]],\n  ['generated control 3',\n   [[['roast', 15, ['marinate']], ['prep', 45, []], ['rest', 30, ['roast']], ['marinate', 45, ['prep']],\n     ['sauce', 45, ['roast']]],\n    '19:45'],\n   [['prep', '17:15'], ['marinate', '18:00'], ['roast', '18:45'], ['sauce', '19:00'], ['rest', '19:15']]]],\n [['unknown dependency', [[['a', 5, ['shop']]], '18:00'], 'error: unknown step shop'],\n  ['chain', [[['prep', 10, []], ['roast', 90, ['prep']], ['rest', 15, ['roast']]], '18:30'],\n   [['prep', '16:35'], ['roast', '16:45'], ['rest', '18:15']]],\n  ['overnight marinade', [[['marinate', 480, []], ['grill', 20, ['marinate']]], '12:00'],\n   [['marinate', '03:40'], ['grill', '11:40']]],\n  ['regression: midnight wraparound',\n   [[['prep', 15, []], ['roast', 30, ['prep']], ['sauce', 90, []], ['marinate', 45, []]], '00:30'],\n   [['sauce', '23:00'], ['marinate', '23:45'], ['prep', '23:45'], ['roast', '00:00']]],\n  ['repair check: midnight wraparound',\n   [[['roast', 5, ['marinate']], ['prep', 5, []], ['marinate', 240, ['prep']]], '00:30'],\n   [['prep', '20:20'], ['marinate', '20:25'], ['roast', '00:25']]],\n  ['generated control 1',\n   [[['roast', 90, []], ['rest', 90, ['prep', 'shop']], ['marinate', 5, []],\n     ['plate', 90, ['roast', 'sauce']], ['prep', 5, []], ['sauce', 10, ['roast']]],\n    '19:45'],\n   'error: unknown step shop'],\n  ['generated control 2', [[['prep', 10, []], ['roast', 45, ['prep']], ['marinate', 240, ['prep']]], '12:00'],\n   [['prep', '07:50'], ['marinate', '08:00'], ['roast', '11:15']]],\n  ['generated control 3',\n   [[['plate', 5, []], ['prep', 10, []], ['rest', 90, ['roast', 'sauce']], ['sauce', 5, ['marinate']],\n     ['marinate', 5, ['prep']], ['roast', 15, []]],\n    '19:45'],\n   [['prep', '17:55'], ['roast', '18:00'], ['marinate', '18:05'], ['sauce', '18:10'], ['rest', '18:15'],\n    ['plate', '19:40']]]],\n [['chain', [[['prep', 10, []], ['roast', 90, ['prep']], ['rest', 15, ['roast']]], '18:30'],\n   [['prep', '16:35'], ['roast', '16:45'], ['rest', '18:15']]],\n  ['overnight marinade', [[['marinate', 480, []], ['grill', 20, ['marinate']]], '12:00'],\n   [['marinate', '03:40'], ['grill', '11:40']]],\n  ['cycle', [[['a', 5, ['b']], ['b', 5, ['a']]], '18:00'], 'error: cycle'],\n  ['regression: midnight wraparound',\n   [[['roast', 30, []], ['marinate', 30, []], ['sauce', 240, ['marinate']], ['prep', 10, []]], '02:00'],\n   [['marinate', '21:30'], ['sauce', '22:00'], ['roast', '01:30'], ['prep', '01:50']]],\n  ['repair check: midnight wraparound',\n   [[['sauce', 240, ['prep', 'roast']], ['marinate', 240, []], ['prep', 5, []], ['roast', 240, ['marinate']],\n     ['rest', 90, ['prep']]],\n    '02:00'],\n   [['marinate', '14:00'], ['roast', '18:00'], ['prep', '21:55'], ['sauce', '22:00'], ['rest', '00:30']]],\n  ['generated control 1',\n   [[['prep', 90, []], ['marinate', 15, ['prep']], ['roast', 10, ['shop']], ['rest', 45, ['roast', 'sauce']],\n     ['sauce', 90, ['marinate']]],\n    '00:30'],\n   'error: unknown step shop'],\n  ['generated control 2', [[['roast', 30, []], ['marinate', 45, []], ['prep', 15, []]], '01:15'],\n   [['marinate', '00:30'], ['roast', '00:45'], ['prep', '01:00']]],\n  ['generated control 3',\n   [[['marinate', 15, ['prep']], ['prep', 5, ['roast']], ['roast', 240, ['marinate']]], '19:45'],\n   'error: cycle']]]\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":"A deterministic toy contract stated in full here; it is a bounded teaching model, not an authoritative reference or standards implementation. 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-recipe_scaling_and_nutrition-backward-schedule-midnight-wraparound","generated_at":"2026-09-29T14:52:30.905410+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Dinner-party and restaurant prep planners schedule long marinades and roasts backward from service.","root_cause":"Negative minute offsets are formatted without wrapping into the previous day.","sha256":"2a170f789d55b8b2d83fe6fa6a05b71e91146e6948b5b3a414439e75dae38c20","title":"Backward recipe step scheduler: midnight wraparound · 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":42.659,"exit_code":1,"observations":[{"actual":[["prep","16:35"],["roast","16:45"],["rest","18:15"]],"check":"chain","expected":[["prep","16:35"],["roast","16:45"],["rest","18:15"]],"passed":true},{"actual":[["marinate","03:40"],["grill","11:40"]],"check":"overnight marinade","expected":[["marinate","03:40"],["grill","11:40"]],"passed":true},{"actual":"error: cycle","check":"cycle","expected":"error: cycle","passed":true},{"actual":[["marinate","01:00"],["roast","00:30"],["prep","01:15"]],"check":"regression: midnight wraparound","expected":[["marinate","23:00"],["roast","00:30"],["prep","01:15"]],"passed":false},{"actual":[["prep","00:40"],["roast","00:25"],["marinate","00:20"],["sauce","00:20"]],"check":"repair check: midnight wraparound","expected":[["prep","23:20"],["roast","23:35"],["marinate","00:20"],["sauce","00:20"]],"passed":false},{"actual":"error: unknown step shop","check":"generated control 1","expected":"error: unknown step shop","passed":true},{"actual":[["sauce","11:30"],["prep","11:35"],["marinate","11:40"],["roast","11:40"],["rest","11:45"],["plate","11:55"]],"check":"generated control 2","expected":[["sauce","11:30"],["prep","11:35"],["marinate","11:40"],["roast","11:40"],["rest","11:45"],["plate","11:55"]],"passed":true},{"actual":[["prep","00:00"],["marinate","00:30"],["roast","01:15"]],"check":"generated control 3","expected":[["prep","00:00"],["marinate","00:30"],["roast","01:15"]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"chain\", \"actual\": [[\"prep\", \"16:35\"], [\"roast\", \"16:45\"], [\"rest\", \"18:15\"]], \"expected\": [[\"prep\", \"16:35\"], [\"roast\", \"16:45\"], [\"rest\", \"18:15\"]], \"passed\": true}, {\"check\": \"overnight marinade\", \"actual\": [[\"marinate\", \"03:40\"], [\"grill\", \"11:40\"]], \"expected\": [[\"marinate\", \"03:40\"], [\"grill\", \"11:40\"]], \"passed\": true}, {\"check\": \"cycle\", \"actual\": \"error: cycle\", \"expected\": \"error: cycle\", \"passed\": true}, {\"check\": \"regression: midnight wraparound\", \"actual\": [[\"marinate\", \"01:00\"], [\"roast\", \"00:30\"], [\"prep\", \"01:15\"]], \"expected\": [[\"marinate\", \"23:00\"], [\"roast\", \"00:30\"], [\"prep\", \"01:15\"]], \"passed\": false}, {\"check\": \"repair check: midnight wraparound\", \"actual\": [[\"prep\", \"00:40\"], [\"roast\", \"00:25\"], [\"marinate\", \"00:20\"], [\"sauce\", \"00:20\"]], \"expected\": [[\"prep\", \"23:20\"], [\"roast\", \"23:35\"], [\"marinate\", \"00:20\"], [\"sauce\", \"00:20\"]], \"passed\": false}, {\"check\": \"generated control 1\", \"actual\": \"error: unknown step shop\", \"expected\": \"error: unknown step shop\", \"passed\": true}, {\"check\": \"generated control 2\", \"actual\": [[\"sauce\", \"11:30\"], [\"prep\", \"11:35\"], [\"marinate\", \"11:40\"], [\"roast\", \"11:40\"], [\"rest\", \"11:45\"], [\"plate\", \"11:55\"]], \"expected\": [[\"sauce\", \"11:30\"], [\"prep\", \"11:35\"], [\"marinate\", \"11:40\"], [\"roast\", \"11:40\"], [\"rest\", \"11:45\"], [\"plate\", \"11:55\"]], \"passed\": true}, {\"check\": \"generated control 3\", \"actual\": [[\"prep\", \"00:00\"], [\"marinate\", \"00:30\"], [\"roast\", \"01:15\"]], \"expected\": [[\"prep\", \"00:00\"], [\"marinate\", \"00:30\"], [\"roast\", \"01:15\"]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":44.212,"exit_code":1,"observations":[{"actual":[["prep","16:35"],["roast","16:45"],["rest","18:15"]],"check":"chain","expected":[["prep","16:35"],["roast","16:45"],["rest","18:15"]],"passed":true},{"actual":[["marinate","03:40"],["grill","11:40"]],"check":"overnight marinade","expected":[["marinate","03:40"],["grill","11:40"]],"passed":true},{"actual":"error: cycle","check":"cycle","expected":"error: cycle","passed":true},{"actual":[["marinate","-1:00"],["roast","00:30"],["prep","01:15"]],"check":"regression: midnight wraparound","expected":[["marinate","23:00"],["roast","00:30"],["prep","01:15"]],"passed":false},{"actual":[["prep","-1:20"],["roast","-1:35"],["marinate","00:20"],["sauce","00:20"]],"check":"repair check: midnight wraparound","expected":[["prep","23:20"],["roast","23:35"],["marinate","00:20"],["sauce","00:20"]],"passed":false},{"actual":"error: unknown step shop","check":"generated control 1","expected":"error: unknown step shop","passed":true},{"actual":[["sauce","11:30"],["prep","11:35"],["marinate","11:40"],["roast","11:40"],["rest","11:45"],["plate","11:55"]],"check":"generated control 2","expected":[["sauce","11:30"],["prep","11:35"],["marinate","11:40"],["roast","11:40"],["rest","11:45"],["plate","11:55"]],"passed":true},{"actual":[["prep","00:00"],["marinate","00:30"],["roast","01:15"]],"check":"generated control 3","expected":[["prep","00:00"],["marinate","00:30"],["roast","01:15"]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"chain\", \"actual\": [[\"prep\", \"16:35\"], [\"roast\", \"16:45\"], [\"rest\", \"18:15\"]], \"expected\": [[\"prep\", \"16:35\"], [\"roast\", \"16:45\"], [\"rest\", \"18:15\"]], \"passed\": true}, {\"check\": \"overnight marinade\", \"actual\": [[\"marinate\", \"03:40\"], [\"grill\", \"11:40\"]], \"expected\": [[\"marinate\", \"03:40\"], [\"grill\", \"11:40\"]], \"passed\": true}, {\"check\": \"cycle\", \"actual\": \"error: cycle\", \"expected\": \"error: cycle\", \"passed\": true}, {\"check\": \"regression: midnight wraparound\", \"actual\": [[\"marinate\", \"-1:00\"], [\"roast\", \"00:30\"], [\"prep\", \"01:15\"]], \"expected\": [[\"marinate\", \"23:00\"], [\"roast\", \"00:30\"], [\"prep\", \"01:15\"]], \"passed\": false}, {\"check\": \"repair check: midnight wraparound\", \"actual\": [[\"prep\", \"-1:20\"], [\"roast\", \"-1:35\"], [\"marinate\", \"00:20\"], [\"sauce\", \"00:20\"]], \"expected\": [[\"prep\", \"23:20\"], [\"roast\", \"23:35\"], [\"marinate\", \"00:20\"], [\"sauce\", \"00:20\"]], \"passed\": false}, {\"check\": \"generated control 1\", \"actual\": \"error: unknown step shop\", \"expected\": \"error: unknown step shop\", \"passed\": true}, {\"check\": \"generated control 2\", \"actual\": [[\"sauce\", \"11:30\"], [\"prep\", \"11:35\"], [\"marinate\", \"11:40\"], [\"roast\", \"11:40\"], [\"rest\", \"11:45\"], [\"plate\", \"11:55\"]], \"expected\": [[\"sauce\", \"11:30\"], [\"prep\", \"11:35\"], [\"marinate\", \"11:40\"], [\"roast\", \"11:40\"], [\"rest\", \"11:45\"], [\"plate\", \"11:55\"]], \"passed\": true}, {\"check\": \"generated control 3\", \"actual\": [[\"prep\", \"00:00\"], [\"marinate\", \"00:30\"], [\"roast\", \"01:15\"]], \"expected\": [[\"prep\", \"00:00\"], [\"marinate\", \"00:30\"], [\"roast\", \"01:15\"]], \"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."}}