FAILURE MAP
← Case archive

FA-97291 / Recipe scaling and nutrition / Open access

Backward recipe step scheduler: earliest dependent start · case 01

Prep scheduled to end when the last dependent step starts, so the roast starts before prep is done.

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

ROOT CAUSE

The deadline takes the latest dependent start instead of the earliest.

THE FAILURE

The deadline takes the latest dependent start instead of the earliest.

Unsuccessful approach: Keeping only the last dependent visited ignores earlier ones.

Case 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.

Why this case matters

Dinner-party and restaurant prep planners schedule long marinades and roasts backward from service.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
from fractions import Fraction
N = 1
observations = []
def solve(steps, serve):
    by = {s[0]: s for s in steps}
    for s in steps:
        for d in s[2]:
            if d not in by:
                return 'error: unknown step ' + d
    h, m = serve.split(':')
    T = int(h) * 60 + int(m)
    latest = {}
    visiting = set()
    def ls(n):
        if n in latest:
            return latest[n]
        if n in visiting:
            return None
        visiting.add(n)
        finish = T
        for s in steps:
            if n in s[2]:
                v = ls(s[0])
                if v is None:
                    return None
                finish = max(finish, v)
        visiting.discard(n)
        latest[n] = finish - by[n][1]
        return latest[n]
    rows = []
    for s in steps:
        v = ls(s[0])
        if v is None:
            return 'error: cycle'
        rows.append((v, s[0]))
    rows.sort()
    return [[n, '%02d:%02d' % divmod(v % 1440, 60)] for v, n in rows]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['chain', [[['prep', 10, []], ['roast', 90, ['prep']], ['rest', 15, ['roast']]], '18:30'],
   [['prep', '16:35'], ['roast', '16:45'], ['rest', '18:15']]],
  ['overnight marinade', [[['marinate', 480, []], ['grill', 20, ['marinate']]], '12:00'],
   [['marinate', '03:40'], ['grill', '11:40']]],
  ['cycle', [[['a', 5, ['b']], ['b', 5, ['a']]], '18:00'], 'error: cycle'],
  ['regression: earliest dependent start',
   [[['roast', 240, ['marinate']], ['prep', 5, []], ['sauce', 30, ['roast']], ['marinate', 30, ['prep']]],
    '01:15'],
   [['prep', '20:10'], ['marinate', '20:15'], ['roast', '20:45'], ['sauce', '00:45']]],
  ['repair check: earliest dependent start',
   [[['roast', 45, ['prep', 'marinate']], ['marinate', 15, []], ['sauce', 10, ['marinate', 'roast']],
     ['prep', 5, []]],
    '01:15'],
   [['marinate', '00:05'], ['prep', '00:15'], ['roast', '00:20'], ['sauce', '01:05']]],
  ['generated control 1',
   [[['sauce', 15, ['marinate', 'roast']], ['prep', 45, ['plate']], ['rest', 240, ['marinate']],
     ['marinate', 45, ['shop']], ['plate', 240, ['prep', 'roast']], ['roast', 30, []]],
    '01:15'],
   'error: unknown step shop'],
  ['generated control 2',
   [[['marinate', 45, ['prep']], ['sauce', 45, ['marinate']], ['prep', 90, []], ['roast', 90, ['prep']]],
    '01:15'],
   [['prep', '22:15'], ['marinate', '23:45'], ['roast', '23:45'], ['sauce', '00:30']]],
  ['generated control 3',
   [[['rest', 90, ['roast']], ['sauce', 45, ['prep', 'marinate', 'shop']], ['roast', 45, []],
     ['prep', 240, ['rest']], ['marinate', 90, ['prep']]],
    '18:30'],
   'error: unknown step shop']],
 [['overnight marinade', [[['marinate', 480, []], ['grill', 20, ['marinate']]], '12:00'],
   [['marinate', '03:40'], ['grill', '11:40']]],
  ['cycle', [[['a', 5, ['b']], ['b', 5, ['a']]], '18:00'], 'error: cycle'],
  ['unknown dependency', [[['a', 5, ['shop']]], '18:00'], 'error: unknown step shop'],
  ['regression: earliest dependent start',
   [[['sauce', 30, []], ['marinate', 10, ['prep']], ['roast', 15, ['prep']], ['prep', 45, []]], '02:00'],
   [['prep', '01:00'], ['sauce', '01:30'], ['roast', '01:45'], ['marinate', '01:50']]],
  ['repair check: earliest dependent start',
   [[['roast', 90, ['prep']], ['marinate', 5, ['prep']], ['prep', 240, []]], '18:30'],
   [['prep', '13:00'], ['roast', '17:00'], ['marinate', '18:25']]],
  ['generated control 1',
   [[['prep', 15, []], ['roast', 45, ['marinate']], ['marinate', 90, ['prep']]], '12:00'],
   [['prep', '09:30'], ['marinate', '09:45'], ['roast', '11:15']]],
  ['generated control 2',
   [[['prep', 240, []], ['marinate', 10, []], ['sauce', 90, ['prep', 'roast']],
     ['roast', 5, ['prep', 'marinate']]],
    '19:45'],
   [['prep', '14:10'], ['marinate', '18:00'], ['roast', '18:10'], ['sauce', '18:15']]],
  ['generated control 3',
   [[['prep', 15, []], ['roast', 5, ['prep']], ['plate', 90, ['prep', 'roast', 'rest']],
     ['rest', 10, ['prep', 'sauce']], ['sauce', 90, ['marinate']], ['marinate', 10, []]],
    '18:30'],
   [['marinate', '15:10'], ['sauce', '15:20'], ['prep', '16:35'], ['rest', '16:50'], ['roast', '16:55'],
    ['plate', '17:00']]]],
 [['cycle', [[['a', 5, ['b']], ['b', 5, ['a']]], '18:00'], 'error: cycle'],
  ['unknown dependency', [[['a', 5, ['shop']]], '18:00'], 'error: unknown step shop'],
  ['chain', [[['prep', 10, []], ['roast', 90, ['prep']], ['rest', 15, ['roast']]], '18:30'],
   [['prep', '16:35'], ['roast', '16:45'], ['rest', '18:15']]],
  ['regression: earliest dependent start',
   [[['sauce', 15, ['roast']], ['prep', 30, []], ['marinate', 15, ['prep']], ['roast', 15, []],
     ['rest', 10, ['prep', 'marinate', 'roast', 'sauce']]],
    '19:45'],
   [['prep', '18:50'], ['roast', '19:05'], ['marinate', '19:20'], ['sauce', '19:20'], ['rest', '19:35']]],
  ['repair check: earliest dependent start',
   [[['roast', 10, []], ['prep', 5, []], ['plate', 90, ['prep', 'marinate', 'roast']],
     ['sauce', 5, ['roast']], ['rest', 5, []], ['marinate', 90, []]],
    '00:30'],
   [['marinate', '21:30'], ['roast', '22:50'], ['prep', '22:55'], ['plate', '23:00'], ['rest', '00:25'],
    ['sauce', '00:25']]],
  ['generated control 1',
   [[['rest', 90, ['marinate', 'sauce']], ['roast', 15, ['marinate']], ['marinate', 240, []],
     ['sauce', 240, ['prep', 'marinate', 'roast', 'shop']], ['prep', 10, ['shop']],
     ['plate', 30, ['marinate', 'rest']]],
    '18:30'],
   'error: unknown step shop'],
  ['generated control 2',
   [[['roast', 240, []], ['prep', 240, []], ['sauce', 45, ['roast']], ['marinate', 5, ['prep']]], '02:00'],
   [['roast', '21:15'], ['prep', '21:55'], ['sauce', '01:15'], ['marinate', '01:55']]],
  ['generated control 3',
   [[['marinate', 240, ['prep']], ['sauce', 5, ['roast']], ['roast', 90, ['shop']], ['plate', 30, ['shop']],
     ['prep', 10, []], ['rest', 5, ['prep', 'roast']]],
    '19:45'],
   'error: unknown step shop']],
 [['unknown dependency', [[['a', 5, ['shop']]], '18:00'], 'error: unknown step shop'],
  ['chain', [[['prep', 10, []], ['roast', 90, ['prep']], ['rest', 15, ['roast']]], '18:30'],
   [['prep', '16:35'], ['roast', '16:45'], ['rest', '18:15']]],
  ['overnight marinade', [[['marinate', 480, []], ['grill', 20, ['marinate']]], '12:00'],
   [['marinate', '03:40'], ['grill', '11:40']]],
  ['regression: earliest dependent start',
   [[['marinate', 30, []], ['prep', 5, ['roast']], ['roast', 45, ['marinate']]], '01:15'],
   [['marinate', '23:55'], ['roast', '00:25'], ['prep', '01:10']]],
  ['repair check: earliest dependent start',
   [[['prep', 90, []], ['roast', 15, ['marinate']], ['marinate', 30, []], ['sauce', 45, ['prep', 'marinate']],
     ['plate', 90, ['sauce']], ['rest', 240, ['prep', 'sauce']]],
    '01:15'],
   [['prep', '19:00'], ['marinate', '20:00'], ['sauce', '20:30'], ['rest', '21:15'], ['plate', '23:45'],
    ['roast', '01:00']]],
  ['generated control 1', [[['prep', 5, []], ['roast', 15, []], ['marinate', 15, []]], '00:30'],
   [['marinate', '00:15'], ['roast', '00:15'], ['prep', '00:25']]],
  ['generated control 2',
   [[['prep', 15, []], ['roast', 45, ['marinate']], ['marinate', 90, ['prep']]], '19:45'],
   [['prep', '17:15'], ['marinate', '17:30'], ['roast', '19:00']]],
  ['generated control 3',
   [[['prep', 45, []], ['marinate', 45, ['prep']], ['sauce', 10, ['roast']], ['roast', 45, []]], '02:00'],
   [['prep', '00:30'], ['roast', '01:05'], ['marinate', '01:15'], ['sauce', '01:50']]]],
 [['chain', [[['prep', 10, []], ['roast', 90, ['prep']], ['rest', 15, ['roast']]], '18:30'],
   [['prep', '16:35'], ['roast', '16:45'], ['rest', '18:15']]],
  ['overnight marinade', [[['marinate', 480, []], ['grill', 20, ['marinate']]], '12:00'],
   [['marinate', '03:40'], ['grill', '11:40']]],
  ['cycle', [[['a', 5, ['b']], ['b', 5, ['a']]], '18:00'], 'error: cycle'],
  ['regression: earliest dependent start',
   [[['plate', 45, ['marinate', 'roast', 'sauce', 'rest']], ['sauce', 15, ['prep', 'marinate']],
     ['marinate', 45, []], ['roast', 15, []], ['prep', 30, []],
     ['rest', 15, ['marinate', 'roast', 'sauce']]],
    '19:45'],
   [['marinate', '17:45'], ['prep', '18:00'], ['roast', '18:30'], ['sauce', '18:30'], ['rest', '18:45'],
    ['plate', '19:00']]],
  ['repair check: earliest dependent start',
   [[['prep', 10, []], ['roast', 240, []], ['marinate', 240, []], ['sauce', 5, ['prep']],
     ['plate', 10, ['prep', 'marinate', 'roast', 'rest']],
     ['rest', 90, ['prep', 'marinate', 'roast', 'sauce']]],
    '18:30'],
   [['marinate', '12:50'], ['roast', '12:50'], ['prep', '16:35'], ['sauce', '16:45'], ['rest', '16:50'],
    ['plate', '18:20']]],
  ['generated control 1',
   [[['sauce', 240, []], ['marinate', 15, ['prep']], ['roast', 240, ['prep']], ['prep', 240, []]], '02:00'],
   [['prep', '18:00'], ['roast', '22:00'], ['sauce', '22:00'], ['marinate', '01:45']]],
  ['generated control 2',
   [[['sauce', 45, []], ['roast', 240, ['marinate']], ['marinate', 45, []], ['prep', 15, []],
     ['rest', 90, ['marinate', 'roast', 'sauce']]],
    '18:30'],
   [['marinate', '12:15'], ['roast', '13:00'], ['sauce', '16:15'], ['rest', '17:00'], ['prep', '18:15']]],
  ['generated control 3', [[['marinate', 45, []], ['roast', 240, ['marinate']], ['prep', 45, []]], '01:15'],
   [['marinate', '20:30'], ['roast', '21:15'], ['prep', '00:30']]]]]
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
chain[['roast', '17:00'], ['rest', '18:15'], ['prep', '18:20']][['prep', '16:35'], ['roast', '16:45'], ['rest', '18:15']]Failed
overnight marinade[['marinate', '04:00'], ['grill', '11:40']][['marinate', '03:40'], ['grill', '11:40']]Failed
cycleerror: cycleerror: cyclePassed
regression: earliest dependent start[['roast', '21:15'], ['marinate', '00:45'], ['sauce', '00:45'], ['prep', '01:10']][['prep', '20:10'], ['marinate', '20:15'], ['roast', '20:45'], ['sauce', '00:45']]Failed
repair check: earliest dependent start[['roast', '00:30'], ['marinate', '01:00'], ['sauce', '01:05'], ['prep', '01:10']][['marinate', '00:05'], ['prep', '00:15'], ['roast', '00:20'], ['sauce', '01:05']]Failed
generated control 1error: unknown step shoperror: unknown step shopPassed
generated control 2[['prep', '23:45'], ['roast', '23:45'], ['marinate', '00:30'], ['sauce', '00:30']][['prep', '22:15'], ['marinate', '23:45'], ['roast', '23:45'], ['sauce', '00:30']]Failed
generated control 3error: unknown step shoperror: unknown step shopPassed

SHA-256 / 11e9d372e8079fbf67dfe7cf9475f3cb15badc9972b44fb1fe1c7eca16e42e48

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
from fractions import Fraction
N = 1
observations = []
def solve(steps, serve):
    by = {s[0]: s for s in steps}
    for s in steps:
        for d in s[2]:
            if d not in by:
                return 'error: unknown step ' + d
    h, m = serve.split(':')
    T = int(h) * 60 + int(m)
    latest = {}
    visiting = set()
    def ls(n):
        if n in latest:
            return latest[n]
        if n in visiting:
            return None
        visiting.add(n)
        finish = T
        for s in steps:
            if n in s[2]:
                v = ls(s[0])
                if v is None:
                    return None
                finish = v
        visiting.discard(n)
        latest[n] = finish - by[n][1]
        return latest[n]
    rows = []
    for s in steps:
        v = ls(s[0])
        if v is None:
            return 'error: cycle'
        rows.append((v, s[0]))
    rows.sort()
    return [[n, '%02d:%02d' % divmod(v % 1440, 60)] for v, n in rows]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['chain', [[['prep', 10, []], ['roast', 90, ['prep']], ['rest', 15, ['roast']]], '18:30'],
   [['prep', '16:35'], ['roast', '16:45'], ['rest', '18:15']]],
  ['overnight marinade', [[['marinate', 480, []], ['grill', 20, ['marinate']]], '12:00'],
   [['marinate', '03:40'], ['grill', '11:40']]],
  ['cycle', [[['a', 5, ['b']], ['b', 5, ['a']]], '18:00'], 'error: cycle'],
  ['regression: earliest dependent start',
   [[['roast', 240, ['marinate']], ['prep', 5, []], ['sauce', 30, ['roast']], ['marinate', 30, ['prep']]],
    '01:15'],
   [['prep', '20:10'], ['marinate', '20:15'], ['roast', '20:45'], ['sauce', '00:45']]],
  ['repair check: earliest dependent start',
   [[['roast', 45, ['prep', 'marinate']], ['marinate', 15, []], ['sauce', 10, ['marinate', 'roast']],
     ['prep', 5, []]],
    '01:15'],
   [['marinate', '00:05'], ['prep', '00:15'], ['roast', '00:20'], ['sauce', '01:05']]],
  ['generated control 1',
   [[['sauce', 15, ['marinate', 'roast']], ['prep', 45, ['plate']], ['rest', 240, ['marinate']],
     ['marinate', 45, ['shop']], ['plate', 240, ['prep', 'roast']], ['roast', 30, []]],
    '01:15'],
   'error: unknown step shop'],
  ['generated control 2',
   [[['marinate', 45, ['prep']], ['sauce', 45, ['marinate']], ['prep', 90, []], ['roast', 90, ['prep']]],
    '01:15'],
   [['prep', '22:15'], ['marinate', '23:45'], ['roast', '23:45'], ['sauce', '00:30']]],
  ['generated control 3',
   [[['rest', 90, ['roast']], ['sauce', 45, ['prep', 'marinate', 'shop']], ['roast', 45, []],
     ['prep', 240, ['rest']], ['marinate', 90, ['prep']]],
    '18:30'],
   'error: unknown step shop']],
 [['overnight marinade', [[['marinate', 480, []], ['grill', 20, ['marinate']]], '12:00'],
   [['marinate', '03:40'], ['grill', '11:40']]],
  ['cycle', [[['a', 5, ['b']], ['b', 5, ['a']]], '18:00'], 'error: cycle'],
  ['unknown dependency', [[['a', 5, ['shop']]], '18:00'], 'error: unknown step shop'],
  ['regression: earliest dependent start',
   [[['sauce', 30, []], ['marinate', 10, ['prep']], ['roast', 15, ['prep']], ['prep', 45, []]], '02:00'],
   [['prep', '01:00'], ['sauce', '01:30'], ['roast', '01:45'], ['marinate', '01:50']]],
  ['repair check: earliest dependent start',
   [[['roast', 90, ['prep']], ['marinate', 5, ['prep']], ['prep', 240, []]], '18:30'],
   [['prep', '13:00'], ['roast', '17:00'], ['marinate', '18:25']]],
  ['generated control 1',
   [[['prep', 15, []], ['roast', 45, ['marinate']], ['marinate', 90, ['prep']]], '12:00'],
   [['prep', '09:30'], ['marinate', '09:45'], ['roast', '11:15']]],
  ['generated control 2',
   [[['prep', 240, []], ['marinate', 10, []], ['sauce', 90, ['prep', 'roast']],
     ['roast', 5, ['prep', 'marinate']]],
    '19:45'],
   [['prep', '14:10'], ['marinate', '18:00'], ['roast', '18:10'], ['sauce', '18:15']]],
  ['generated control 3',
   [[['prep', 15, []], ['roast', 5, ['prep']], ['plate', 90, ['prep', 'roast', 'rest']],
     ['rest', 10, ['prep', 'sauce']], ['sauce', 90, ['marinate']], ['marinate', 10, []]],
    '18:30'],
   [['marinate', '15:10'], ['sauce', '15:20'], ['prep', '16:35'], ['rest', '16:50'], ['roast', '16:55'],
    ['plate', '17:00']]]],
 [['cycle', [[['a', 5, ['b']], ['b', 5, ['a']]], '18:00'], 'error: cycle'],
  ['unknown dependency', [[['a', 5, ['shop']]], '18:00'], 'error: unknown step shop'],
  ['chain', [[['prep', 10, []], ['roast', 90, ['prep']], ['rest', 15, ['roast']]], '18:30'],
   [['prep', '16:35'], ['roast', '16:45'], ['rest', '18:15']]],
  ['regression: earliest dependent start',
   [[['sauce', 15, ['roast']], ['prep', 30, []], ['marinate', 15, ['prep']], ['roast', 15, []],
     ['rest', 10, ['prep', 'marinate', 'roast', 'sauce']]],
    '19:45'],
   [['prep', '18:50'], ['roast', '19:05'], ['marinate', '19:20'], ['sauce', '19:20'], ['rest', '19:35']]],
  ['repair check: earliest dependent start',
   [[['roast', 10, []], ['prep', 5, []], ['plate', 90, ['prep', 'marinate', 'roast']],
     ['sauce', 5, ['roast']], ['rest', 5, []], ['marinate', 90, []]],
    '00:30'],
   [['marinate', '21:30'], ['roast', '22:50'], ['prep', '22:55'], ['plate', '23:00'], ['rest', '00:25'],
    ['sauce', '00:25']]],
  ['generated control 1',
   [[['rest', 90, ['marinate', 'sauce']], ['roast', 15, ['marinate']], ['marinate', 240, []],
     ['sauce', 240, ['prep', 'marinate', 'roast', 'shop']], ['prep', 10, ['shop']],
     ['plate', 30, ['marinate', 'rest']]],
    '18:30'],
   'error: unknown step shop'],
  ['generated control 2',
   [[['roast', 240, []], ['prep', 240, []], ['sauce', 45, ['roast']], ['marinate', 5, ['prep']]], '02:00'],
   [['roast', '21:15'], ['prep', '21:55'], ['sauce', '01:15'], ['marinate', '01:55']]],
  ['generated control 3',
   [[['marinate', 240, ['prep']], ['sauce', 5, ['roast']], ['roast', 90, ['shop']], ['plate', 30, ['shop']],
     ['prep', 10, []], ['rest', 5, ['prep', 'roast']]],
    '19:45'],
   'error: unknown step shop']],
 [['unknown dependency', [[['a', 5, ['shop']]], '18:00'], 'error: unknown step shop'],
  ['chain', [[['prep', 10, []], ['roast', 90, ['prep']], ['rest', 15, ['roast']]], '18:30'],
   [['prep', '16:35'], ['roast', '16:45'], ['rest', '18:15']]],
  ['overnight marinade', [[['marinate', 480, []], ['grill', 20, ['marinate']]], '12:00'],
   [['marinate', '03:40'], ['grill', '11:40']]],
  ['regression: earliest dependent start',
   [[['marinate', 30, []], ['prep', 5, ['roast']], ['roast', 45, ['marinate']]], '01:15'],
   [['marinate', '23:55'], ['roast', '00:25'], ['prep', '01:10']]],
  ['repair check: earliest dependent start',
   [[['prep', 90, []], ['roast', 15, ['marinate']], ['marinate', 30, []], ['sauce', 45, ['prep', 'marinate']],
     ['plate', 90, ['sauce']], ['rest', 240, ['prep', 'sauce']]],
    '01:15'],
   [['prep', '19:00'], ['marinate', '20:00'], ['sauce', '20:30'], ['rest', '21:15'], ['plate', '23:45'],
    ['roast', '01:00']]],
  ['generated control 1', [[['prep', 5, []], ['roast', 15, []], ['marinate', 15, []]], '00:30'],
   [['marinate', '00:15'], ['roast', '00:15'], ['prep', '00:25']]],
  ['generated control 2',
   [[['prep', 15, []], ['roast', 45, ['marinate']], ['marinate', 90, ['prep']]], '19:45'],
   [['prep', '17:15'], ['marinate', '17:30'], ['roast', '19:00']]],
  ['generated control 3',
   [[['prep', 45, []], ['marinate', 45, ['prep']], ['sauce', 10, ['roast']], ['roast', 45, []]], '02:00'],
   [['prep', '00:30'], ['roast', '01:05'], ['marinate', '01:15'], ['sauce', '01:50']]]],
 [['chain', [[['prep', 10, []], ['roast', 90, ['prep']], ['rest', 15, ['roast']]], '18:30'],
   [['prep', '16:35'], ['roast', '16:45'], ['rest', '18:15']]],
  ['overnight marinade', [[['marinate', 480, []], ['grill', 20, ['marinate']]], '12:00'],
   [['marinate', '03:40'], ['grill', '11:40']]],
  ['cycle', [[['a', 5, ['b']], ['b', 5, ['a']]], '18:00'], 'error: cycle'],
  ['regression: earliest dependent start',
   [[['plate', 45, ['marinate', 'roast', 'sauce', 'rest']], ['sauce', 15, ['prep', 'marinate']],
     ['marinate', 45, []], ['roast', 15, []], ['prep', 30, []],
     ['rest', 15, ['marinate', 'roast', 'sauce']]],
    '19:45'],
   [['marinate', '17:45'], ['prep', '18:00'], ['roast', '18:30'], ['sauce', '18:30'], ['rest', '18:45'],
    ['plate', '19:00']]],
  ['repair check: earliest dependent start',
   [[['prep', 10, []], ['roast', 240, []], ['marinate', 240, []], ['sauce', 5, ['prep']],
     ['plate', 10, ['prep', 'marinate', 'roast', 'rest']],
     ['rest', 90, ['prep', 'marinate', 'roast', 'sauce']]],
    '18:30'],
   [['marinate', '12:50'], ['roast', '12:50'], ['prep', '16:35'], ['sauce', '16:45'], ['rest', '16:50'],
    ['plate', '18:20']]],
  ['generated control 1',
   [[['sauce', 240, []], ['marinate', 15, ['prep']], ['roast', 240, ['prep']], ['prep', 240, []]], '02:00'],
   [['prep', '18:00'], ['roast', '22:00'], ['sauce', '22:00'], ['marinate', '01:45']]],
  ['generated control 2',
   [[['sauce', 45, []], ['roast', 240, ['marinate']], ['marinate', 45, []], ['prep', 15, []],
     ['rest', 90, ['marinate', 'roast', 'sauce']]],
    '18:30'],
   [['marinate', '12:15'], ['roast', '13:00'], ['sauce', '16:15'], ['rest', '17:00'], ['prep', '18:15']]],
  ['generated control 3', [[['marinate', 45, []], ['roast', 240, ['marinate']], ['prep', 45, []]], '01:15'],
   [['marinate', '20:30'], ['roast', '21:15'], ['prep', '00:30']]]]]
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
chain[['prep', '16:35'], ['roast', '16:45'], ['rest', '18:15']][['prep', '16:35'], ['roast', '16:45'], ['rest', '18:15']]Passed
overnight marinade[['marinate', '03:40'], ['grill', '11:40']][['marinate', '03:40'], ['grill', '11:40']]Passed
cycleerror: cycleerror: cyclePassed
regression: earliest dependent start[['prep', '20:10'], ['marinate', '20:15'], ['roast', '20:45'], ['sauce', '00:45']][['prep', '20:10'], ['marinate', '20:15'], ['roast', '20:45'], ['sauce', '00:45']]Passed
repair check: earliest dependent start[['prep', '00:15'], ['roast', '00:20'], ['marinate', '00:50'], ['sauce', '01:05']][['marinate', '00:05'], ['prep', '00:15'], ['roast', '00:20'], ['sauce', '01:05']]Failed
generated control 1error: unknown step shoperror: unknown step shopPassed
generated control 2[['prep', '22:15'], ['marinate', '23:45'], ['roast', '23:45'], ['sauce', '00:30']][['prep', '22:15'], ['marinate', '23:45'], ['roast', '23:45'], ['sauce', '00:30']]Passed
generated control 3error: unknown step shoperror: unknown step shopPassed

SHA-256 / bfd89d14121b7a981fa4176c60aceb05c1a06a8172e46ee5e6468ca51a126bcb

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 8 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.

Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.

Member access is invitation-based. Sign in with your invited account to inspect the repair.

Sign in to the archive ↗

Verification & scope

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.

Observations recorded using Python 3.12.14 at 2026-09-29T14:52:30.770445+00:00.

Case digest / 7d28ccd4e5c06e300f1daa380d808653fffcd4fe4d7341cbef45848ac72ed406