FA-97306 / Recipe scaling and nutrition / Open access
Backward recipe step scheduler: chronological ordering · case 01
The previous-evening marinade is listed after the morning steps.
ROOT CAUSE
Rows are sorted by the wrapped clock string instead of absolute start.
THE FAILURE
Rows are sorted by the wrapped clock string instead of absolute start.
Unsuccessful approach: Sorting by name ignores chronology entirely.
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 = min(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(key=lambda x: ('%02d:%02d' % divmod(x[0] % 1440, 60), x[1]))
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: chronological ordering',
[[['plate', 15, ['rest']], ['rest', 45, ['prep', 'marinate']], ['roast', 240, []],
['sauce', 240, ['prep', 'roast']], ['marinate', 45, ['prep']], ['prep', 240, []]],
'00:30'],
[['prep', '16:30'], ['roast', '16:30'], ['sauce', '20:30'], ['marinate', '22:45'], ['rest', '23:30'],
['plate', '00:15']]],
['repair check: chronological ordering',
[[['sauce', 15, []], ['prep', 45, []], ['marinate', 240, ['prep']], ['roast', 15, []],
['rest', 5, ['prep', 'marinate', 'roast']]],
'12:00'],
[['prep', '07:10'], ['marinate', '07:55'], ['roast', '11:40'], ['sauce', '11:45'], ['rest', '11:55']]],
['generated control 1',
[[['roast', 45, []], ['sauce', 15, ['roast']], ['prep', 5, []], ['marinate', 5, ['prep']]], '19:45'],
[['roast', '18:45'], ['sauce', '19:30'], ['prep', '19:35'], ['marinate', '19:40']]],
['generated control 2',
[[['sauce', 45, ['prep', 'marinate']], ['rest', 45, ['marinate', 'roast']], ['roast', 240, []],
['marinate', 240, ['prep']], ['prep', 90, []]],
'00:30'],
[['prep', '18:15'], ['marinate', '19:45'], ['roast', '19:45'], ['rest', '23:45'], ['sauce', '23:45']]],
['generated control 3', [[['marinate', 45, ['prep']], ['prep', 90, []], ['roast', 240, []]], '00:30'],
[['roast', '20:30'], ['prep', '22:15'], ['marinate', '23:45']]]],
[['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: chronological ordering',
[[['roast', 10, ['marinate']], ['marinate', 45, ['prep']], ['prep', 10, []], ['sauce', 5, ['roast']]],
'00:30'],
[['prep', '23:20'], ['marinate', '23:30'], ['roast', '00:15'], ['sauce', '00:25']]],
['repair check: chronological ordering',
[[['marinate', 240, []], ['roast', 30, ['prep']], ['prep', 240, []]], '00:30'],
[['prep', '20:00'], ['marinate', '20:30'], ['roast', '00:00']]],
['generated control 1',
[[['roast', 90, ['prep', 'marinate']], ['rest', 45, ['prep', 'roast']], ['marinate', 15, []],
['sauce', 15, []], ['prep', 240, ['shop', 'rest']]],
'12:00'],
'error: unknown step shop'],
['generated control 2', [[['roast', 10, []], ['prep', 10, []], ['marinate', 15, ['shop']]], '12:00'],
'error: unknown step shop'],
['generated control 3',
[[['marinate', 30, []], ['roast', 15, ['prep', 'marinate']], ['rest', 240, []],
['plate', 5, ['prep', 'marinate', 'roast', 'rest']], ['sauce', 5, ['prep', 'marinate']],
['prep', 45, ['shop']]],
'02:00'],
'error: unknown step shop']],
[['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: chronological ordering',
[[['plate', 30, ['prep', 'marinate', 'roast']], ['sauce', 45, ['roast']], ['marinate', 240, ['prep']],
['prep', 240, []], ['rest', 15, ['prep', 'roast']], ['roast', 5, []]],
'00:30'],
[['prep', '16:00'], ['marinate', '20:00'], ['roast', '23:40'], ['sauce', '23:45'], ['plate', '00:00'],
['rest', '00:15']]],
['repair check: chronological ordering',
[[['rest', 240, ['roast', 'sauce']], ['marinate', 240, []], ['roast', 15, ['prep']], ['prep', 5, []],
['sauce', 30, ['prep']]],
'12:00'],
[['prep', '07:25'], ['sauce', '07:30'], ['roast', '07:45'], ['marinate', '08:00'], ['rest', '08:00']]],
['generated control 1',
[[['sauce', 30, ['roast']], ['roast', 15, ['shop']], ['marinate', 10, ['prep']], ['prep', 30, []]],
'19:45'],
'error: unknown step shop'],
['generated control 2', [[['marinate', 5, []], ['roast', 15, ['prep']], ['prep', 240, ['roast']]], '01:15'],
'error: cycle'],
['generated control 3',
[[['prep', 30, ['shop']], ['marinate', 5, []], ['rest', 45, []], ['roast', 90, []],
['plate', 240, ['marinate', 'roast', 'rest']], ['sauce', 90, []]],
'18:30'],
'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: chronological ordering',
[[['roast', 45, ['prep', 'marinate']], ['prep', 240, []], ['marinate', 30, ['prep']], ['sauce', 90, []]],
'01:15'],
[['prep', '20:00'], ['sauce', '23:45'], ['marinate', '00:00'], ['roast', '00:30']]],
['repair check: chronological ordering',
[[['marinate', 15, ['prep']], ['prep', 90, []], ['sauce', 45, ['marinate']],
['roast', 240, ['prep', 'marinate']], ['plate', 15, ['roast', 'sauce', 'rest']],
['rest', 15, ['prep', 'marinate', 'sauce']]],
'19:45'],
[['prep', '13:45'], ['marinate', '15:15'], ['roast', '15:30'], ['sauce', '18:30'], ['rest', '19:15'],
['plate', '19:30']]],
['generated control 1',
[[['roast', 240, ['prep', 'marinate']], ['sauce', 10, ['prep']], ['marinate', 30, []], ['prep', 15, []]],
'00:30'],
[['marinate', '20:00'], ['prep', '20:15'], ['roast', '20:30'], ['sauce', '00:20']]],
['generated control 2', [[['roast', 240, ['prep']], ['marinate', 15, []], ['prep', 30, []]], '19:45'],
[['prep', '15:15'], ['roast', '15:45'], ['marinate', '19:30']]],
['generated control 3',
[[['rest', 10, ['prep', 'roast', 'sauce']], ['marinate', 5, []], ['prep', 45, []],
['sauce', 90, ['prep', 'roast']], ['plate', 30, ['prep', 'rest', 'shop']], ['roast', 10, ['marinate']]],
'00:30'],
'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']]],
['cycle', [[['a', 5, ['b']], ['b', 5, ['a']]], '18:00'], 'error: cycle'],
['regression: chronological ordering',
[[['marinate', 45, ['prep']], ['rest', 45, ['sauce']], ['sauce', 90, ['marinate', 'roast']],
['prep', 90, []], ['roast', 90, ['prep']]],
'02:00'],
[['prep', '20:45'], ['roast', '22:15'], ['marinate', '23:00'], ['sauce', '23:45'], ['rest', '01:15']]],
['repair check: chronological ordering',
[[['roast', 10, ['prep']], ['prep', 240, []], ['marinate', 10, []], ['sauce', 240, ['marinate']]],
'18:30'],
[['marinate', '14:20'], ['prep', '14:20'], ['sauce', '14:30'], ['roast', '18:20']]],
['generated control 1', [[['roast', 10, ['prep']], ['prep', 30, []], ['marinate', 15, []]], '18:30'],
[['prep', '17:50'], ['marinate', '18:15'], ['roast', '18:20']]],
['generated control 2',
[[['prep', 90, ['plate']], ['plate', 45, ['marinate']], ['rest', 90, ['prep', 'roast', 'sauce', 'shop']],
['sauce', 240, ['prep']], ['roast', 90, ['marinate']], ['marinate', 5, []]],
'12:00'],
'error: unknown step shop'],
['generated control 3',
[[['marinate', 10, []], ['sauce', 5, []], ['prep', 10, []], ['roast', 45, ['prep']],
['plate', 30, ['sauce', 'rest']], ['rest', 15, ['prep', 'shop']]],
'01:15'],
'error: unknown step shop']]]
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| 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 |
| cycle | error: cycle | error: cycle | Passed |
| regression: chronological ordering | [['plate', '00:15'], ['prep', '16:30'], ['roast', '16:30'], ['sauce', '20:30'], ['marinate', '22:45'], ['rest', '23:30']] | [['prep', '16:30'], ['roast', '16:30'], ['sauce', '20:30'], ['marinate', '22:45'], ['rest', '23:30'], ['plate', '00:15']] | Failed |
| repair check: chronological ordering | [['prep', '07:10'], ['marinate', '07:55'], ['roast', '11:40'], ['sauce', '11:45'], ['rest', '11:55']] | [['prep', '07:10'], ['marinate', '07:55'], ['roast', '11:40'], ['sauce', '11:45'], ['rest', '11:55']] | Passed |
| generated control 1 | [['roast', '18:45'], ['sauce', '19:30'], ['prep', '19:35'], ['marinate', '19:40']] | [['roast', '18:45'], ['sauce', '19:30'], ['prep', '19:35'], ['marinate', '19:40']] | Passed |
| generated control 2 | [['prep', '18:15'], ['marinate', '19:45'], ['roast', '19:45'], ['rest', '23:45'], ['sauce', '23:45']] | [['prep', '18:15'], ['marinate', '19:45'], ['roast', '19:45'], ['rest', '23:45'], ['sauce', '23:45']] | Passed |
| generated control 3 | [['roast', '20:30'], ['prep', '22:15'], ['marinate', '23:45']] | [['roast', '20:30'], ['prep', '22:15'], ['marinate', '23:45']] | Passed |
SHA-256 / 9b16a3589dbca77b6a30ca02d8a7a2b4565fe2d1c095af5e7a88e89bf5b59dfa
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 = min(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(key=lambda x: x[1])
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: chronological ordering',
[[['plate', 15, ['rest']], ['rest', 45, ['prep', 'marinate']], ['roast', 240, []],
['sauce', 240, ['prep', 'roast']], ['marinate', 45, ['prep']], ['prep', 240, []]],
'00:30'],
[['prep', '16:30'], ['roast', '16:30'], ['sauce', '20:30'], ['marinate', '22:45'], ['rest', '23:30'],
['plate', '00:15']]],
['repair check: chronological ordering',
[[['sauce', 15, []], ['prep', 45, []], ['marinate', 240, ['prep']], ['roast', 15, []],
['rest', 5, ['prep', 'marinate', 'roast']]],
'12:00'],
[['prep', '07:10'], ['marinate', '07:55'], ['roast', '11:40'], ['sauce', '11:45'], ['rest', '11:55']]],
['generated control 1',
[[['roast', 45, []], ['sauce', 15, ['roast']], ['prep', 5, []], ['marinate', 5, ['prep']]], '19:45'],
[['roast', '18:45'], ['sauce', '19:30'], ['prep', '19:35'], ['marinate', '19:40']]],
['generated control 2',
[[['sauce', 45, ['prep', 'marinate']], ['rest', 45, ['marinate', 'roast']], ['roast', 240, []],
['marinate', 240, ['prep']], ['prep', 90, []]],
'00:30'],
[['prep', '18:15'], ['marinate', '19:45'], ['roast', '19:45'], ['rest', '23:45'], ['sauce', '23:45']]],
['generated control 3', [[['marinate', 45, ['prep']], ['prep', 90, []], ['roast', 240, []]], '00:30'],
[['roast', '20:30'], ['prep', '22:15'], ['marinate', '23:45']]]],
[['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: chronological ordering',
[[['roast', 10, ['marinate']], ['marinate', 45, ['prep']], ['prep', 10, []], ['sauce', 5, ['roast']]],
'00:30'],
[['prep', '23:20'], ['marinate', '23:30'], ['roast', '00:15'], ['sauce', '00:25']]],
['repair check: chronological ordering',
[[['marinate', 240, []], ['roast', 30, ['prep']], ['prep', 240, []]], '00:30'],
[['prep', '20:00'], ['marinate', '20:30'], ['roast', '00:00']]],
['generated control 1',
[[['roast', 90, ['prep', 'marinate']], ['rest', 45, ['prep', 'roast']], ['marinate', 15, []],
['sauce', 15, []], ['prep', 240, ['shop', 'rest']]],
'12:00'],
'error: unknown step shop'],
['generated control 2', [[['roast', 10, []], ['prep', 10, []], ['marinate', 15, ['shop']]], '12:00'],
'error: unknown step shop'],
['generated control 3',
[[['marinate', 30, []], ['roast', 15, ['prep', 'marinate']], ['rest', 240, []],
['plate', 5, ['prep', 'marinate', 'roast', 'rest']], ['sauce', 5, ['prep', 'marinate']],
['prep', 45, ['shop']]],
'02:00'],
'error: unknown step shop']],
[['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: chronological ordering',
[[['plate', 30, ['prep', 'marinate', 'roast']], ['sauce', 45, ['roast']], ['marinate', 240, ['prep']],
['prep', 240, []], ['rest', 15, ['prep', 'roast']], ['roast', 5, []]],
'00:30'],
[['prep', '16:00'], ['marinate', '20:00'], ['roast', '23:40'], ['sauce', '23:45'], ['plate', '00:00'],
['rest', '00:15']]],
['repair check: chronological ordering',
[[['rest', 240, ['roast', 'sauce']], ['marinate', 240, []], ['roast', 15, ['prep']], ['prep', 5, []],
['sauce', 30, ['prep']]],
'12:00'],
[['prep', '07:25'], ['sauce', '07:30'], ['roast', '07:45'], ['marinate', '08:00'], ['rest', '08:00']]],
['generated control 1',
[[['sauce', 30, ['roast']], ['roast', 15, ['shop']], ['marinate', 10, ['prep']], ['prep', 30, []]],
'19:45'],
'error: unknown step shop'],
['generated control 2', [[['marinate', 5, []], ['roast', 15, ['prep']], ['prep', 240, ['roast']]], '01:15'],
'error: cycle'],
['generated control 3',
[[['prep', 30, ['shop']], ['marinate', 5, []], ['rest', 45, []], ['roast', 90, []],
['plate', 240, ['marinate', 'roast', 'rest']], ['sauce', 90, []]],
'18:30'],
'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: chronological ordering',
[[['roast', 45, ['prep', 'marinate']], ['prep', 240, []], ['marinate', 30, ['prep']], ['sauce', 90, []]],
'01:15'],
[['prep', '20:00'], ['sauce', '23:45'], ['marinate', '00:00'], ['roast', '00:30']]],
['repair check: chronological ordering',
[[['marinate', 15, ['prep']], ['prep', 90, []], ['sauce', 45, ['marinate']],
['roast', 240, ['prep', 'marinate']], ['plate', 15, ['roast', 'sauce', 'rest']],
['rest', 15, ['prep', 'marinate', 'sauce']]],
'19:45'],
[['prep', '13:45'], ['marinate', '15:15'], ['roast', '15:30'], ['sauce', '18:30'], ['rest', '19:15'],
['plate', '19:30']]],
['generated control 1',
[[['roast', 240, ['prep', 'marinate']], ['sauce', 10, ['prep']], ['marinate', 30, []], ['prep', 15, []]],
'00:30'],
[['marinate', '20:00'], ['prep', '20:15'], ['roast', '20:30'], ['sauce', '00:20']]],
['generated control 2', [[['roast', 240, ['prep']], ['marinate', 15, []], ['prep', 30, []]], '19:45'],
[['prep', '15:15'], ['roast', '15:45'], ['marinate', '19:30']]],
['generated control 3',
[[['rest', 10, ['prep', 'roast', 'sauce']], ['marinate', 5, []], ['prep', 45, []],
['sauce', 90, ['prep', 'roast']], ['plate', 30, ['prep', 'rest', 'shop']], ['roast', 10, ['marinate']]],
'00:30'],
'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']]],
['cycle', [[['a', 5, ['b']], ['b', 5, ['a']]], '18:00'], 'error: cycle'],
['regression: chronological ordering',
[[['marinate', 45, ['prep']], ['rest', 45, ['sauce']], ['sauce', 90, ['marinate', 'roast']],
['prep', 90, []], ['roast', 90, ['prep']]],
'02:00'],
[['prep', '20:45'], ['roast', '22:15'], ['marinate', '23:00'], ['sauce', '23:45'], ['rest', '01:15']]],
['repair check: chronological ordering',
[[['roast', 10, ['prep']], ['prep', 240, []], ['marinate', 10, []], ['sauce', 240, ['marinate']]],
'18:30'],
[['marinate', '14:20'], ['prep', '14:20'], ['sauce', '14:30'], ['roast', '18:20']]],
['generated control 1', [[['roast', 10, ['prep']], ['prep', 30, []], ['marinate', 15, []]], '18:30'],
[['prep', '17:50'], ['marinate', '18:15'], ['roast', '18:20']]],
['generated control 2',
[[['prep', 90, ['plate']], ['plate', 45, ['marinate']], ['rest', 90, ['prep', 'roast', 'sauce', 'shop']],
['sauce', 240, ['prep']], ['roast', 90, ['marinate']], ['marinate', 5, []]],
'12:00'],
'error: unknown step shop'],
['generated control 3',
[[['marinate', 10, []], ['sauce', 5, []], ['prep', 10, []], ['roast', 45, ['prep']],
['plate', 30, ['sauce', 'rest']], ['rest', 15, ['prep', 'shop']]],
'01:15'],
'error: unknown step shop']]]
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| chain | [['prep', '16:35'], ['rest', '18:15'], ['roast', '16:45']] | [['prep', '16:35'], ['roast', '16:45'], ['rest', '18:15']] | Failed |
| overnight marinade | [['grill', '11:40'], ['marinate', '03:40']] | [['marinate', '03:40'], ['grill', '11:40']] | Failed |
| cycle | error: cycle | error: cycle | Passed |
| regression: chronological ordering | [['marinate', '22:45'], ['plate', '00:15'], ['prep', '16:30'], ['rest', '23:30'], ['roast', '16:30'], ['sauce', '20:30']] | [['prep', '16:30'], ['roast', '16:30'], ['sauce', '20:30'], ['marinate', '22:45'], ['rest', '23:30'], ['plate', '00:15']] | Failed |
| repair check: chronological ordering | [['marinate', '07:55'], ['prep', '07:10'], ['rest', '11:55'], ['roast', '11:40'], ['sauce', '11:45']] | [['prep', '07:10'], ['marinate', '07:55'], ['roast', '11:40'], ['sauce', '11:45'], ['rest', '11:55']] | Failed |
| generated control 1 | [['marinate', '19:40'], ['prep', '19:35'], ['roast', '18:45'], ['sauce', '19:30']] | [['roast', '18:45'], ['sauce', '19:30'], ['prep', '19:35'], ['marinate', '19:40']] | Failed |
| generated control 2 | [['marinate', '19:45'], ['prep', '18:15'], ['rest', '23:45'], ['roast', '19:45'], ['sauce', '23:45']] | [['prep', '18:15'], ['marinate', '19:45'], ['roast', '19:45'], ['rest', '23:45'], ['sauce', '23:45']] | Failed |
| generated control 3 | [['marinate', '23:45'], ['prep', '22:15'], ['roast', '20:30']] | [['roast', '20:30'], ['prep', '22:15'], ['marinate', '23:45']] | Failed |
SHA-256 / f83f35fccb5acc5b5fdd6fa8af26b688cba3bf645f1932c27b086d0744bdca89
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.950423+00:00.
Case digest / bc3cf66b82ea398e113ec33c5658f18607b343617c500f4224e3cbbf9d56e318