FA-97056 / Recipe scaling and nutrition / Open access
Baking pan substitution: overflow warning threshold · case 01
Batter 80% deeper gives no overflow warning.
ROOT CAUSE
The warning waits for double depth instead of 1.5 times.
VERIFIED REPAIR
Warn when the depth ratio exceeds 1.5.
Unsuccessful approach: Using >= warns at exactly 1.5, which the contract allows.
Case contract
Pans: ["round", diameter], ["square", side], ["rect", w, l] in inches; other -> "error: pan". If scale_to_fill, return factor round(area_new/area_old, 2), same minutes, warning None. Otherwise the same batter goes into the new pan: depth ratio = area_old/area_new, minutes = bake_min*(1+(ratio-1)/2) rounded half-up to a multiple of 5, factor 1.0, warning "overflow risk" when ratio > 1.5 else None.
Why this case matters
Bakers swap pan shapes and must scale the batter or adjust bake time for batter depth.
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(old_pan, new_pan, bake_min, scale_to_fill):
def area(p):
if p[0] == 'round':
return math.pi * (p[1] / 2) ** 2
if p[0] == 'square':
return p[1] * p[1]
if p[0] == 'rect':
return p[1] * p[2]
return None
a0, a1 = area(old_pan), area(new_pan)
if not a0 or not a1:
return 'error: pan'
if scale_to_fill:
return {'factor': round(a1 / a0, 2), 'minutes': bake_min, 'warning': None}
depth = a0 / a1
minutes = 5 * math.floor(bake_min * (1 + (depth - 1) / 2) / 5 + 0.5)
return {'factor': 1.0, 'minutes': minutes, 'warning': 'overflow risk' if depth > 2 else None}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['same pan', [['square', 8], ['square', 8], 30, False], {'factor': 1.0, 'minutes': 30, 'warning': None}],
['ratio exactly 1.5', [['square', 12], ['rect', 8, 12], 30, False],
{'factor': 1.0, 'minutes': 40, 'warning': None}],
['round to square fill', [['round', 9], ['square', 9], 30, True],
{'factor': 1.27, 'minutes': 30, 'warning': None}],
['regression: overflow warning threshold', [['rect', 8, 12], ['round', 9], 20, False],
{'factor': 1.0, 'minutes': 25, 'warning': 'overflow risk'}],
['repair check: overflow warning threshold', [['rect', 8, 12], ['square', 8], 45, False],
{'factor': 1.0, 'minutes': 55, 'warning': None}],
['generated control 1', [['rect', 9, 12], ['round', 6], 45, True],
{'factor': 0.26, 'minutes': 45, 'warning': None}],
['generated control 2', [['square', 6], ['round', 12], 45, True],
{'factor': 3.14, 'minutes': 45, 'warning': None}],
['generated control 3', [['square', 6], ['square', 9], 30, False],
{'factor': 1.0, 'minutes': 20, 'warning': None}]],
[['ratio exactly 1.5', [['square', 12], ['rect', 8, 12], 30, False],
{'factor': 1.0, 'minutes': 40, 'warning': None}],
['round to square fill', [['round', 9], ['square', 9], 30, True],
{'factor': 1.27, 'minutes': 30, 'warning': None}],
['bad pan', [['bundt', 10], ['square', 8], 30, True], 'error: pan'],
['regression: overflow warning threshold', [['rect', 8, 15], ['round', 10], 30, False],
{'factor': 1.0, 'minutes': 40, 'warning': 'overflow risk'}],
['repair check: overflow warning threshold', [['square', 12], ['rect', 8, 12], 25, False],
{'factor': 1.0, 'minutes': 30, 'warning': None}],
['generated control 1', [['round', 12], ['rect', 9, 12], 30, True],
{'factor': 0.95, 'minutes': 30, 'warning': None}],
['generated control 2', [['square', 6], ['round', 9], 45, False],
{'factor': 1.0, 'minutes': 35, 'warning': None}],
['generated control 3', [['square', 12], ['square', 8], 30, True],
{'factor': 0.44, 'minutes': 30, 'warning': None}]],
[['round to square fill', [['round', 9], ['square', 9], 30, True],
{'factor': 1.27, 'minutes': 30, 'warning': None}],
['bad pan', [['bundt', 10], ['square', 8], 30, True], 'error: pan'],
['same pan', [['square', 8], ['square', 8], 30, False], {'factor': 1.0, 'minutes': 30, 'warning': None}],
['regression: overflow warning threshold', [['rect', 9, 15], ['square', 9], 35, False],
{'factor': 1.0, 'minutes': 45, 'warning': 'overflow risk'}],
['repair check: overflow warning threshold', [['square', 12], ['rect', 8, 12], 30, False],
{'factor': 1.0, 'minutes': 40, 'warning': None}],
['generated control 1', [['square', 12], ['rect', 9, 15], 35, True],
{'factor': 0.94, 'minutes': 35, 'warning': None}],
['generated control 2', [['round', 8], ['round', 9], 45, False],
{'factor': 1.0, 'minutes': 40, 'warning': None}],
['generated control 3', [['round', 9], ['rect', 11, 12], 30, False],
{'factor': 1.0, 'minutes': 20, 'warning': None}]],
[['bad pan', [['bundt', 10], ['square', 8], 30, True], 'error: pan'],
['same pan', [['square', 8], ['square', 8], 30, False], {'factor': 1.0, 'minutes': 30, 'warning': None}],
['ratio exactly 1.5', [['square', 12], ['rect', 8, 12], 30, False],
{'factor': 1.0, 'minutes': 40, 'warning': None}],
['regression: overflow warning threshold', [['rect', 8, 13], ['square', 8], 20, False],
{'factor': 1.0, 'minutes': 25, 'warning': 'overflow risk'}],
['repair check: overflow warning threshold', [['square', 12], ['rect', 8, 12], 20, False],
{'factor': 1.0, 'minutes': 25, 'warning': None}],
['generated control 1', [['rect', 9, 15], ['rect', 8, 15], 30, False],
{'factor': 1.0, 'minutes': 30, 'warning': None}],
['generated control 2', [['rect', 8, 12], ['round', 10], 25, True],
{'factor': 0.82, 'minutes': 25, 'warning': None}],
['generated control 3', [['round', 9], ['round', 9], 45, True],
{'factor': 1.0, 'minutes': 45, 'warning': None}]],
[['same pan', [['square', 8], ['square', 8], 30, False], {'factor': 1.0, 'minutes': 30, 'warning': None}],
['ratio exactly 1.5', [['square', 12], ['rect', 8, 12], 30, False],
{'factor': 1.0, 'minutes': 40, 'warning': None}],
['round to square fill', [['round', 9], ['square', 9], 30, True],
{'factor': 1.27, 'minutes': 30, 'warning': None}],
['regression: overflow warning threshold', [['rect', 9, 13], ['round', 9], 20, False],
{'factor': 1.0, 'minutes': 30, 'warning': 'overflow risk'}],
['repair check: overflow warning threshold', [['square', 12], ['rect', 8, 12], 20, False],
{'factor': 1.0, 'minutes': 25, 'warning': None}],
['generated control 1', [['round', 8], ['rect', 8, 15], 20, False],
{'factor': 1.0, 'minutes': 15, 'warning': None}],
['generated control 2', [['square', 8], ['square', 9], 30, False],
{'factor': 1.0, 'minutes': 25, 'warning': None}],
['generated control 3', [['round', 9], ['rect', 11, 12], 45, False],
{'factor': 1.0, 'minutes': 35, 'warning': None}]]]
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 |
|---|---|---|---|
| same pan | {'factor': 1.0, 'minutes': 30, 'warning': None} | {'factor': 1.0, 'minutes': 30, 'warning': None} | Passed |
| ratio exactly 1.5 | {'factor': 1.0, 'minutes': 40, 'warning': None} | {'factor': 1.0, 'minutes': 40, 'warning': None} | Passed |
| round to square fill | {'factor': 1.27, 'minutes': 30, 'warning': None} | {'factor': 1.27, 'minutes': 30, 'warning': None} | Passed |
| regression: overflow warning threshold | {'factor': 1.0, 'minutes': 25, 'warning': None} | {'factor': 1.0, 'minutes': 25, 'warning': 'overflow risk'} | Failed |
| repair check: overflow warning threshold | {'factor': 1.0, 'minutes': 55, 'warning': None} | {'factor': 1.0, 'minutes': 55, 'warning': None} | Passed |
| generated control 1 | {'factor': 0.26, 'minutes': 45, 'warning': None} | {'factor': 0.26, 'minutes': 45, 'warning': None} | Passed |
| generated control 2 | {'factor': 3.14, 'minutes': 45, 'warning': None} | {'factor': 3.14, 'minutes': 45, 'warning': None} | Passed |
| generated control 3 | {'factor': 1.0, 'minutes': 20, 'warning': None} | {'factor': 1.0, 'minutes': 20, 'warning': None} | Passed |
SHA-256 / d054da50db61be77c1742b7d6d4ccc6f10526b3e296893e9a5b581ab4e023f24
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(old_pan, new_pan, bake_min, scale_to_fill):
def area(p):
if p[0] == 'round':
return math.pi * (p[1] / 2) ** 2
if p[0] == 'square':
return p[1] * p[1]
if p[0] == 'rect':
return p[1] * p[2]
return None
a0, a1 = area(old_pan), area(new_pan)
if not a0 or not a1:
return 'error: pan'
if scale_to_fill:
return {'factor': round(a1 / a0, 2), 'minutes': bake_min, 'warning': None}
depth = a0 / a1
minutes = 5 * math.floor(bake_min * (1 + (depth - 1) / 2) / 5 + 0.5)
return {'factor': 1.0, 'minutes': minutes, 'warning': 'overflow risk' if depth >= 1.5 else None}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['same pan', [['square', 8], ['square', 8], 30, False], {'factor': 1.0, 'minutes': 30, 'warning': None}],
['ratio exactly 1.5', [['square', 12], ['rect', 8, 12], 30, False],
{'factor': 1.0, 'minutes': 40, 'warning': None}],
['round to square fill', [['round', 9], ['square', 9], 30, True],
{'factor': 1.27, 'minutes': 30, 'warning': None}],
['regression: overflow warning threshold', [['rect', 8, 12], ['round', 9], 20, False],
{'factor': 1.0, 'minutes': 25, 'warning': 'overflow risk'}],
['repair check: overflow warning threshold', [['rect', 8, 12], ['square', 8], 45, False],
{'factor': 1.0, 'minutes': 55, 'warning': None}],
['generated control 1', [['rect', 9, 12], ['round', 6], 45, True],
{'factor': 0.26, 'minutes': 45, 'warning': None}],
['generated control 2', [['square', 6], ['round', 12], 45, True],
{'factor': 3.14, 'minutes': 45, 'warning': None}],
['generated control 3', [['square', 6], ['square', 9], 30, False],
{'factor': 1.0, 'minutes': 20, 'warning': None}]],
[['ratio exactly 1.5', [['square', 12], ['rect', 8, 12], 30, False],
{'factor': 1.0, 'minutes': 40, 'warning': None}],
['round to square fill', [['round', 9], ['square', 9], 30, True],
{'factor': 1.27, 'minutes': 30, 'warning': None}],
['bad pan', [['bundt', 10], ['square', 8], 30, True], 'error: pan'],
['regression: overflow warning threshold', [['rect', 8, 15], ['round', 10], 30, False],
{'factor': 1.0, 'minutes': 40, 'warning': 'overflow risk'}],
['repair check: overflow warning threshold', [['square', 12], ['rect', 8, 12], 25, False],
{'factor': 1.0, 'minutes': 30, 'warning': None}],
['generated control 1', [['round', 12], ['rect', 9, 12], 30, True],
{'factor': 0.95, 'minutes': 30, 'warning': None}],
['generated control 2', [['square', 6], ['round', 9], 45, False],
{'factor': 1.0, 'minutes': 35, 'warning': None}],
['generated control 3', [['square', 12], ['square', 8], 30, True],
{'factor': 0.44, 'minutes': 30, 'warning': None}]],
[['round to square fill', [['round', 9], ['square', 9], 30, True],
{'factor': 1.27, 'minutes': 30, 'warning': None}],
['bad pan', [['bundt', 10], ['square', 8], 30, True], 'error: pan'],
['same pan', [['square', 8], ['square', 8], 30, False], {'factor': 1.0, 'minutes': 30, 'warning': None}],
['regression: overflow warning threshold', [['rect', 9, 15], ['square', 9], 35, False],
{'factor': 1.0, 'minutes': 45, 'warning': 'overflow risk'}],
['repair check: overflow warning threshold', [['square', 12], ['rect', 8, 12], 30, False],
{'factor': 1.0, 'minutes': 40, 'warning': None}],
['generated control 1', [['square', 12], ['rect', 9, 15], 35, True],
{'factor': 0.94, 'minutes': 35, 'warning': None}],
['generated control 2', [['round', 8], ['round', 9], 45, False],
{'factor': 1.0, 'minutes': 40, 'warning': None}],
['generated control 3', [['round', 9], ['rect', 11, 12], 30, False],
{'factor': 1.0, 'minutes': 20, 'warning': None}]],
[['bad pan', [['bundt', 10], ['square', 8], 30, True], 'error: pan'],
['same pan', [['square', 8], ['square', 8], 30, False], {'factor': 1.0, 'minutes': 30, 'warning': None}],
['ratio exactly 1.5', [['square', 12], ['rect', 8, 12], 30, False],
{'factor': 1.0, 'minutes': 40, 'warning': None}],
['regression: overflow warning threshold', [['rect', 8, 13], ['square', 8], 20, False],
{'factor': 1.0, 'minutes': 25, 'warning': 'overflow risk'}],
['repair check: overflow warning threshold', [['square', 12], ['rect', 8, 12], 20, False],
{'factor': 1.0, 'minutes': 25, 'warning': None}],
['generated control 1', [['rect', 9, 15], ['rect', 8, 15], 30, False],
{'factor': 1.0, 'minutes': 30, 'warning': None}],
['generated control 2', [['rect', 8, 12], ['round', 10], 25, True],
{'factor': 0.82, 'minutes': 25, 'warning': None}],
['generated control 3', [['round', 9], ['round', 9], 45, True],
{'factor': 1.0, 'minutes': 45, 'warning': None}]],
[['same pan', [['square', 8], ['square', 8], 30, False], {'factor': 1.0, 'minutes': 30, 'warning': None}],
['ratio exactly 1.5', [['square', 12], ['rect', 8, 12], 30, False],
{'factor': 1.0, 'minutes': 40, 'warning': None}],
['round to square fill', [['round', 9], ['square', 9], 30, True],
{'factor': 1.27, 'minutes': 30, 'warning': None}],
['regression: overflow warning threshold', [['rect', 9, 13], ['round', 9], 20, False],
{'factor': 1.0, 'minutes': 30, 'warning': 'overflow risk'}],
['repair check: overflow warning threshold', [['square', 12], ['rect', 8, 12], 20, False],
{'factor': 1.0, 'minutes': 25, 'warning': None}],
['generated control 1', [['round', 8], ['rect', 8, 15], 20, False],
{'factor': 1.0, 'minutes': 15, 'warning': None}],
['generated control 2', [['square', 8], ['square', 9], 30, False],
{'factor': 1.0, 'minutes': 25, 'warning': None}],
['generated control 3', [['round', 9], ['rect', 11, 12], 45, False],
{'factor': 1.0, 'minutes': 35, 'warning': None}]]]
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 |
|---|---|---|---|
| same pan | {'factor': 1.0, 'minutes': 30, 'warning': None} | {'factor': 1.0, 'minutes': 30, 'warning': None} | Passed |
| ratio exactly 1.5 | {'factor': 1.0, 'minutes': 40, 'warning': 'overflow risk'} | {'factor': 1.0, 'minutes': 40, 'warning': None} | Failed |
| round to square fill | {'factor': 1.27, 'minutes': 30, 'warning': None} | {'factor': 1.27, 'minutes': 30, 'warning': None} | Passed |
| regression: overflow warning threshold | {'factor': 1.0, 'minutes': 25, 'warning': 'overflow risk'} | {'factor': 1.0, 'minutes': 25, 'warning': 'overflow risk'} | Passed |
| repair check: overflow warning threshold | {'factor': 1.0, 'minutes': 55, 'warning': 'overflow risk'} | {'factor': 1.0, 'minutes': 55, 'warning': None} | Failed |
| generated control 1 | {'factor': 0.26, 'minutes': 45, 'warning': None} | {'factor': 0.26, 'minutes': 45, 'warning': None} | Passed |
| generated control 2 | {'factor': 3.14, 'minutes': 45, 'warning': None} | {'factor': 3.14, 'minutes': 45, 'warning': None} | Passed |
| generated control 3 | {'factor': 1.0, 'minutes': 20, 'warning': None} | {'factor': 1.0, 'minutes': 20, 'warning': None} | Passed |
SHA-256 / 92fc1d9cf7aa470cd772ddb222a5b8d07eb9d06db619867b86fba96c44f2a926
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
import math
from fractions import Fraction
N = 1
observations = []
def solve(old_pan, new_pan, bake_min, scale_to_fill):
def area(p):
if p[0] == 'round':
return math.pi * (p[1] / 2) ** 2
if p[0] == 'square':
return p[1] * p[1]
if p[0] == 'rect':
return p[1] * p[2]
return None
a0, a1 = area(old_pan), area(new_pan)
if not a0 or not a1:
return 'error: pan'
if scale_to_fill:
return {'factor': round(a1 / a0, 2), 'minutes': bake_min, 'warning': None}
depth = a0 / a1
minutes = 5 * math.floor(bake_min * (1 + (depth - 1) / 2) / 5 + 0.5)
return {'factor': 1.0, 'minutes': minutes, 'warning': 'overflow risk' if depth > 1.5 else None}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['same pan', [['square', 8], ['square', 8], 30, False], {'factor': 1.0, 'minutes': 30, 'warning': None}],
['ratio exactly 1.5', [['square', 12], ['rect', 8, 12], 30, False],
{'factor': 1.0, 'minutes': 40, 'warning': None}],
['round to square fill', [['round', 9], ['square', 9], 30, True],
{'factor': 1.27, 'minutes': 30, 'warning': None}],
['regression: overflow warning threshold', [['rect', 8, 12], ['round', 9], 20, False],
{'factor': 1.0, 'minutes': 25, 'warning': 'overflow risk'}],
['repair check: overflow warning threshold', [['rect', 8, 12], ['square', 8], 45, False],
{'factor': 1.0, 'minutes': 55, 'warning': None}],
['generated control 1', [['rect', 9, 12], ['round', 6], 45, True],
{'factor': 0.26, 'minutes': 45, 'warning': None}],
['generated control 2', [['square', 6], ['round', 12], 45, True],
{'factor': 3.14, 'minutes': 45, 'warning': None}],
['generated control 3', [['square', 6], ['square', 9], 30, False],
{'factor': 1.0, 'minutes': 20, 'warning': None}]],
[['ratio exactly 1.5', [['square', 12], ['rect', 8, 12], 30, False],
{'factor': 1.0, 'minutes': 40, 'warning': None}],
['round to square fill', [['round', 9], ['square', 9], 30, True],
{'factor': 1.27, 'minutes': 30, 'warning': None}],
['bad pan', [['bundt', 10], ['square', 8], 30, True], 'error: pan'],
['regression: overflow warning threshold', [['rect', 8, 15], ['round', 10], 30, False],
{'factor': 1.0, 'minutes': 40, 'warning': 'overflow risk'}],
['repair check: overflow warning threshold', [['square', 12], ['rect', 8, 12], 25, False],
{'factor': 1.0, 'minutes': 30, 'warning': None}],
['generated control 1', [['round', 12], ['rect', 9, 12], 30, True],
{'factor': 0.95, 'minutes': 30, 'warning': None}],
['generated control 2', [['square', 6], ['round', 9], 45, False],
{'factor': 1.0, 'minutes': 35, 'warning': None}],
['generated control 3', [['square', 12], ['square', 8], 30, True],
{'factor': 0.44, 'minutes': 30, 'warning': None}]],
[['round to square fill', [['round', 9], ['square', 9], 30, True],
{'factor': 1.27, 'minutes': 30, 'warning': None}],
['bad pan', [['bundt', 10], ['square', 8], 30, True], 'error: pan'],
['same pan', [['square', 8], ['square', 8], 30, False], {'factor': 1.0, 'minutes': 30, 'warning': None}],
['regression: overflow warning threshold', [['rect', 9, 15], ['square', 9], 35, False],
{'factor': 1.0, 'minutes': 45, 'warning': 'overflow risk'}],
['repair check: overflow warning threshold', [['square', 12], ['rect', 8, 12], 30, False],
{'factor': 1.0, 'minutes': 40, 'warning': None}],
['generated control 1', [['square', 12], ['rect', 9, 15], 35, True],
{'factor': 0.94, 'minutes': 35, 'warning': None}],
['generated control 2', [['round', 8], ['round', 9], 45, False],
{'factor': 1.0, 'minutes': 40, 'warning': None}],
['generated control 3', [['round', 9], ['rect', 11, 12], 30, False],
{'factor': 1.0, 'minutes': 20, 'warning': None}]],
[['bad pan', [['bundt', 10], ['square', 8], 30, True], 'error: pan'],
['same pan', [['square', 8], ['square', 8], 30, False], {'factor': 1.0, 'minutes': 30, 'warning': None}],
['ratio exactly 1.5', [['square', 12], ['rect', 8, 12], 30, False],
{'factor': 1.0, 'minutes': 40, 'warning': None}],
['regression: overflow warning threshold', [['rect', 8, 13], ['square', 8], 20, False],
{'factor': 1.0, 'minutes': 25, 'warning': 'overflow risk'}],
['repair check: overflow warning threshold', [['square', 12], ['rect', 8, 12], 20, False],
{'factor': 1.0, 'minutes': 25, 'warning': None}],
['generated control 1', [['rect', 9, 15], ['rect', 8, 15], 30, False],
{'factor': 1.0, 'minutes': 30, 'warning': None}],
['generated control 2', [['rect', 8, 12], ['round', 10], 25, True],
{'factor': 0.82, 'minutes': 25, 'warning': None}],
['generated control 3', [['round', 9], ['round', 9], 45, True],
{'factor': 1.0, 'minutes': 45, 'warning': None}]],
[['same pan', [['square', 8], ['square', 8], 30, False], {'factor': 1.0, 'minutes': 30, 'warning': None}],
['ratio exactly 1.5', [['square', 12], ['rect', 8, 12], 30, False],
{'factor': 1.0, 'minutes': 40, 'warning': None}],
['round to square fill', [['round', 9], ['square', 9], 30, True],
{'factor': 1.27, 'minutes': 30, 'warning': None}],
['regression: overflow warning threshold', [['rect', 9, 13], ['round', 9], 20, False],
{'factor': 1.0, 'minutes': 30, 'warning': 'overflow risk'}],
['repair check: overflow warning threshold', [['square', 12], ['rect', 8, 12], 20, False],
{'factor': 1.0, 'minutes': 25, 'warning': None}],
['generated control 1', [['round', 8], ['rect', 8, 15], 20, False],
{'factor': 1.0, 'minutes': 15, 'warning': None}],
['generated control 2', [['square', 8], ['square', 9], 30, False],
{'factor': 1.0, 'minutes': 25, 'warning': None}],
['generated control 3', [['round', 9], ['rect', 11, 12], 45, False],
{'factor': 1.0, 'minutes': 35, 'warning': None}]]]
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 |
|---|---|---|---|
| same pan | {'factor': 1.0, 'minutes': 30, 'warning': None} | {'factor': 1.0, 'minutes': 30, 'warning': None} | Passed |
| ratio exactly 1.5 | {'factor': 1.0, 'minutes': 40, 'warning': None} | {'factor': 1.0, 'minutes': 40, 'warning': None} | Passed |
| round to square fill | {'factor': 1.27, 'minutes': 30, 'warning': None} | {'factor': 1.27, 'minutes': 30, 'warning': None} | Passed |
| regression: overflow warning threshold | {'factor': 1.0, 'minutes': 25, 'warning': 'overflow risk'} | {'factor': 1.0, 'minutes': 25, 'warning': 'overflow risk'} | Passed |
| repair check: overflow warning threshold | {'factor': 1.0, 'minutes': 55, 'warning': None} | {'factor': 1.0, 'minutes': 55, 'warning': None} | Passed |
| generated control 1 | {'factor': 0.26, 'minutes': 45, 'warning': None} | {'factor': 0.26, 'minutes': 45, 'warning': None} | Passed |
| generated control 2 | {'factor': 3.14, 'minutes': 45, 'warning': None} | {'factor': 3.14, 'minutes': 45, 'warning': None} | Passed |
| generated control 3 | {'factor': 1.0, 'minutes': 20, 'warning': None} | {'factor': 1.0, 'minutes': 20, 'warning': None} | Passed |
SHA-256 / 4224ce4b078a4fcba56a37c6b41be0fee5d141c478767bd965e0159e7eaf49ab
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:28.409631+00:00.
Case digest / 9f9fed374122dd1c7f7dad78998ec962f9614b55dd97a55145acfd4a1fa3006e