{"abstract":"A meal with a glycemic load of exactly 10 is called medium.","category":"Recipe scaling and nutrition","checks":8,"contract":"Rows [name, gi, carbs, fiber, grams_eaten, per_grams] where carbs and fiber are per per_grams. Available carb = (carbs-fiber)*eaten/per. Meal GI = sum(gi*avail)/sum(avail) half-up integer (None if no available carb). GL = sum(gi*avail)/100 half-up to 0.1. Class from the exact GL: <=10 low, <20 medium, else high.","evaluation_group":"w2-recipe_scaling_and_nutrition-glycemic-load","failed_approach":"Classifying on the rounded load calls 10.03 low.","family":"w2-recipe_scaling_and_nutrition-glycemic-load-class-from-exact-load","id":"FA-97236","implementations":{"attempt":{"sha256":"308a6cbd2d12f79dcf6aa3b583c68e086489a1c8aaba78d1dc2ba9dc96a9631b","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(foods):\n    tot = Fraction(0)\n    w = Fraction(0)\n    for name, gi, carbs, fiber, eaten, per in foods:\n        avail = (Fraction(str(carbs)) - Fraction(str(fiber))) * Fraction(eaten, per)\n        tot += avail\n        w += gi * avail\n    gi_meal = math.floor(w / tot + Fraction(1, 2)) if tot else None\n    gl = w / 100\n    cls = 'low' if math.floor(gl * 10 + Fraction(1, 2)) / 10 <= 10 else 'medium' if gl < 20 else 'high'\n    return {'gi': gi_meal, 'gl': math.floor(gl * 10 + Fraction(1, 2)) / 10, 'class': cls}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['single food', [[['rice', 73, 28, 0.4, 150, 100]]], {'class': 'high', 'gi': 73, 'gl': 30.2}],\n  ['load exactly ten', [[['juice', 50, 10, 0, 200, 100]]], {'class': 'low', 'gi': 50, 'gl': 10.0}],\n  ['no carbs', [[['egg', 0, 0, 0, 50, 100]]], {'class': 'low', 'gi': None, 'gl': 0.0}],\n  ['repair check: class from exact load', [[['apple', 36, 14, 2.4, 120, 50]]],\n   {'class': 'medium', 'gi': 36, 'gl': 10.0}],\n  ['generated control 1', [[['rice', 73, 28, 0.4, 150, 100], ['oats', 55, 60, 10, 30, 100]]],\n   {'class': 'high', 'gi': 68, 'gl': 38.5}],\n  ['generated control 2',\n   [[['oats', 55, 60, 10, 50, 100], ['apple', 36, 14, 2.4, 150, 100], ['lentils', 32, 20, 8, 50, 100]]],\n   {'class': 'high', 'gi': 45, 'gl': 21.9}],\n  ['generated control 3', [[['lentils', 32, 20, 8, 30, 100]]], {'class': 'low', 'gi': 32, 'gl': 1.2}],\n  ['generated control 4',\n   [[['banana', 51, 23, 2.6, 120, 100], ['apple', 36, 14, 2.4, 30, 50], ['juice', 50, 10, 0, 50, 100]]],\n   {'class': 'medium', 'gi': 48, 'gl': 17.5}]],\n [['load exactly ten', [[['juice', 50, 10, 0, 200, 100]]], {'class': 'low', 'gi': 50, 'gl': 10.0}],\n  ['no carbs', [[['egg', 0, 0, 0, 50, 100]]], {'class': 'low', 'gi': None, 'gl': 0.0}],\n  ['mixed meal', [[['lentils', 32, 20, 8, 200, 100], ['bread', 75, 49, 2.7, 50, 100]]],\n   {'class': 'high', 'gi': 53, 'gl': 25.0}],\n  ['repair check: class from exact load', [[['rice', 73, 28, 0.4, 30, 100], ['juice', 50, 10, 0, 80, 100]]],\n   {'class': 'medium', 'gi': 62, 'gl': 10.0}],\n  ['generated control 1',\n   [[['juice', 50, 10, 0, 30, 100], ['bread', 75, 49, 2.7, 30, 100], ['apple', 36, 14, 2.4, 80, 50],\n     ['lentils', 32, 20, 8, 30, 100]]],\n   {'class': 'medium', 'gi': 51, 'gl': 19.8}],\n  ['generated control 2', [[['bread', 75, 49, 2.7, 30, 100], ['lentils', 32, 20, 8, 150, 50]]],\n   {'class': 'high', 'gi': 44, 'gl': 21.9}],\n  ['generated control 3',\n   [[['lentils', 32, 20, 8, 80, 50], ['juice', 50, 10, 0, 150, 50], ['oats', 55, 60, 10, 30, 100]]],\n   {'class': 'high', 'gi': 46, 'gl': 29.4}],\n  ['generated control 4',\n   [[['lentils', 32, 20, 8, 120, 100], ['banana', 51, 23, 2.6, 50, 50], ['rice', 73, 28, 0.4, 150, 100],\n     ['juice', 50, 10, 0, 30, 100]]],\n   {'class': 'high', 'gi': 59, 'gl': 46.7}]],\n [['no carbs', [[['egg', 0, 0, 0, 50, 100]]], {'class': 'low', 'gi': None, 'gl': 0.0}],\n  ['mixed meal', [[['lentils', 32, 20, 8, 200, 100], ['bread', 75, 49, 2.7, 50, 100]]],\n   {'class': 'high', 'gi': 53, 'gl': 25.0}],\n  ['single food', [[['rice', 73, 28, 0.4, 150, 100]]], {'class': 'high', 'gi': 73, 'gl': 30.2}],\n  ['regression: class from exact load', [[['juice', 50, 10, 0, 200, 100]]],\n   {'class': 'low', 'gi': 50, 'gl': 10.0}],\n  ['repair check: class from exact load', [[['apple', 36, 14, 2.4, 120, 50]]],\n   {'class': 'medium', 'gi': 36, 'gl': 10.0}],\n  ['generated control 1',\n   [[['lentils', 32, 20, 8, 50, 100], ['banana', 51, 23, 2.6, 80, 100], ['juice', 50, 10, 0, 200, 50],\n     ['apple', 36, 14, 2.4, 50, 100]]],\n   {'class': 'high', 'gi': 47, 'gl': 32.3}],\n  ['generated control 2', [[['lentils', 32, 20, 8, 150, 50]]], {'class': 'medium', 'gi': 32, 'gl': 11.5}],\n  ['generated control 3',\n   [[['bread', 75, 49, 2.7, 30, 100], ['juice', 50, 10, 0, 50, 100], ['rice', 73, 28, 0.4, 80, 100],\n     ['oats', 55, 60, 10, 50, 100]]],\n   {'class': 'high', 'gi': 65, 'gl': 42.8}]],\n [['mixed meal', [[['lentils', 32, 20, 8, 200, 100], ['bread', 75, 49, 2.7, 50, 100]]],\n   {'class': 'high', 'gi': 53, 'gl': 25.0}],\n  ['single food', [[['rice', 73, 28, 0.4, 150, 100]]], {'class': 'high', 'gi': 73, 'gl': 30.2}],\n  ['load exactly ten', [[['juice', 50, 10, 0, 200, 100]]], {'class': 'low', 'gi': 50, 'gl': 10.0}],\n  ['repair check: class from exact load', [[['apple', 36, 14, 2.4, 120, 50]]],\n   {'class': 'medium', 'gi': 36, 'gl': 10.0}],\n  ['generated control 1',\n   [[['juice', 50, 10, 0, 50, 100], ['rice', 73, 28, 0.4, 200, 100], ['lentils', 32, 20, 8, 50, 100]]],\n   {'class': 'high', 'gi': 68, 'gl': 44.7}],\n  ['generated control 2',\n   [[['juice', 50, 10, 0, 50, 50], ['banana', 51, 23, 2.6, 150, 100], ['lentils', 32, 20, 8, 80, 100],\n     ['apple', 36, 14, 2.4, 120, 100]]],\n   {'class': 'high', 'gi': 45, 'gl': 28.7}],\n  ['generated control 3',\n   [[['rice', 73, 28, 0.4, 150, 100], ['bread', 75, 49, 2.7, 150, 50], ['banana', 51, 23, 2.6, 30, 50],\n     ['oats', 55, 60, 10, 150, 50]]],\n   {'class': 'high', 'gi': 65, 'gl': 223.1}],\n  ['generated control 4',\n   [[['oats', 55, 60, 10, 150, 100], ['banana', 51, 23, 2.6, 80, 100], ['juice', 50, 10, 0, 120, 100]]],\n   {'class': 'high', 'gi': 54, 'gl': 55.6}]],\n [['single food', [[['rice', 73, 28, 0.4, 150, 100]]], {'class': 'high', 'gi': 73, 'gl': 30.2}],\n  ['load exactly ten', [[['juice', 50, 10, 0, 200, 100]]], {'class': 'low', 'gi': 50, 'gl': 10.0}],\n  ['no carbs', [[['egg', 0, 0, 0, 50, 100]]], {'class': 'low', 'gi': None, 'gl': 0.0}],\n  ['repair check: class from exact load', [[['apple', 36, 14, 2.4, 120, 50]]],\n   {'class': 'medium', 'gi': 36, 'gl': 10.0}],\n  ['generated control 1',\n   [[['juice', 50, 10, 0, 120, 100], ['bread', 75, 49, 2.7, 150, 100], ['oats', 55, 60, 10, 120, 50],\n     ['banana', 51, 23, 2.6, 30, 50]]],\n   {'class': 'high', 'gi': 61, 'gl': 130.3}],\n  ['generated control 2',\n   [[['juice', 50, 10, 0, 200, 50], ['apple', 36, 14, 2.4, 120, 100], ['oats', 55, 60, 10, 200, 100],\n     ['banana', 51, 23, 2.6, 80, 50]]],\n   {'class': 'high', 'gi': 52, 'gl': 96.7}],\n  ['generated control 3', [[['juice', 50, 10, 0, 80, 100], ['banana', 51, 23, 2.6, 30, 100]]],\n   {'class': 'low', 'gi': 50, 'gl': 7.1}],\n  ['generated control 4', [[['bread', 75, 49, 2.7, 50, 100], ['apple', 36, 14, 2.4, 80, 100]]],\n   {'class': 'high', 'gi': 64, 'gl': 20.7}]]]\nfor label, args, expected in fixtures[N - 1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"ed002252224813fcd822eb4053cc4174c9af57ae1ca792507789803f4b2919f0","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(foods):\n    tot = Fraction(0)\n    w = Fraction(0)\n    for name, gi, carbs, fiber, eaten, per in foods:\n        avail = (Fraction(str(carbs)) - Fraction(str(fiber))) * Fraction(eaten, per)\n        tot += avail\n        w += gi * avail\n    gi_meal = math.floor(w / tot + Fraction(1, 2)) if tot else None\n    gl = w / 100\n    cls = 'low' if gl < 10 else 'medium' if gl < 20 else 'high'\n    return {'gi': gi_meal, 'gl': math.floor(gl * 10 + Fraction(1, 2)) / 10, 'class': cls}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['single food', [[['rice', 73, 28, 0.4, 150, 100]]], {'class': 'high', 'gi': 73, 'gl': 30.2}],\n  ['load exactly ten', [[['juice', 50, 10, 0, 200, 100]]], {'class': 'low', 'gi': 50, 'gl': 10.0}],\n  ['no carbs', [[['egg', 0, 0, 0, 50, 100]]], {'class': 'low', 'gi': None, 'gl': 0.0}],\n  ['repair check: class from exact load', [[['apple', 36, 14, 2.4, 120, 50]]],\n   {'class': 'medium', 'gi': 36, 'gl': 10.0}],\n  ['generated control 1', [[['rice', 73, 28, 0.4, 150, 100], ['oats', 55, 60, 10, 30, 100]]],\n   {'class': 'high', 'gi': 68, 'gl': 38.5}],\n  ['generated control 2',\n   [[['oats', 55, 60, 10, 50, 100], ['apple', 36, 14, 2.4, 150, 100], ['lentils', 32, 20, 8, 50, 100]]],\n   {'class': 'high', 'gi': 45, 'gl': 21.9}],\n  ['generated control 3', [[['lentils', 32, 20, 8, 30, 100]]], {'class': 'low', 'gi': 32, 'gl': 1.2}],\n  ['generated control 4',\n   [[['banana', 51, 23, 2.6, 120, 100], ['apple', 36, 14, 2.4, 30, 50], ['juice', 50, 10, 0, 50, 100]]],\n   {'class': 'medium', 'gi': 48, 'gl': 17.5}]],\n [['load exactly ten', [[['juice', 50, 10, 0, 200, 100]]], {'class': 'low', 'gi': 50, 'gl': 10.0}],\n  ['no carbs', [[['egg', 0, 0, 0, 50, 100]]], {'class': 'low', 'gi': None, 'gl': 0.0}],\n  ['mixed meal', [[['lentils', 32, 20, 8, 200, 100], ['bread', 75, 49, 2.7, 50, 100]]],\n   {'class': 'high', 'gi': 53, 'gl': 25.0}],\n  ['repair check: class from exact load', [[['rice', 73, 28, 0.4, 30, 100], ['juice', 50, 10, 0, 80, 100]]],\n   {'class': 'medium', 'gi': 62, 'gl': 10.0}],\n  ['generated control 1',\n   [[['juice', 50, 10, 0, 30, 100], ['bread', 75, 49, 2.7, 30, 100], ['apple', 36, 14, 2.4, 80, 50],\n     ['lentils', 32, 20, 8, 30, 100]]],\n   {'class': 'medium', 'gi': 51, 'gl': 19.8}],\n  ['generated control 2', [[['bread', 75, 49, 2.7, 30, 100], ['lentils', 32, 20, 8, 150, 50]]],\n   {'class': 'high', 'gi': 44, 'gl': 21.9}],\n  ['generated control 3',\n   [[['lentils', 32, 20, 8, 80, 50], ['juice', 50, 10, 0, 150, 50], ['oats', 55, 60, 10, 30, 100]]],\n   {'class': 'high', 'gi': 46, 'gl': 29.4}],\n  ['generated control 4',\n   [[['lentils', 32, 20, 8, 120, 100], ['banana', 51, 23, 2.6, 50, 50], ['rice', 73, 28, 0.4, 150, 100],\n     ['juice', 50, 10, 0, 30, 100]]],\n   {'class': 'high', 'gi': 59, 'gl': 46.7}]],\n [['no carbs', [[['egg', 0, 0, 0, 50, 100]]], {'class': 'low', 'gi': None, 'gl': 0.0}],\n  ['mixed meal', [[['lentils', 32, 20, 8, 200, 100], ['bread', 75, 49, 2.7, 50, 100]]],\n   {'class': 'high', 'gi': 53, 'gl': 25.0}],\n  ['single food', [[['rice', 73, 28, 0.4, 150, 100]]], {'class': 'high', 'gi': 73, 'gl': 30.2}],\n  ['regression: class from exact load', [[['juice', 50, 10, 0, 200, 100]]],\n   {'class': 'low', 'gi': 50, 'gl': 10.0}],\n  ['repair check: class from exact load', [[['apple', 36, 14, 2.4, 120, 50]]],\n   {'class': 'medium', 'gi': 36, 'gl': 10.0}],\n  ['generated control 1',\n   [[['lentils', 32, 20, 8, 50, 100], ['banana', 51, 23, 2.6, 80, 100], ['juice', 50, 10, 0, 200, 50],\n     ['apple', 36, 14, 2.4, 50, 100]]],\n   {'class': 'high', 'gi': 47, 'gl': 32.3}],\n  ['generated control 2', [[['lentils', 32, 20, 8, 150, 50]]], {'class': 'medium', 'gi': 32, 'gl': 11.5}],\n  ['generated control 3',\n   [[['bread', 75, 49, 2.7, 30, 100], ['juice', 50, 10, 0, 50, 100], ['rice', 73, 28, 0.4, 80, 100],\n     ['oats', 55, 60, 10, 50, 100]]],\n   {'class': 'high', 'gi': 65, 'gl': 42.8}]],\n [['mixed meal', [[['lentils', 32, 20, 8, 200, 100], ['bread', 75, 49, 2.7, 50, 100]]],\n   {'class': 'high', 'gi': 53, 'gl': 25.0}],\n  ['single food', [[['rice', 73, 28, 0.4, 150, 100]]], {'class': 'high', 'gi': 73, 'gl': 30.2}],\n  ['load exactly ten', [[['juice', 50, 10, 0, 200, 100]]], {'class': 'low', 'gi': 50, 'gl': 10.0}],\n  ['repair check: class from exact load', [[['apple', 36, 14, 2.4, 120, 50]]],\n   {'class': 'medium', 'gi': 36, 'gl': 10.0}],\n  ['generated control 1',\n   [[['juice', 50, 10, 0, 50, 100], ['rice', 73, 28, 0.4, 200, 100], ['lentils', 32, 20, 8, 50, 100]]],\n   {'class': 'high', 'gi': 68, 'gl': 44.7}],\n  ['generated control 2',\n   [[['juice', 50, 10, 0, 50, 50], ['banana', 51, 23, 2.6, 150, 100], ['lentils', 32, 20, 8, 80, 100],\n     ['apple', 36, 14, 2.4, 120, 100]]],\n   {'class': 'high', 'gi': 45, 'gl': 28.7}],\n  ['generated control 3',\n   [[['rice', 73, 28, 0.4, 150, 100], ['bread', 75, 49, 2.7, 150, 50], ['banana', 51, 23, 2.6, 30, 50],\n     ['oats', 55, 60, 10, 150, 50]]],\n   {'class': 'high', 'gi': 65, 'gl': 223.1}],\n  ['generated control 4',\n   [[['oats', 55, 60, 10, 150, 100], ['banana', 51, 23, 2.6, 80, 100], ['juice', 50, 10, 0, 120, 100]]],\n   {'class': 'high', 'gi': 54, 'gl': 55.6}]],\n [['single food', [[['rice', 73, 28, 0.4, 150, 100]]], {'class': 'high', 'gi': 73, 'gl': 30.2}],\n  ['load exactly ten', [[['juice', 50, 10, 0, 200, 100]]], {'class': 'low', 'gi': 50, 'gl': 10.0}],\n  ['no carbs', [[['egg', 0, 0, 0, 50, 100]]], {'class': 'low', 'gi': None, 'gl': 0.0}],\n  ['repair check: class from exact load', [[['apple', 36, 14, 2.4, 120, 50]]],\n   {'class': 'medium', 'gi': 36, 'gl': 10.0}],\n  ['generated control 1',\n   [[['juice', 50, 10, 0, 120, 100], ['bread', 75, 49, 2.7, 150, 100], ['oats', 55, 60, 10, 120, 50],\n     ['banana', 51, 23, 2.6, 30, 50]]],\n   {'class': 'high', 'gi': 61, 'gl': 130.3}],\n  ['generated control 2',\n   [[['juice', 50, 10, 0, 200, 50], ['apple', 36, 14, 2.4, 120, 100], ['oats', 55, 60, 10, 200, 100],\n     ['banana', 51, 23, 2.6, 80, 50]]],\n   {'class': 'high', 'gi': 52, 'gl': 96.7}],\n  ['generated control 3', [[['juice', 50, 10, 0, 80, 100], ['banana', 51, 23, 2.6, 30, 100]]],\n   {'class': 'low', 'gi': 50, 'gl': 7.1}],\n  ['generated control 4', [[['bread', 75, 49, 2.7, 50, 100], ['apple', 36, 14, 2.4, 80, 100]]],\n   {'class': 'high', 'gi': 64, 'gl': 20.7}]]]\nfor label, args, expected in fixtures[N - 1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"fixed":{"sha256":"e29452712d972721db1ad94786240921747744ecb2c4f23ba6e1ffe4e89cc8ac","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(foods):\n    tot = Fraction(0)\n    w = Fraction(0)\n    for name, gi, carbs, fiber, eaten, per in foods:\n        avail = (Fraction(str(carbs)) - Fraction(str(fiber))) * Fraction(eaten, per)\n        tot += avail\n        w += gi * avail\n    gi_meal = math.floor(w / tot + Fraction(1, 2)) if tot else None\n    gl = w / 100\n    cls = 'low' if gl <= 10 else 'medium' if gl < 20 else 'high'\n    return {'gi': gi_meal, 'gl': math.floor(gl * 10 + Fraction(1, 2)) / 10, 'class': cls}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['single food', [[['rice', 73, 28, 0.4, 150, 100]]], {'class': 'high', 'gi': 73, 'gl': 30.2}],\n  ['load exactly ten', [[['juice', 50, 10, 0, 200, 100]]], {'class': 'low', 'gi': 50, 'gl': 10.0}],\n  ['no carbs', [[['egg', 0, 0, 0, 50, 100]]], {'class': 'low', 'gi': None, 'gl': 0.0}],\n  ['repair check: class from exact load', [[['apple', 36, 14, 2.4, 120, 50]]],\n   {'class': 'medium', 'gi': 36, 'gl': 10.0}],\n  ['generated control 1', [[['rice', 73, 28, 0.4, 150, 100], ['oats', 55, 60, 10, 30, 100]]],\n   {'class': 'high', 'gi': 68, 'gl': 38.5}],\n  ['generated control 2',\n   [[['oats', 55, 60, 10, 50, 100], ['apple', 36, 14, 2.4, 150, 100], ['lentils', 32, 20, 8, 50, 100]]],\n   {'class': 'high', 'gi': 45, 'gl': 21.9}],\n  ['generated control 3', [[['lentils', 32, 20, 8, 30, 100]]], {'class': 'low', 'gi': 32, 'gl': 1.2}],\n  ['generated control 4',\n   [[['banana', 51, 23, 2.6, 120, 100], ['apple', 36, 14, 2.4, 30, 50], ['juice', 50, 10, 0, 50, 100]]],\n   {'class': 'medium', 'gi': 48, 'gl': 17.5}]],\n [['load exactly ten', [[['juice', 50, 10, 0, 200, 100]]], {'class': 'low', 'gi': 50, 'gl': 10.0}],\n  ['no carbs', [[['egg', 0, 0, 0, 50, 100]]], {'class': 'low', 'gi': None, 'gl': 0.0}],\n  ['mixed meal', [[['lentils', 32, 20, 8, 200, 100], ['bread', 75, 49, 2.7, 50, 100]]],\n   {'class': 'high', 'gi': 53, 'gl': 25.0}],\n  ['repair check: class from exact load', [[['rice', 73, 28, 0.4, 30, 100], ['juice', 50, 10, 0, 80, 100]]],\n   {'class': 'medium', 'gi': 62, 'gl': 10.0}],\n  ['generated control 1',\n   [[['juice', 50, 10, 0, 30, 100], ['bread', 75, 49, 2.7, 30, 100], ['apple', 36, 14, 2.4, 80, 50],\n     ['lentils', 32, 20, 8, 30, 100]]],\n   {'class': 'medium', 'gi': 51, 'gl': 19.8}],\n  ['generated control 2', [[['bread', 75, 49, 2.7, 30, 100], ['lentils', 32, 20, 8, 150, 50]]],\n   {'class': 'high', 'gi': 44, 'gl': 21.9}],\n  ['generated control 3',\n   [[['lentils', 32, 20, 8, 80, 50], ['juice', 50, 10, 0, 150, 50], ['oats', 55, 60, 10, 30, 100]]],\n   {'class': 'high', 'gi': 46, 'gl': 29.4}],\n  ['generated control 4',\n   [[['lentils', 32, 20, 8, 120, 100], ['banana', 51, 23, 2.6, 50, 50], ['rice', 73, 28, 0.4, 150, 100],\n     ['juice', 50, 10, 0, 30, 100]]],\n   {'class': 'high', 'gi': 59, 'gl': 46.7}]],\n [['no carbs', [[['egg', 0, 0, 0, 50, 100]]], {'class': 'low', 'gi': None, 'gl': 0.0}],\n  ['mixed meal', [[['lentils', 32, 20, 8, 200, 100], ['bread', 75, 49, 2.7, 50, 100]]],\n   {'class': 'high', 'gi': 53, 'gl': 25.0}],\n  ['single food', [[['rice', 73, 28, 0.4, 150, 100]]], {'class': 'high', 'gi': 73, 'gl': 30.2}],\n  ['regression: class from exact load', [[['juice', 50, 10, 0, 200, 100]]],\n   {'class': 'low', 'gi': 50, 'gl': 10.0}],\n  ['repair check: class from exact load', [[['apple', 36, 14, 2.4, 120, 50]]],\n   {'class': 'medium', 'gi': 36, 'gl': 10.0}],\n  ['generated control 1',\n   [[['lentils', 32, 20, 8, 50, 100], ['banana', 51, 23, 2.6, 80, 100], ['juice', 50, 10, 0, 200, 50],\n     ['apple', 36, 14, 2.4, 50, 100]]],\n   {'class': 'high', 'gi': 47, 'gl': 32.3}],\n  ['generated control 2', [[['lentils', 32, 20, 8, 150, 50]]], {'class': 'medium', 'gi': 32, 'gl': 11.5}],\n  ['generated control 3',\n   [[['bread', 75, 49, 2.7, 30, 100], ['juice', 50, 10, 0, 50, 100], ['rice', 73, 28, 0.4, 80, 100],\n     ['oats', 55, 60, 10, 50, 100]]],\n   {'class': 'high', 'gi': 65, 'gl': 42.8}]],\n [['mixed meal', [[['lentils', 32, 20, 8, 200, 100], ['bread', 75, 49, 2.7, 50, 100]]],\n   {'class': 'high', 'gi': 53, 'gl': 25.0}],\n  ['single food', [[['rice', 73, 28, 0.4, 150, 100]]], {'class': 'high', 'gi': 73, 'gl': 30.2}],\n  ['load exactly ten', [[['juice', 50, 10, 0, 200, 100]]], {'class': 'low', 'gi': 50, 'gl': 10.0}],\n  ['repair check: class from exact load', [[['apple', 36, 14, 2.4, 120, 50]]],\n   {'class': 'medium', 'gi': 36, 'gl': 10.0}],\n  ['generated control 1',\n   [[['juice', 50, 10, 0, 50, 100], ['rice', 73, 28, 0.4, 200, 100], ['lentils', 32, 20, 8, 50, 100]]],\n   {'class': 'high', 'gi': 68, 'gl': 44.7}],\n  ['generated control 2',\n   [[['juice', 50, 10, 0, 50, 50], ['banana', 51, 23, 2.6, 150, 100], ['lentils', 32, 20, 8, 80, 100],\n     ['apple', 36, 14, 2.4, 120, 100]]],\n   {'class': 'high', 'gi': 45, 'gl': 28.7}],\n  ['generated control 3',\n   [[['rice', 73, 28, 0.4, 150, 100], ['bread', 75, 49, 2.7, 150, 50], ['banana', 51, 23, 2.6, 30, 50],\n     ['oats', 55, 60, 10, 150, 50]]],\n   {'class': 'high', 'gi': 65, 'gl': 223.1}],\n  ['generated control 4',\n   [[['oats', 55, 60, 10, 150, 100], ['banana', 51, 23, 2.6, 80, 100], ['juice', 50, 10, 0, 120, 100]]],\n   {'class': 'high', 'gi': 54, 'gl': 55.6}]],\n [['single food', [[['rice', 73, 28, 0.4, 150, 100]]], {'class': 'high', 'gi': 73, 'gl': 30.2}],\n  ['load exactly ten', [[['juice', 50, 10, 0, 200, 100]]], {'class': 'low', 'gi': 50, 'gl': 10.0}],\n  ['no carbs', [[['egg', 0, 0, 0, 50, 100]]], {'class': 'low', 'gi': None, 'gl': 0.0}],\n  ['repair check: class from exact load', [[['apple', 36, 14, 2.4, 120, 50]]],\n   {'class': 'medium', 'gi': 36, 'gl': 10.0}],\n  ['generated control 1',\n   [[['juice', 50, 10, 0, 120, 100], ['bread', 75, 49, 2.7, 150, 100], ['oats', 55, 60, 10, 120, 50],\n     ['banana', 51, 23, 2.6, 30, 50]]],\n   {'class': 'high', 'gi': 61, 'gl': 130.3}],\n  ['generated control 2',\n   [[['juice', 50, 10, 0, 200, 50], ['apple', 36, 14, 2.4, 120, 100], ['oats', 55, 60, 10, 200, 100],\n     ['banana', 51, 23, 2.6, 80, 50]]],\n   {'class': 'high', 'gi': 52, 'gl': 96.7}],\n  ['generated control 3', [[['juice', 50, 10, 0, 80, 100], ['banana', 51, 23, 2.6, 30, 100]]],\n   {'class': 'low', 'gi': 50, 'gl': 7.1}],\n  ['generated control 4', [[['bread', 75, 49, 2.7, 50, 100], ['apple', 36, 14, 2.4, 80, 100]]],\n   {'class': 'high', 'gi': 64, 'gl': 20.7}]]]\nfor label, args, expected in fixtures[N - 1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"A deterministic toy contract stated in full here; it is a bounded teaching model, not an authoritative reference or standards implementation. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"w2-recipe_scaling_and_nutrition-glycemic-load-class-from-exact-load","generated_at":"2026-09-29T14:52:30.255685+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Diabetes-friendly meal planners estimate combined glycemic load from mixed foods.","repair":"Classify exact loads up to and including 10 as low.","root_cause":"The low class excludes its upper bound of 10.","sha256":"0a41bdee33c3c02754449cc3e468f6c092f86ef927d47558feb09bb581452e46","title":"Meal glycemic load: class from exact load · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":43.814,"exit_code":1,"observations":[{"actual":{"class":"high","gi":73,"gl":30.2},"check":"single food","expected":{"class":"high","gi":73,"gl":30.2},"passed":true},{"actual":{"class":"low","gi":50,"gl":10.0},"check":"load exactly ten","expected":{"class":"low","gi":50,"gl":10.0},"passed":true},{"actual":{"class":"low","gi":null,"gl":0.0},"check":"no carbs","expected":{"class":"low","gi":null,"gl":0.0},"passed":true},{"actual":{"class":"low","gi":36,"gl":10.0},"check":"repair check: class from exact load","expected":{"class":"medium","gi":36,"gl":10.0},"passed":false},{"actual":{"class":"high","gi":68,"gl":38.5},"check":"generated control 1","expected":{"class":"high","gi":68,"gl":38.5},"passed":true},{"actual":{"class":"high","gi":45,"gl":21.9},"check":"generated control 2","expected":{"class":"high","gi":45,"gl":21.9},"passed":true},{"actual":{"class":"low","gi":32,"gl":1.2},"check":"generated control 3","expected":{"class":"low","gi":32,"gl":1.2},"passed":true},{"actual":{"class":"medium","gi":48,"gl":17.5},"check":"generated control 4","expected":{"class":"medium","gi":48,"gl":17.5},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"single food\", \"actual\": {\"gi\": 73, \"gl\": 30.2, \"class\": \"high\"}, \"expected\": {\"class\": \"high\", \"gi\": 73, \"gl\": 30.2}, \"passed\": true}, {\"check\": \"load exactly ten\", \"actual\": {\"gi\": 50, \"gl\": 10.0, \"class\": \"low\"}, \"expected\": {\"class\": \"low\", \"gi\": 50, \"gl\": 10.0}, \"passed\": true}, {\"check\": \"no carbs\", \"actual\": {\"gi\": null, \"gl\": 0.0, \"class\": \"low\"}, \"expected\": {\"class\": \"low\", \"gi\": null, \"gl\": 0.0}, \"passed\": true}, {\"check\": \"repair check: class from exact load\", \"actual\": {\"gi\": 36, \"gl\": 10.0, \"class\": \"low\"}, \"expected\": {\"class\": \"medium\", \"gi\": 36, \"gl\": 10.0}, \"passed\": false}, {\"check\": \"generated control 1\", \"actual\": {\"gi\": 68, \"gl\": 38.5, \"class\": \"high\"}, \"expected\": {\"class\": \"high\", \"gi\": 68, \"gl\": 38.5}, \"passed\": true}, {\"check\": \"generated control 2\", \"actual\": {\"gi\": 45, \"gl\": 21.9, \"class\": \"high\"}, \"expected\": {\"class\": \"high\", \"gi\": 45, \"gl\": 21.9}, \"passed\": true}, {\"check\": \"generated control 3\", \"actual\": {\"gi\": 32, \"gl\": 1.2, \"class\": \"low\"}, \"expected\": {\"class\": \"low\", \"gi\": 32, \"gl\": 1.2}, \"passed\": true}, {\"check\": \"generated control 4\", \"actual\": {\"gi\": 48, \"gl\": 17.5, \"class\": \"medium\"}, \"expected\": {\"class\": \"medium\", \"gi\": 48, \"gl\": 17.5}, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":44.397,"exit_code":1,"observations":[{"actual":{"class":"high","gi":73,"gl":30.2},"check":"single food","expected":{"class":"high","gi":73,"gl":30.2},"passed":true},{"actual":{"class":"medium","gi":50,"gl":10.0},"check":"load exactly ten","expected":{"class":"low","gi":50,"gl":10.0},"passed":false},{"actual":{"class":"low","gi":null,"gl":0.0},"check":"no carbs","expected":{"class":"low","gi":null,"gl":0.0},"passed":true},{"actual":{"class":"medium","gi":36,"gl":10.0},"check":"repair check: class from exact load","expected":{"class":"medium","gi":36,"gl":10.0},"passed":true},{"actual":{"class":"high","gi":68,"gl":38.5},"check":"generated control 1","expected":{"class":"high","gi":68,"gl":38.5},"passed":true},{"actual":{"class":"high","gi":45,"gl":21.9},"check":"generated control 2","expected":{"class":"high","gi":45,"gl":21.9},"passed":true},{"actual":{"class":"low","gi":32,"gl":1.2},"check":"generated control 3","expected":{"class":"low","gi":32,"gl":1.2},"passed":true},{"actual":{"class":"medium","gi":48,"gl":17.5},"check":"generated control 4","expected":{"class":"medium","gi":48,"gl":17.5},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"single food\", \"actual\": {\"gi\": 73, \"gl\": 30.2, \"class\": \"high\"}, \"expected\": {\"class\": \"high\", \"gi\": 73, \"gl\": 30.2}, \"passed\": true}, {\"check\": \"load exactly ten\", \"actual\": {\"gi\": 50, \"gl\": 10.0, \"class\": \"medium\"}, \"expected\": {\"class\": \"low\", \"gi\": 50, \"gl\": 10.0}, \"passed\": false}, {\"check\": \"no carbs\", \"actual\": {\"gi\": null, \"gl\": 0.0, \"class\": \"low\"}, \"expected\": {\"class\": \"low\", \"gi\": null, \"gl\": 0.0}, \"passed\": true}, {\"check\": \"repair check: class from exact load\", \"actual\": {\"gi\": 36, \"gl\": 10.0, \"class\": \"medium\"}, \"expected\": {\"class\": \"medium\", \"gi\": 36, \"gl\": 10.0}, \"passed\": true}, {\"check\": \"generated control 1\", \"actual\": {\"gi\": 68, \"gl\": 38.5, \"class\": \"high\"}, \"expected\": {\"class\": \"high\", \"gi\": 68, \"gl\": 38.5}, \"passed\": true}, {\"check\": \"generated control 2\", \"actual\": {\"gi\": 45, \"gl\": 21.9, \"class\": \"high\"}, \"expected\": {\"class\": \"high\", \"gi\": 45, \"gl\": 21.9}, \"passed\": true}, {\"check\": \"generated control 3\", \"actual\": {\"gi\": 32, \"gl\": 1.2, \"class\": \"low\"}, \"expected\": {\"class\": \"low\", \"gi\": 32, \"gl\": 1.2}, \"passed\": true}, {\"check\": \"generated control 4\", \"actual\": {\"gi\": 48, \"gl\": 17.5, \"class\": \"medium\"}, \"expected\": {\"class\": \"medium\", \"gi\": 48, \"gl\": 17.5}, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":44.531,"exit_code":0,"observations":[{"actual":{"class":"high","gi":73,"gl":30.2},"check":"single food","expected":{"class":"high","gi":73,"gl":30.2},"passed":true},{"actual":{"class":"low","gi":50,"gl":10.0},"check":"load exactly ten","expected":{"class":"low","gi":50,"gl":10.0},"passed":true},{"actual":{"class":"low","gi":null,"gl":0.0},"check":"no carbs","expected":{"class":"low","gi":null,"gl":0.0},"passed":true},{"actual":{"class":"medium","gi":36,"gl":10.0},"check":"repair check: class from exact load","expected":{"class":"medium","gi":36,"gl":10.0},"passed":true},{"actual":{"class":"high","gi":68,"gl":38.5},"check":"generated control 1","expected":{"class":"high","gi":68,"gl":38.5},"passed":true},{"actual":{"class":"high","gi":45,"gl":21.9},"check":"generated control 2","expected":{"class":"high","gi":45,"gl":21.9},"passed":true},{"actual":{"class":"low","gi":32,"gl":1.2},"check":"generated control 3","expected":{"class":"low","gi":32,"gl":1.2},"passed":true},{"actual":{"class":"medium","gi":48,"gl":17.5},"check":"generated control 4","expected":{"class":"medium","gi":48,"gl":17.5},"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"single food\", \"actual\": {\"gi\": 73, \"gl\": 30.2, \"class\": \"high\"}, \"expected\": {\"class\": \"high\", \"gi\": 73, \"gl\": 30.2}, \"passed\": true}, {\"check\": \"load exactly ten\", \"actual\": {\"gi\": 50, \"gl\": 10.0, \"class\": \"low\"}, \"expected\": {\"class\": \"low\", \"gi\": 50, \"gl\": 10.0}, \"passed\": true}, {\"check\": \"no carbs\", \"actual\": {\"gi\": null, \"gl\": 0.0, \"class\": \"low\"}, \"expected\": {\"class\": \"low\", \"gi\": null, \"gl\": 0.0}, \"passed\": true}, {\"check\": \"repair check: class from exact load\", \"actual\": {\"gi\": 36, \"gl\": 10.0, \"class\": \"medium\"}, \"expected\": {\"class\": \"medium\", \"gi\": 36, \"gl\": 10.0}, \"passed\": true}, {\"check\": \"generated control 1\", \"actual\": {\"gi\": 68, \"gl\": 38.5, \"class\": \"high\"}, \"expected\": {\"class\": \"high\", \"gi\": 68, \"gl\": 38.5}, \"passed\": true}, {\"check\": \"generated control 2\", \"actual\": {\"gi\": 45, \"gl\": 21.9, \"class\": \"high\"}, \"expected\": {\"class\": \"high\", \"gi\": 45, \"gl\": 21.9}, \"passed\": true}, {\"check\": \"generated control 3\", \"actual\": {\"gi\": 32, \"gl\": 1.2, \"class\": \"low\"}, \"expected\": {\"class\": \"low\", \"gi\": 32, \"gl\": 1.2}, \"passed\": true}, {\"check\": \"generated control 4\", \"actual\": {\"gi\": 48, \"gl\": 17.5, \"class\": \"medium\"}, \"expected\": {\"class\": \"medium\", \"gi\": 48, \"gl\": 17.5}, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}