FAILURE MAP
← Case archive

FA-97041 / Recipe scaling and nutrition / Open access

Baking pan substitution: batter depth ratio · case 01

Pouring batter into a smaller pan shortens the bake.

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

ROOT CAUSE

The depth ratio is inverted, so deeper batter is treated as shallower.

VERIFIED REPAIR

Depth ratio is old area over new area.

Unsuccessful approach: The square root gives a linear scale factor, understating depth change.

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 = a1 / a0
    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: batter depth ratio', [['square', 8], ['rect', 8, 15], 30, False],
   {'factor': 1.0, 'minutes': 25, 'warning': None}],
  ['repair check: batter depth ratio', [['rect', 11, 13], ['square', 9], 20, False],
   {'factor': 1.0, 'minutes': 30, 'warning': 'overflow risk'}],
  ['generated control 1', [['round', 9], ['rect', 11, 12], 35, True],
   {'factor': 2.07, 'minutes': 35, 'warning': None}],
  ['generated control 2', [['round', 9], ['rect', 8, 15], 20, False],
   {'factor': 1.0, 'minutes': 15, 'warning': None}],
  ['generated control 3', [['square', 12], ['round', 9], 45, True],
   {'factor': 0.44, 'minutes': 45, '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: batter depth ratio', [['round', 9], ['rect', 11, 12], 20, False],
   {'factor': 1.0, 'minutes': 15, 'warning': None}],
  ['repair check: batter depth ratio', [['square', 6], ['square', 8], 45, False],
   {'factor': 1.0, 'minutes': 35, 'warning': None}],
  ['generated control 1', [['rect', 8, 15], ['round', 9], 35, True],
   {'factor': 0.53, 'minutes': 35, 'warning': None}],
  ['generated control 2', [['round', 9], ['rect', 9, 12], 20, True],
   {'factor': 1.7, 'minutes': 20, 'warning': None}],
  ['generated control 3', [['square', 6], ['rect', 11, 13], 35, True],
   {'factor': 3.97, 'minutes': 35, '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: batter depth ratio', [['square', 12], ['rect', 8, 13], 30, False],
   {'factor': 1.0, 'minutes': 35, 'warning': None}],
  ['repair check: batter depth ratio', [['round', 10], ['rect', 11, 13], 35, False],
   {'factor': 1.0, 'minutes': 25, 'warning': None}],
  ['generated control 1', [['round', 6], ['rect', 9, 12], 25, True],
   {'factor': 3.82, 'minutes': 25, 'warning': None}],
  ['generated control 2', [['square', 12], ['rect', 8, 15], 20, False],
   {'factor': 1.0, 'minutes': 20, 'warning': None}],
  ['generated control 3', [['square', 6], ['square', 8], 30, False],
   {'factor': 1.0, 'minutes': 25, '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: batter depth ratio', [['rect', 11, 13], ['rect', 8, 15], 35, False],
   {'factor': 1.0, 'minutes': 40, 'warning': None}],
  ['repair check: batter depth ratio', [['square', 6], ['rect', 9, 15], 25, False],
   {'factor': 1.0, 'minutes': 15, 'warning': None}],
  ['generated control 1', [['rect', 8, 12], ['rect', 8, 12], 45, True],
   {'factor': 1.0, 'minutes': 45, 'warning': None}],
  ['generated control 2', [['square', 12], ['round', 10], 45, True],
   {'factor': 0.55, 'minutes': 45, 'warning': None}],
  ['generated control 3', [['rect', 8, 13], ['rect', 9, 15], 45, True],
   {'factor': 1.3, '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: batter depth ratio', [['rect', 9, 13], ['rect', 9, 15], 35, False],
   {'factor': 1.0, 'minutes': 35, 'warning': None}],
  ['repair check: batter depth ratio', [['square', 12], ['square', 6], 35, False],
   {'factor': 1.0, 'minutes': 90, 'warning': 'overflow risk'}],
  ['generated control 1', [['round', 9], ['square', 8], 25, False],
   {'factor': 1.0, 'minutes': 25, 'warning': None}],
  ['generated control 2', [['round', 9], ['rect', 9, 12], 35, False],
   {'factor': 1.0, 'minutes': 30, 'warning': None}],
  ['generated control 3', [['square', 6], ['round', 10], 35, False],
   {'factor': 1.0, 'minutes': 25, '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 fixtureActualExpectedOutcome
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': 25, 'warning': None}{'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: batter depth ratio{'factor': 1.0, 'minutes': 45, 'warning': 'overflow risk'}{'factor': 1.0, 'minutes': 25, 'warning': None}Failed
repair check: batter depth ratio{'factor': 1.0, 'minutes': 15, 'warning': None}{'factor': 1.0, 'minutes': 30, 'warning': 'overflow risk'}Failed
generated control 1{'factor': 2.07, 'minutes': 35, 'warning': None}{'factor': 2.07, 'minutes': 35, 'warning': None}Passed
generated control 2{'factor': 1.0, 'minutes': 30, 'warning': 'overflow risk'}{'factor': 1.0, 'minutes': 15, 'warning': None}Failed
generated control 3{'factor': 0.44, 'minutes': 45, 'warning': None}{'factor': 0.44, 'minutes': 45, 'warning': None}Passed

SHA-256 / 44b2a7415eda935780dec4cb4e4eb94247e443f881ae27b20baa51cd09700eb0

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 = math.sqrt(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: batter depth ratio', [['square', 8], ['rect', 8, 15], 30, False],
   {'factor': 1.0, 'minutes': 25, 'warning': None}],
  ['repair check: batter depth ratio', [['rect', 11, 13], ['square', 9], 20, False],
   {'factor': 1.0, 'minutes': 30, 'warning': 'overflow risk'}],
  ['generated control 1', [['round', 9], ['rect', 11, 12], 35, True],
   {'factor': 2.07, 'minutes': 35, 'warning': None}],
  ['generated control 2', [['round', 9], ['rect', 8, 15], 20, False],
   {'factor': 1.0, 'minutes': 15, 'warning': None}],
  ['generated control 3', [['square', 12], ['round', 9], 45, True],
   {'factor': 0.44, 'minutes': 45, '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: batter depth ratio', [['round', 9], ['rect', 11, 12], 20, False],
   {'factor': 1.0, 'minutes': 15, 'warning': None}],
  ['repair check: batter depth ratio', [['square', 6], ['square', 8], 45, False],
   {'factor': 1.0, 'minutes': 35, 'warning': None}],
  ['generated control 1', [['rect', 8, 15], ['round', 9], 35, True],
   {'factor': 0.53, 'minutes': 35, 'warning': None}],
  ['generated control 2', [['round', 9], ['rect', 9, 12], 20, True],
   {'factor': 1.7, 'minutes': 20, 'warning': None}],
  ['generated control 3', [['square', 6], ['rect', 11, 13], 35, True],
   {'factor': 3.97, 'minutes': 35, '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: batter depth ratio', [['square', 12], ['rect', 8, 13], 30, False],
   {'factor': 1.0, 'minutes': 35, 'warning': None}],
  ['repair check: batter depth ratio', [['round', 10], ['rect', 11, 13], 35, False],
   {'factor': 1.0, 'minutes': 25, 'warning': None}],
  ['generated control 1', [['round', 6], ['rect', 9, 12], 25, True],
   {'factor': 3.82, 'minutes': 25, 'warning': None}],
  ['generated control 2', [['square', 12], ['rect', 8, 15], 20, False],
   {'factor': 1.0, 'minutes': 20, 'warning': None}],
  ['generated control 3', [['square', 6], ['square', 8], 30, False],
   {'factor': 1.0, 'minutes': 25, '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: batter depth ratio', [['rect', 11, 13], ['rect', 8, 15], 35, False],
   {'factor': 1.0, 'minutes': 40, 'warning': None}],
  ['repair check: batter depth ratio', [['square', 6], ['rect', 9, 15], 25, False],
   {'factor': 1.0, 'minutes': 15, 'warning': None}],
  ['generated control 1', [['rect', 8, 12], ['rect', 8, 12], 45, True],
   {'factor': 1.0, 'minutes': 45, 'warning': None}],
  ['generated control 2', [['square', 12], ['round', 10], 45, True],
   {'factor': 0.55, 'minutes': 45, 'warning': None}],
  ['generated control 3', [['rect', 8, 13], ['rect', 9, 15], 45, True],
   {'factor': 1.3, '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: batter depth ratio', [['rect', 9, 13], ['rect', 9, 15], 35, False],
   {'factor': 1.0, 'minutes': 35, 'warning': None}],
  ['repair check: batter depth ratio', [['square', 12], ['square', 6], 35, False],
   {'factor': 1.0, 'minutes': 90, 'warning': 'overflow risk'}],
  ['generated control 1', [['round', 9], ['square', 8], 25, False],
   {'factor': 1.0, 'minutes': 25, 'warning': None}],
  ['generated control 2', [['round', 9], ['rect', 9, 12], 35, False],
   {'factor': 1.0, 'minutes': 30, 'warning': None}],
  ['generated control 3', [['square', 6], ['round', 10], 35, False],
   {'factor': 1.0, 'minutes': 25, '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 fixtureActualExpectedOutcome
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': 35, 'warning': None}{'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: batter depth ratio{'factor': 1.0, 'minutes': 25, 'warning': None}{'factor': 1.0, 'minutes': 25, 'warning': None}Passed
repair check: batter depth ratio{'factor': 1.0, 'minutes': 25, 'warning': None}{'factor': 1.0, 'minutes': 30, 'warning': 'overflow risk'}Failed
generated control 1{'factor': 2.07, 'minutes': 35, 'warning': None}{'factor': 2.07, 'minutes': 35, 'warning': None}Passed
generated control 2{'factor': 1.0, 'minutes': 15, 'warning': None}{'factor': 1.0, 'minutes': 15, 'warning': None}Passed
generated control 3{'factor': 0.44, 'minutes': 45, 'warning': None}{'factor': 0.44, 'minutes': 45, 'warning': None}Passed

SHA-256 / 5e4c2e90bac64f80302fcfa420af8256e68c185413426b27a841cf0ac65174da

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: batter depth ratio', [['square', 8], ['rect', 8, 15], 30, False],
   {'factor': 1.0, 'minutes': 25, 'warning': None}],
  ['repair check: batter depth ratio', [['rect', 11, 13], ['square', 9], 20, False],
   {'factor': 1.0, 'minutes': 30, 'warning': 'overflow risk'}],
  ['generated control 1', [['round', 9], ['rect', 11, 12], 35, True],
   {'factor': 2.07, 'minutes': 35, 'warning': None}],
  ['generated control 2', [['round', 9], ['rect', 8, 15], 20, False],
   {'factor': 1.0, 'minutes': 15, 'warning': None}],
  ['generated control 3', [['square', 12], ['round', 9], 45, True],
   {'factor': 0.44, 'minutes': 45, '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: batter depth ratio', [['round', 9], ['rect', 11, 12], 20, False],
   {'factor': 1.0, 'minutes': 15, 'warning': None}],
  ['repair check: batter depth ratio', [['square', 6], ['square', 8], 45, False],
   {'factor': 1.0, 'minutes': 35, 'warning': None}],
  ['generated control 1', [['rect', 8, 15], ['round', 9], 35, True],
   {'factor': 0.53, 'minutes': 35, 'warning': None}],
  ['generated control 2', [['round', 9], ['rect', 9, 12], 20, True],
   {'factor': 1.7, 'minutes': 20, 'warning': None}],
  ['generated control 3', [['square', 6], ['rect', 11, 13], 35, True],
   {'factor': 3.97, 'minutes': 35, '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: batter depth ratio', [['square', 12], ['rect', 8, 13], 30, False],
   {'factor': 1.0, 'minutes': 35, 'warning': None}],
  ['repair check: batter depth ratio', [['round', 10], ['rect', 11, 13], 35, False],
   {'factor': 1.0, 'minutes': 25, 'warning': None}],
  ['generated control 1', [['round', 6], ['rect', 9, 12], 25, True],
   {'factor': 3.82, 'minutes': 25, 'warning': None}],
  ['generated control 2', [['square', 12], ['rect', 8, 15], 20, False],
   {'factor': 1.0, 'minutes': 20, 'warning': None}],
  ['generated control 3', [['square', 6], ['square', 8], 30, False],
   {'factor': 1.0, 'minutes': 25, '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: batter depth ratio', [['rect', 11, 13], ['rect', 8, 15], 35, False],
   {'factor': 1.0, 'minutes': 40, 'warning': None}],
  ['repair check: batter depth ratio', [['square', 6], ['rect', 9, 15], 25, False],
   {'factor': 1.0, 'minutes': 15, 'warning': None}],
  ['generated control 1', [['rect', 8, 12], ['rect', 8, 12], 45, True],
   {'factor': 1.0, 'minutes': 45, 'warning': None}],
  ['generated control 2', [['square', 12], ['round', 10], 45, True],
   {'factor': 0.55, 'minutes': 45, 'warning': None}],
  ['generated control 3', [['rect', 8, 13], ['rect', 9, 15], 45, True],
   {'factor': 1.3, '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: batter depth ratio', [['rect', 9, 13], ['rect', 9, 15], 35, False],
   {'factor': 1.0, 'minutes': 35, 'warning': None}],
  ['repair check: batter depth ratio', [['square', 12], ['square', 6], 35, False],
   {'factor': 1.0, 'minutes': 90, 'warning': 'overflow risk'}],
  ['generated control 1', [['round', 9], ['square', 8], 25, False],
   {'factor': 1.0, 'minutes': 25, 'warning': None}],
  ['generated control 2', [['round', 9], ['rect', 9, 12], 35, False],
   {'factor': 1.0, 'minutes': 30, 'warning': None}],
  ['generated control 3', [['square', 6], ['round', 10], 35, False],
   {'factor': 1.0, 'minutes': 25, '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 fixtureActualExpectedOutcome
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: batter depth ratio{'factor': 1.0, 'minutes': 25, 'warning': None}{'factor': 1.0, 'minutes': 25, 'warning': None}Passed
repair check: batter depth ratio{'factor': 1.0, 'minutes': 30, 'warning': 'overflow risk'}{'factor': 1.0, 'minutes': 30, 'warning': 'overflow risk'}Passed
generated control 1{'factor': 2.07, 'minutes': 35, 'warning': None}{'factor': 2.07, 'minutes': 35, 'warning': None}Passed
generated control 2{'factor': 1.0, 'minutes': 15, 'warning': None}{'factor': 1.0, 'minutes': 15, 'warning': None}Passed
generated control 3{'factor': 0.44, 'minutes': 45, 'warning': None}{'factor': 0.44, 'minutes': 45, 'warning': None}Passed

SHA-256 / d89783b6d6688035689de1ac3298babf91e064ee9b19cc23dbd3b47f21980334

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.276855+00:00.

Case digest / 1e78a822856c15eaffd2d7b9a81184486e3d3f012ed40f9eb7980e09a4313d9f