{"abstract":"100 g of trimmed onion at 80% yield is costed as 80 g purchased.","category":"Recipe scaling and nutrition","checks":8,"contract":"Rows [name, ep_qty, pack_price_cents, pack_size, yield_pct, mode]. Edible portion needs as-purchased ap = ep/(yield/100). mode \"whole\" buys ceil(ap/pack_size) packs at full price; \"bulk\" pays ap/pack_size*price. total_cents = half-up integer of the exact total; per_serving_cents = ceiling of exact total/servings; packs lists whole-pack counts by name.","evaluation_group":"w2-recipe_scaling_and_nutrition-recipe-costing","failed_approach":"Adding the trim percentage of the edible weight under-buys: 100 g at 80% needs 125 g, not 120 g.","family":"w2-recipe_scaling_and_nutrition-recipe-costing-trim-yield-direction","id":"FA-97206","implementations":{"attempt":{"sha256":"39bcaac969876c83fc6d820c237a92ee576f84f3cce01b4ac720a1f49a49f5d8","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(items, servings):\n    total = Fraction(0)\n    packs = {}\n    for name, ep, price, size, y, mode in items:\n        ap = Fraction(ep) + Fraction(ep) * Fraction(100 - y, 100)\n        if mode == 'whole':\n            n = math.ceil(ap / size)\n            packs[name] = n\n            total += n * price\n        else:\n            total += ap / size * price\n    return {'total_cents': math.floor(total + Fraction(1, 2)), 'per_serving_cents': math.ceil(total / servings),\n            'packs': packs}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['exact whole pack', [[['beef', 500, 1200, 500, 100, 'whole']], 4],\n   {'packs': {'beef': 1}, 'per_serving_cents': 300, 'total_cents': 1200}],\n  ['trim loss', [[['onion', 90, 99, 100, 90, 'bulk']], 1],\n   {'packs': {}, 'per_serving_cents': 99, 'total_cents': 99}],\n  ['bulk herbs', [[['herbs', 30, 450, 100, 75, 'bulk']], 3],\n   {'packs': {}, 'per_serving_cents': 60, 'total_cents': 180}],\n  ['regression: trim yield direction',\n   [[['eggs', 400, 450, 1000, 80, 'bulk'], ['onion', 6, 450, 100, 80, 'bulk'],\n     ['cream', 300, 1200, 1000, 80, 'whole'], ['herbs', 250, 249, 100, 75, 'whole']],\n    7],\n   {'packs': {'cream': 1, 'herbs': 4}, 'per_serving_cents': 351, 'total_cents': 2455}],\n  ['repair check: trim yield direction',\n   [[['herbs', 6, 450, 250, 50, 'bulk'], ['eggs', 100, 450, 12, 75, 'bulk'],\n     ['lemon', 6, 249, 100, 100, 'whole']],\n    5],\n   {'packs': {'lemon': 1}, 'per_serving_cents': 1055, 'total_cents': 5271}],\n  ['generated control 1',\n   [[['beef', 100, 450, 1000, 85, 'whole'], ['onion', 100, 450, 100, 80, 'whole'],\n     ['eggs', 900, 249, 250, 100, 'whole'], ['herbs', 6, 99, 250, 100, 'bulk']],\n    5],\n   {'packs': {'beef': 1, 'eggs': 4, 'onion': 2}, 'per_serving_cents': 470, 'total_cents': 2348}],\n  ['generated control 2',\n   [[['eggs', 900, 450, 1000, 85, 'bulk'], ['onion', 900, 249, 1000, 50, 'whole'],\n     ['herbs', 100, 450, 12, 85, 'whole'], ['beef', 250, 99, 12, 75, 'whole']],\n    6],\n   {'packs': {'beef': 28, 'herbs': 10, 'onion': 2}, 'per_serving_cents': 1375, 'total_cents': 8246}],\n  ['generated control 3', [[['onion', 400, 450, 1000, 50, 'bulk'], ['cream', 3, 450, 6, 90, 'whole']], 3],\n   {'packs': {'cream': 1}, 'per_serving_cents': 270, 'total_cents': 810}]],\n [['trim loss', [[['onion', 90, 99, 100, 90, 'bulk']], 1],\n   {'packs': {}, 'per_serving_cents': 99, 'total_cents': 99}],\n  ['bulk herbs', [[['herbs', 30, 450, 100, 75, 'bulk']], 3],\n   {'packs': {}, 'per_serving_cents': 60, 'total_cents': 180}],\n  ['exact whole pack', [[['beef', 500, 1200, 500, 100, 'whole']], 4],\n   {'packs': {'beef': 1}, 'per_serving_cents': 300, 'total_cents': 1200}],\n  ['regression: trim yield direction',\n   [[['herbs', 900, 450, 250, 50, 'bulk'], ['beef', 300, 99, 6, 90, 'bulk'],\n     ['cream', 300, 1200, 12, 85, 'bulk'], ['eggs', 900, 1200, 6, 75, 'bulk']],\n    2],\n   {'packs': {}, 'per_serving_cents': 142018, 'total_cents': 284034}],\n  ['repair check: trim yield direction',\n   [[['eggs', 100, 1200, 12, 75, 'whole'], ['cream', 3, 1200, 250, 80, 'whole'],\n     ['beef', 400, 1200, 1000, 50, 'whole']],\n    6],\n   {'packs': {'beef': 1, 'cream': 1, 'eggs': 12}, 'per_serving_cents': 2800, 'total_cents': 16800}],\n  ['generated control 1',\n   [[['onion', 3, 249, 250, 90, 'whole'], ['cream', 400, 249, 100, 90, 'bulk'],\n     ['beef', 3, 1200, 1000, 50, 'bulk'], ['herbs', 400, 450, 250, 100, 'bulk']],\n    7],\n   {'packs': {'onion': 1}, 'per_serving_cents': 298, 'total_cents': 2083}],\n  ['generated control 2', [[['onion', 100, 99, 500, 75, 'bulk'], ['cream', 6, 450, 500, 85, 'whole']], 6],\n   {'packs': {'cream': 1}, 'per_serving_cents': 80, 'total_cents': 476}],\n  ['generated control 3', [[['herbs', 6, 1200, 500, 100, 'whole'], ['cream', 900, 450, 250, 75, 'bulk']], 3],\n   {'packs': {'herbs': 1}, 'per_serving_cents': 1120, 'total_cents': 3360}]],\n [['bulk herbs', [[['herbs', 30, 450, 100, 75, 'bulk']], 3],\n   {'packs': {}, 'per_serving_cents': 60, 'total_cents': 180}],\n  ['exact whole pack', [[['beef', 500, 1200, 500, 100, 'whole']], 4],\n   {'packs': {'beef': 1}, 'per_serving_cents': 300, 'total_cents': 1200}],\n  ['trim loss', [[['onion', 90, 99, 100, 90, 'bulk']], 1],\n   {'packs': {}, 'per_serving_cents': 99, 'total_cents': 99}],\n  ['regression: trim yield direction',\n   [[['onion', 6, 450, 1000, 90, 'whole'], ['cream', 50, 249, 1000, 90, 'bulk']], 8],\n   {'packs': {'onion': 1}, 'per_serving_cents': 58, 'total_cents': 464}],\n  ['repair check: trim yield direction',\n   [[['herbs', 50, 450, 500, 90, 'whole'], ['eggs', 900, 450, 1000, 85, 'bulk'],\n     ['lemon', 6, 450, 250, 90, 'whole']],\n    7],\n   {'packs': {'herbs': 1, 'lemon': 1}, 'per_serving_cents': 197, 'total_cents': 1376}],\n  ['generated control 1',\n   [[['herbs', 250, 99, 1000, 85, 'whole'], ['lemon', 3, 99, 100, 85, 'whole'],\n     ['eggs', 100, 249, 250, 75, 'bulk'], ['beef', 6, 1200, 1000, 100, 'bulk']],\n    2],\n   {'packs': {'herbs': 1, 'lemon': 1}, 'per_serving_cents': 169, 'total_cents': 338}],\n  ['generated control 2',\n   [[['cream', 6, 450, 12, 50, 'whole'], ['onion', 400, 99, 6, 100, 'whole'],\n     ['beef', 6, 1200, 12, 50, 'bulk'], ['herbs', 50, 249, 12, 90, 'whole']],\n    1],\n   {'packs': {'cream': 1, 'herbs': 5, 'onion': 67}, 'per_serving_cents': 9528, 'total_cents': 9528}],\n  ['generated control 3', [[['beef', 100, 99, 1000, 75, 'bulk']], 7],\n   {'packs': {}, 'per_serving_cents': 2, 'total_cents': 13}]],\n [['exact whole pack', [[['beef', 500, 1200, 500, 100, 'whole']], 4],\n   {'packs': {'beef': 1}, 'per_serving_cents': 300, 'total_cents': 1200}],\n  ['trim loss', [[['onion', 90, 99, 100, 90, 'bulk']], 1],\n   {'packs': {}, 'per_serving_cents': 99, 'total_cents': 99}],\n  ['bulk herbs', [[['herbs', 30, 450, 100, 75, 'bulk']], 3],\n   {'packs': {}, 'per_serving_cents': 60, 'total_cents': 180}],\n  ['regression: trim yield direction',\n   [[['lemon', 250, 1200, 100, 75, 'bulk'], ['cream', 100, 99, 100, 50, 'bulk'],\n     ['herbs', 6, 99, 12, 90, 'bulk']],\n    7],\n   {'packs': {}, 'per_serving_cents': 608, 'total_cents': 4253}],\n  ['repair check: trim yield direction',\n   [[['eggs', 3, 99, 100, 75, 'bulk'], ['herbs', 300, 249, 500, 85, 'whole'],\n     ['lemon', 100, 99, 6, 75, 'bulk']],\n    5],\n   {'packs': {'herbs': 1}, 'per_serving_cents': 491, 'total_cents': 2453}],\n  ['generated control 1', [[['beef', 50, 1200, 100, 90, 'whole'], ['eggs', 100, 249, 500, 100, 'bulk']], 4],\n   {'packs': {'beef': 1}, 'per_serving_cents': 313, 'total_cents': 1250}],\n  ['generated control 2', [[['herbs', 250, 99, 6, 75, 'whole']], 6],\n   {'packs': {'herbs': 56}, 'per_serving_cents': 924, 'total_cents': 5544}],\n  ['generated control 3', [[['herbs', 6, 450, 6, 75, 'whole'], ['cream', 100, 1200, 1000, 100, 'whole']], 1],\n   {'packs': {'cream': 1, 'herbs': 2}, 'per_serving_cents': 2100, 'total_cents': 2100}]],\n [['trim loss', [[['onion', 90, 99, 100, 90, 'bulk']], 1],\n   {'packs': {}, 'per_serving_cents': 99, 'total_cents': 99}],\n  ['bulk herbs', [[['herbs', 30, 450, 100, 75, 'bulk']], 3],\n   {'packs': {}, 'per_serving_cents': 60, 'total_cents': 180}],\n  ['exact whole pack', [[['beef', 500, 1200, 500, 100, 'whole']], 4],\n   {'packs': {'beef': 1}, 'per_serving_cents': 300, 'total_cents': 1200}],\n  ['regression: trim yield direction',\n   [[['herbs', 300, 1200, 500, 50, 'bulk'], ['eggs', 6, 99, 250, 50, 'whole']], 6],\n   {'packs': {'eggs': 1}, 'per_serving_cents': 257, 'total_cents': 1539}],\n  ['repair check: trim yield direction', [[['cream', 900, 249, 12, 50, 'whole']], 8],\n   {'packs': {'cream': 150}, 'per_serving_cents': 4669, 'total_cents': 37350}],\n  ['generated control 1', [[['cream', 250, 99, 100, 100, 'bulk']], 2],\n   {'packs': {}, 'per_serving_cents': 124, 'total_cents': 248}],\n  ['generated control 2',\n   [[['beef', 300, 450, 100, 80, 'whole'], ['herbs', 50, 99, 100, 80, 'whole'],\n     ['onion', 900, 99, 100, 75, 'whole'], ['lemon', 50, 450, 6, 90, 'bulk']],\n    5],\n   {'packs': {'beef': 4, 'herbs': 1, 'onion': 12}, 'per_serving_cents': 1451, 'total_cents': 7254}],\n  ['generated control 3',\n   [[['beef', 900, 249, 12, 75, 'whole'], ['herbs', 3, 249, 6, 90, 'bulk'],\n     ['onion', 6, 249, 250, 90, 'whole']],\n    3],\n   {'packs': {'beef': 100, 'onion': 1}, 'per_serving_cents': 8430, 'total_cents': 25287}]]]\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":"72534e242237d51aee2a52d1c0d97d800bad329f3310e27a387a391c15a32a01","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(items, servings):\n    total = Fraction(0)\n    packs = {}\n    for name, ep, price, size, y, mode in items:\n        ap = Fraction(ep) * Fraction(y, 100)\n        if mode == 'whole':\n            n = math.ceil(ap / size)\n            packs[name] = n\n            total += n * price\n        else:\n            total += ap / size * price\n    return {'total_cents': math.floor(total + Fraction(1, 2)), 'per_serving_cents': math.ceil(total / servings),\n            'packs': packs}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['exact whole pack', [[['beef', 500, 1200, 500, 100, 'whole']], 4],\n   {'packs': {'beef': 1}, 'per_serving_cents': 300, 'total_cents': 1200}],\n  ['trim loss', [[['onion', 90, 99, 100, 90, 'bulk']], 1],\n   {'packs': {}, 'per_serving_cents': 99, 'total_cents': 99}],\n  ['bulk herbs', [[['herbs', 30, 450, 100, 75, 'bulk']], 3],\n   {'packs': {}, 'per_serving_cents': 60, 'total_cents': 180}],\n  ['regression: trim yield direction',\n   [[['eggs', 400, 450, 1000, 80, 'bulk'], ['onion', 6, 450, 100, 80, 'bulk'],\n     ['cream', 300, 1200, 1000, 80, 'whole'], ['herbs', 250, 249, 100, 75, 'whole']],\n    7],\n   {'packs': {'cream': 1, 'herbs': 4}, 'per_serving_cents': 351, 'total_cents': 2455}],\n  ['repair check: trim yield direction',\n   [[['herbs', 6, 450, 250, 50, 'bulk'], ['eggs', 100, 450, 12, 75, 'bulk'],\n     ['lemon', 6, 249, 100, 100, 'whole']],\n    5],\n   {'packs': {'lemon': 1}, 'per_serving_cents': 1055, 'total_cents': 5271}],\n  ['generated control 1',\n   [[['beef', 100, 450, 1000, 85, 'whole'], ['onion', 100, 450, 100, 80, 'whole'],\n     ['eggs', 900, 249, 250, 100, 'whole'], ['herbs', 6, 99, 250, 100, 'bulk']],\n    5],\n   {'packs': {'beef': 1, 'eggs': 4, 'onion': 2}, 'per_serving_cents': 470, 'total_cents': 2348}],\n  ['generated control 2',\n   [[['eggs', 900, 450, 1000, 85, 'bulk'], ['onion', 900, 249, 1000, 50, 'whole'],\n     ['herbs', 100, 450, 12, 85, 'whole'], ['beef', 250, 99, 12, 75, 'whole']],\n    6],\n   {'packs': {'beef': 28, 'herbs': 10, 'onion': 2}, 'per_serving_cents': 1375, 'total_cents': 8246}],\n  ['generated control 3', [[['onion', 400, 450, 1000, 50, 'bulk'], ['cream', 3, 450, 6, 90, 'whole']], 3],\n   {'packs': {'cream': 1}, 'per_serving_cents': 270, 'total_cents': 810}]],\n [['trim loss', [[['onion', 90, 99, 100, 90, 'bulk']], 1],\n   {'packs': {}, 'per_serving_cents': 99, 'total_cents': 99}],\n  ['bulk herbs', [[['herbs', 30, 450, 100, 75, 'bulk']], 3],\n   {'packs': {}, 'per_serving_cents': 60, 'total_cents': 180}],\n  ['exact whole pack', [[['beef', 500, 1200, 500, 100, 'whole']], 4],\n   {'packs': {'beef': 1}, 'per_serving_cents': 300, 'total_cents': 1200}],\n  ['regression: trim yield direction',\n   [[['herbs', 900, 450, 250, 50, 'bulk'], ['beef', 300, 99, 6, 90, 'bulk'],\n     ['cream', 300, 1200, 12, 85, 'bulk'], ['eggs', 900, 1200, 6, 75, 'bulk']],\n    2],\n   {'packs': {}, 'per_serving_cents': 142018, 'total_cents': 284034}],\n  ['repair check: trim yield direction',\n   [[['eggs', 100, 1200, 12, 75, 'whole'], ['cream', 3, 1200, 250, 80, 'whole'],\n     ['beef', 400, 1200, 1000, 50, 'whole']],\n    6],\n   {'packs': {'beef': 1, 'cream': 1, 'eggs': 12}, 'per_serving_cents': 2800, 'total_cents': 16800}],\n  ['generated control 1',\n   [[['onion', 3, 249, 250, 90, 'whole'], ['cream', 400, 249, 100, 90, 'bulk'],\n     ['beef', 3, 1200, 1000, 50, 'bulk'], ['herbs', 400, 450, 250, 100, 'bulk']],\n    7],\n   {'packs': {'onion': 1}, 'per_serving_cents': 298, 'total_cents': 2083}],\n  ['generated control 2', [[['onion', 100, 99, 500, 75, 'bulk'], ['cream', 6, 450, 500, 85, 'whole']], 6],\n   {'packs': {'cream': 1}, 'per_serving_cents': 80, 'total_cents': 476}],\n  ['generated control 3', [[['herbs', 6, 1200, 500, 100, 'whole'], ['cream', 900, 450, 250, 75, 'bulk']], 3],\n   {'packs': {'herbs': 1}, 'per_serving_cents': 1120, 'total_cents': 3360}]],\n [['bulk herbs', [[['herbs', 30, 450, 100, 75, 'bulk']], 3],\n   {'packs': {}, 'per_serving_cents': 60, 'total_cents': 180}],\n  ['exact whole pack', [[['beef', 500, 1200, 500, 100, 'whole']], 4],\n   {'packs': {'beef': 1}, 'per_serving_cents': 300, 'total_cents': 1200}],\n  ['trim loss', [[['onion', 90, 99, 100, 90, 'bulk']], 1],\n   {'packs': {}, 'per_serving_cents': 99, 'total_cents': 99}],\n  ['regression: trim yield direction',\n   [[['onion', 6, 450, 1000, 90, 'whole'], ['cream', 50, 249, 1000, 90, 'bulk']], 8],\n   {'packs': {'onion': 1}, 'per_serving_cents': 58, 'total_cents': 464}],\n  ['repair check: trim yield direction',\n   [[['herbs', 50, 450, 500, 90, 'whole'], ['eggs', 900, 450, 1000, 85, 'bulk'],\n     ['lemon', 6, 450, 250, 90, 'whole']],\n    7],\n   {'packs': {'herbs': 1, 'lemon': 1}, 'per_serving_cents': 197, 'total_cents': 1376}],\n  ['generated control 1',\n   [[['herbs', 250, 99, 1000, 85, 'whole'], ['lemon', 3, 99, 100, 85, 'whole'],\n     ['eggs', 100, 249, 250, 75, 'bulk'], ['beef', 6, 1200, 1000, 100, 'bulk']],\n    2],\n   {'packs': {'herbs': 1, 'lemon': 1}, 'per_serving_cents': 169, 'total_cents': 338}],\n  ['generated control 2',\n   [[['cream', 6, 450, 12, 50, 'whole'], ['onion', 400, 99, 6, 100, 'whole'],\n     ['beef', 6, 1200, 12, 50, 'bulk'], ['herbs', 50, 249, 12, 90, 'whole']],\n    1],\n   {'packs': {'cream': 1, 'herbs': 5, 'onion': 67}, 'per_serving_cents': 9528, 'total_cents': 9528}],\n  ['generated control 3', [[['beef', 100, 99, 1000, 75, 'bulk']], 7],\n   {'packs': {}, 'per_serving_cents': 2, 'total_cents': 13}]],\n [['exact whole pack', [[['beef', 500, 1200, 500, 100, 'whole']], 4],\n   {'packs': {'beef': 1}, 'per_serving_cents': 300, 'total_cents': 1200}],\n  ['trim loss', [[['onion', 90, 99, 100, 90, 'bulk']], 1],\n   {'packs': {}, 'per_serving_cents': 99, 'total_cents': 99}],\n  ['bulk herbs', [[['herbs', 30, 450, 100, 75, 'bulk']], 3],\n   {'packs': {}, 'per_serving_cents': 60, 'total_cents': 180}],\n  ['regression: trim yield direction',\n   [[['lemon', 250, 1200, 100, 75, 'bulk'], ['cream', 100, 99, 100, 50, 'bulk'],\n     ['herbs', 6, 99, 12, 90, 'bulk']],\n    7],\n   {'packs': {}, 'per_serving_cents': 608, 'total_cents': 4253}],\n  ['repair check: trim yield direction',\n   [[['eggs', 3, 99, 100, 75, 'bulk'], ['herbs', 300, 249, 500, 85, 'whole'],\n     ['lemon', 100, 99, 6, 75, 'bulk']],\n    5],\n   {'packs': {'herbs': 1}, 'per_serving_cents': 491, 'total_cents': 2453}],\n  ['generated control 1', [[['beef', 50, 1200, 100, 90, 'whole'], ['eggs', 100, 249, 500, 100, 'bulk']], 4],\n   {'packs': {'beef': 1}, 'per_serving_cents': 313, 'total_cents': 1250}],\n  ['generated control 2', [[['herbs', 250, 99, 6, 75, 'whole']], 6],\n   {'packs': {'herbs': 56}, 'per_serving_cents': 924, 'total_cents': 5544}],\n  ['generated control 3', [[['herbs', 6, 450, 6, 75, 'whole'], ['cream', 100, 1200, 1000, 100, 'whole']], 1],\n   {'packs': {'cream': 1, 'herbs': 2}, 'per_serving_cents': 2100, 'total_cents': 2100}]],\n [['trim loss', [[['onion', 90, 99, 100, 90, 'bulk']], 1],\n   {'packs': {}, 'per_serving_cents': 99, 'total_cents': 99}],\n  ['bulk herbs', [[['herbs', 30, 450, 100, 75, 'bulk']], 3],\n   {'packs': {}, 'per_serving_cents': 60, 'total_cents': 180}],\n  ['exact whole pack', [[['beef', 500, 1200, 500, 100, 'whole']], 4],\n   {'packs': {'beef': 1}, 'per_serving_cents': 300, 'total_cents': 1200}],\n  ['regression: trim yield direction',\n   [[['herbs', 300, 1200, 500, 50, 'bulk'], ['eggs', 6, 99, 250, 50, 'whole']], 6],\n   {'packs': {'eggs': 1}, 'per_serving_cents': 257, 'total_cents': 1539}],\n  ['repair check: trim yield direction', [[['cream', 900, 249, 12, 50, 'whole']], 8],\n   {'packs': {'cream': 150}, 'per_serving_cents': 4669, 'total_cents': 37350}],\n  ['generated control 1', [[['cream', 250, 99, 100, 100, 'bulk']], 2],\n   {'packs': {}, 'per_serving_cents': 124, 'total_cents': 248}],\n  ['generated control 2',\n   [[['beef', 300, 450, 100, 80, 'whole'], ['herbs', 50, 99, 100, 80, 'whole'],\n     ['onion', 900, 99, 100, 75, 'whole'], ['lemon', 50, 450, 6, 90, 'bulk']],\n    5],\n   {'packs': {'beef': 4, 'herbs': 1, 'onion': 12}, 'per_serving_cents': 1451, 'total_cents': 7254}],\n  ['generated control 3',\n   [[['beef', 900, 249, 12, 75, 'whole'], ['herbs', 3, 249, 6, 90, 'bulk'],\n     ['onion', 6, 249, 250, 90, 'whole']],\n    3],\n   {'packs': {'beef': 100, 'onion': 1}, 'per_serving_cents': 8430, 'total_cents': 25287}]]]\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":"6b305fa66388a2c2f20cdd9042fa4044ffd76341f3aed7158921b8fa680ae836","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(items, servings):\n    total = Fraction(0)\n    packs = {}\n    for name, ep, price, size, y, mode in items:\n        ap = Fraction(ep) / Fraction(y, 100)\n        if mode == 'whole':\n            n = math.ceil(ap / size)\n            packs[name] = n\n            total += n * price\n        else:\n            total += ap / size * price\n    return {'total_cents': math.floor(total + Fraction(1, 2)), 'per_serving_cents': math.ceil(total / servings),\n            'packs': packs}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['exact whole pack', [[['beef', 500, 1200, 500, 100, 'whole']], 4],\n   {'packs': {'beef': 1}, 'per_serving_cents': 300, 'total_cents': 1200}],\n  ['trim loss', [[['onion', 90, 99, 100, 90, 'bulk']], 1],\n   {'packs': {}, 'per_serving_cents': 99, 'total_cents': 99}],\n  ['bulk herbs', [[['herbs', 30, 450, 100, 75, 'bulk']], 3],\n   {'packs': {}, 'per_serving_cents': 60, 'total_cents': 180}],\n  ['regression: trim yield direction',\n   [[['eggs', 400, 450, 1000, 80, 'bulk'], ['onion', 6, 450, 100, 80, 'bulk'],\n     ['cream', 300, 1200, 1000, 80, 'whole'], ['herbs', 250, 249, 100, 75, 'whole']],\n    7],\n   {'packs': {'cream': 1, 'herbs': 4}, 'per_serving_cents': 351, 'total_cents': 2455}],\n  ['repair check: trim yield direction',\n   [[['herbs', 6, 450, 250, 50, 'bulk'], ['eggs', 100, 450, 12, 75, 'bulk'],\n     ['lemon', 6, 249, 100, 100, 'whole']],\n    5],\n   {'packs': {'lemon': 1}, 'per_serving_cents': 1055, 'total_cents': 5271}],\n  ['generated control 1',\n   [[['beef', 100, 450, 1000, 85, 'whole'], ['onion', 100, 450, 100, 80, 'whole'],\n     ['eggs', 900, 249, 250, 100, 'whole'], ['herbs', 6, 99, 250, 100, 'bulk']],\n    5],\n   {'packs': {'beef': 1, 'eggs': 4, 'onion': 2}, 'per_serving_cents': 470, 'total_cents': 2348}],\n  ['generated control 2',\n   [[['eggs', 900, 450, 1000, 85, 'bulk'], ['onion', 900, 249, 1000, 50, 'whole'],\n     ['herbs', 100, 450, 12, 85, 'whole'], ['beef', 250, 99, 12, 75, 'whole']],\n    6],\n   {'packs': {'beef': 28, 'herbs': 10, 'onion': 2}, 'per_serving_cents': 1375, 'total_cents': 8246}],\n  ['generated control 3', [[['onion', 400, 450, 1000, 50, 'bulk'], ['cream', 3, 450, 6, 90, 'whole']], 3],\n   {'packs': {'cream': 1}, 'per_serving_cents': 270, 'total_cents': 810}]],\n [['trim loss', [[['onion', 90, 99, 100, 90, 'bulk']], 1],\n   {'packs': {}, 'per_serving_cents': 99, 'total_cents': 99}],\n  ['bulk herbs', [[['herbs', 30, 450, 100, 75, 'bulk']], 3],\n   {'packs': {}, 'per_serving_cents': 60, 'total_cents': 180}],\n  ['exact whole pack', [[['beef', 500, 1200, 500, 100, 'whole']], 4],\n   {'packs': {'beef': 1}, 'per_serving_cents': 300, 'total_cents': 1200}],\n  ['regression: trim yield direction',\n   [[['herbs', 900, 450, 250, 50, 'bulk'], ['beef', 300, 99, 6, 90, 'bulk'],\n     ['cream', 300, 1200, 12, 85, 'bulk'], ['eggs', 900, 1200, 6, 75, 'bulk']],\n    2],\n   {'packs': {}, 'per_serving_cents': 142018, 'total_cents': 284034}],\n  ['repair check: trim yield direction',\n   [[['eggs', 100, 1200, 12, 75, 'whole'], ['cream', 3, 1200, 250, 80, 'whole'],\n     ['beef', 400, 1200, 1000, 50, 'whole']],\n    6],\n   {'packs': {'beef': 1, 'cream': 1, 'eggs': 12}, 'per_serving_cents': 2800, 'total_cents': 16800}],\n  ['generated control 1',\n   [[['onion', 3, 249, 250, 90, 'whole'], ['cream', 400, 249, 100, 90, 'bulk'],\n     ['beef', 3, 1200, 1000, 50, 'bulk'], ['herbs', 400, 450, 250, 100, 'bulk']],\n    7],\n   {'packs': {'onion': 1}, 'per_serving_cents': 298, 'total_cents': 2083}],\n  ['generated control 2', [[['onion', 100, 99, 500, 75, 'bulk'], ['cream', 6, 450, 500, 85, 'whole']], 6],\n   {'packs': {'cream': 1}, 'per_serving_cents': 80, 'total_cents': 476}],\n  ['generated control 3', [[['herbs', 6, 1200, 500, 100, 'whole'], ['cream', 900, 450, 250, 75, 'bulk']], 3],\n   {'packs': {'herbs': 1}, 'per_serving_cents': 1120, 'total_cents': 3360}]],\n [['bulk herbs', [[['herbs', 30, 450, 100, 75, 'bulk']], 3],\n   {'packs': {}, 'per_serving_cents': 60, 'total_cents': 180}],\n  ['exact whole pack', [[['beef', 500, 1200, 500, 100, 'whole']], 4],\n   {'packs': {'beef': 1}, 'per_serving_cents': 300, 'total_cents': 1200}],\n  ['trim loss', [[['onion', 90, 99, 100, 90, 'bulk']], 1],\n   {'packs': {}, 'per_serving_cents': 99, 'total_cents': 99}],\n  ['regression: trim yield direction',\n   [[['onion', 6, 450, 1000, 90, 'whole'], ['cream', 50, 249, 1000, 90, 'bulk']], 8],\n   {'packs': {'onion': 1}, 'per_serving_cents': 58, 'total_cents': 464}],\n  ['repair check: trim yield direction',\n   [[['herbs', 50, 450, 500, 90, 'whole'], ['eggs', 900, 450, 1000, 85, 'bulk'],\n     ['lemon', 6, 450, 250, 90, 'whole']],\n    7],\n   {'packs': {'herbs': 1, 'lemon': 1}, 'per_serving_cents': 197, 'total_cents': 1376}],\n  ['generated control 1',\n   [[['herbs', 250, 99, 1000, 85, 'whole'], ['lemon', 3, 99, 100, 85, 'whole'],\n     ['eggs', 100, 249, 250, 75, 'bulk'], ['beef', 6, 1200, 1000, 100, 'bulk']],\n    2],\n   {'packs': {'herbs': 1, 'lemon': 1}, 'per_serving_cents': 169, 'total_cents': 338}],\n  ['generated control 2',\n   [[['cream', 6, 450, 12, 50, 'whole'], ['onion', 400, 99, 6, 100, 'whole'],\n     ['beef', 6, 1200, 12, 50, 'bulk'], ['herbs', 50, 249, 12, 90, 'whole']],\n    1],\n   {'packs': {'cream': 1, 'herbs': 5, 'onion': 67}, 'per_serving_cents': 9528, 'total_cents': 9528}],\n  ['generated control 3', [[['beef', 100, 99, 1000, 75, 'bulk']], 7],\n   {'packs': {}, 'per_serving_cents': 2, 'total_cents': 13}]],\n [['exact whole pack', [[['beef', 500, 1200, 500, 100, 'whole']], 4],\n   {'packs': {'beef': 1}, 'per_serving_cents': 300, 'total_cents': 1200}],\n  ['trim loss', [[['onion', 90, 99, 100, 90, 'bulk']], 1],\n   {'packs': {}, 'per_serving_cents': 99, 'total_cents': 99}],\n  ['bulk herbs', [[['herbs', 30, 450, 100, 75, 'bulk']], 3],\n   {'packs': {}, 'per_serving_cents': 60, 'total_cents': 180}],\n  ['regression: trim yield direction',\n   [[['lemon', 250, 1200, 100, 75, 'bulk'], ['cream', 100, 99, 100, 50, 'bulk'],\n     ['herbs', 6, 99, 12, 90, 'bulk']],\n    7],\n   {'packs': {}, 'per_serving_cents': 608, 'total_cents': 4253}],\n  ['repair check: trim yield direction',\n   [[['eggs', 3, 99, 100, 75, 'bulk'], ['herbs', 300, 249, 500, 85, 'whole'],\n     ['lemon', 100, 99, 6, 75, 'bulk']],\n    5],\n   {'packs': {'herbs': 1}, 'per_serving_cents': 491, 'total_cents': 2453}],\n  ['generated control 1', [[['beef', 50, 1200, 100, 90, 'whole'], ['eggs', 100, 249, 500, 100, 'bulk']], 4],\n   {'packs': {'beef': 1}, 'per_serving_cents': 313, 'total_cents': 1250}],\n  ['generated control 2', [[['herbs', 250, 99, 6, 75, 'whole']], 6],\n   {'packs': {'herbs': 56}, 'per_serving_cents': 924, 'total_cents': 5544}],\n  ['generated control 3', [[['herbs', 6, 450, 6, 75, 'whole'], ['cream', 100, 1200, 1000, 100, 'whole']], 1],\n   {'packs': {'cream': 1, 'herbs': 2}, 'per_serving_cents': 2100, 'total_cents': 2100}]],\n [['trim loss', [[['onion', 90, 99, 100, 90, 'bulk']], 1],\n   {'packs': {}, 'per_serving_cents': 99, 'total_cents': 99}],\n  ['bulk herbs', [[['herbs', 30, 450, 100, 75, 'bulk']], 3],\n   {'packs': {}, 'per_serving_cents': 60, 'total_cents': 180}],\n  ['exact whole pack', [[['beef', 500, 1200, 500, 100, 'whole']], 4],\n   {'packs': {'beef': 1}, 'per_serving_cents': 300, 'total_cents': 1200}],\n  ['regression: trim yield direction',\n   [[['herbs', 300, 1200, 500, 50, 'bulk'], ['eggs', 6, 99, 250, 50, 'whole']], 6],\n   {'packs': {'eggs': 1}, 'per_serving_cents': 257, 'total_cents': 1539}],\n  ['repair check: trim yield direction', [[['cream', 900, 249, 12, 50, 'whole']], 8],\n   {'packs': {'cream': 150}, 'per_serving_cents': 4669, 'total_cents': 37350}],\n  ['generated control 1', [[['cream', 250, 99, 100, 100, 'bulk']], 2],\n   {'packs': {}, 'per_serving_cents': 124, 'total_cents': 248}],\n  ['generated control 2',\n   [[['beef', 300, 450, 100, 80, 'whole'], ['herbs', 50, 99, 100, 80, 'whole'],\n     ['onion', 900, 99, 100, 75, 'whole'], ['lemon', 50, 450, 6, 90, 'bulk']],\n    5],\n   {'packs': {'beef': 4, 'herbs': 1, 'onion': 12}, 'per_serving_cents': 1451, 'total_cents': 7254}],\n  ['generated control 3',\n   [[['beef', 900, 249, 12, 75, 'whole'], ['herbs', 3, 249, 6, 90, 'bulk'],\n     ['onion', 6, 249, 250, 90, 'whole']],\n    3],\n   {'packs': {'beef': 100, 'onion': 1}, 'per_serving_cents': 8430, 'total_cents': 25287}]]]\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-recipe-costing-trim-yield-direction","generated_at":"2026-09-29T14:52:29.886425+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Menu costing converts trimmed edible quantities to purchase quantities and rounds purchases to packs.","repair":"Divide edible portion by the yield fraction.","root_cause":"The yield percentage multiplies the edible portion instead of dividing it.","sha256":"6da6392a93e23a8887dc14ff2ddf05106b43870e6a7ea2d156189cb3b6761b75","title":"Recipe cost per serving: trim yield direction · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":46.596,"exit_code":1,"observations":[{"actual":{"packs":{"beef":1},"per_serving_cents":300,"total_cents":1200},"check":"exact whole pack","expected":{"packs":{"beef":1},"per_serving_cents":300,"total_cents":1200},"passed":true},{"actual":{"packs":{},"per_serving_cents":99,"total_cents":98},"check":"trim loss","expected":{"packs":{},"per_serving_cents":99,"total_cents":99},"passed":false},{"actual":{"packs":{},"per_serving_cents":57,"total_cents":169},"check":"bulk herbs","expected":{"packs":{},"per_serving_cents":60,"total_cents":180},"passed":false},{"actual":{"packs":{"cream":1,"herbs":4},"per_serving_cents":350,"total_cents":2444},"check":"regression: trim yield direction","expected":{"packs":{"cream":1,"herbs":4},"per_serving_cents":351,"total_cents":2455},"passed":false},{"actual":{"packs":{"lemon":1},"per_serving_cents":991,"total_cents":4953},"check":"repair check: trim yield direction","expected":{"packs":{"lemon":1},"per_serving_cents":1055,"total_cents":5271},"passed":false},{"actual":{"packs":{"beef":1,"eggs":4,"onion":2},"per_serving_cents":470,"total_cents":2348},"check":"generated control 1","expected":{"packs":{"beef":1,"eggs":4,"onion":2},"per_serving_cents":470,"total_cents":2348},"passed":true},{"actual":{"packs":{"beef":27,"herbs":10,"onion":2},"per_serving_cents":1357,"total_cents":8137},"check":"generated control 2","expected":{"packs":{"beef":28,"herbs":10,"onion":2},"per_serving_cents":1375,"total_cents":8246},"passed":false},{"actual":{"packs":{"cream":1},"per_serving_cents":240,"total_cents":720},"check":"generated control 3","expected":{"packs":{"cream":1},"per_serving_cents":270,"total_cents":810},"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"exact whole pack\", \"actual\": {\"total_cents\": 1200, \"per_serving_cents\": 300, \"packs\": {\"beef\": 1}}, \"expected\": {\"packs\": {\"beef\": 1}, \"per_serving_cents\": 300, \"total_cents\": 1200}, \"passed\": true}, {\"check\": \"trim loss\", \"actual\": {\"total_cents\": 98, \"per_serving_cents\": 99, \"packs\": {}}, \"expected\": {\"packs\": {}, \"per_serving_cents\": 99, \"total_cents\": 99}, \"passed\": false}, {\"check\": \"bulk herbs\", \"actual\": {\"total_cents\": 169, \"per_serving_cents\": 57, \"packs\": {}}, \"expected\": {\"packs\": {}, \"per_serving_cents\": 60, \"total_cents\": 180}, \"passed\": false}, {\"check\": \"regression: trim yield direction\", \"actual\": {\"total_cents\": 2444, \"per_serving_cents\": 350, \"packs\": {\"cream\": 1, \"herbs\": 4}}, \"expected\": {\"packs\": {\"cream\": 1, \"herbs\": 4}, \"per_serving_cents\": 351, \"total_cents\": 2455}, \"passed\": false}, {\"check\": \"repair check: trim yield direction\", \"actual\": {\"total_cents\": 4953, \"per_serving_cents\": 991, \"packs\": {\"lemon\": 1}}, \"expected\": {\"packs\": {\"lemon\": 1}, \"per_serving_cents\": 1055, \"total_cents\": 5271}, \"passed\": false}, {\"check\": \"generated control 1\", \"actual\": {\"total_cents\": 2348, \"per_serving_cents\": 470, \"packs\": {\"beef\": 1, \"onion\": 2, \"eggs\": 4}}, \"expected\": {\"packs\": {\"beef\": 1, \"eggs\": 4, \"onion\": 2}, \"per_serving_cents\": 470, \"total_cents\": 2348}, \"passed\": true}, {\"check\": \"generated control 2\", \"actual\": {\"total_cents\": 8137, \"per_serving_cents\": 1357, \"packs\": {\"onion\": 2, \"herbs\": 10, \"beef\": 27}}, \"expected\": {\"packs\": {\"beef\": 28, \"herbs\": 10, \"onion\": 2}, \"per_serving_cents\": 1375, \"total_cents\": 8246}, \"passed\": false}, {\"check\": \"generated control 3\", \"actual\": {\"total_cents\": 720, \"per_serving_cents\": 240, \"packs\": {\"cream\": 1}}, \"expected\": {\"packs\": {\"cream\": 1}, \"per_serving_cents\": 270, \"total_cents\": 810}, \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":44.769,"exit_code":1,"observations":[{"actual":{"packs":{"beef":1},"per_serving_cents":300,"total_cents":1200},"check":"exact whole pack","expected":{"packs":{"beef":1},"per_serving_cents":300,"total_cents":1200},"passed":true},{"actual":{"packs":{},"per_serving_cents":81,"total_cents":80},"check":"trim loss","expected":{"packs":{},"per_serving_cents":99,"total_cents":99},"passed":false},{"actual":{"packs":{},"per_serving_cents":34,"total_cents":101},"check":"bulk herbs","expected":{"packs":{},"per_serving_cents":60,"total_cents":180},"passed":false},{"actual":{"packs":{"cream":1,"herbs":2},"per_serving_cents":267,"total_cents":1864},"check":"regression: trim yield direction","expected":{"packs":{"cream":1,"herbs":4},"per_serving_cents":351,"total_cents":2455},"passed":false},{"actual":{"packs":{"lemon":1},"per_serving_cents":614,"total_cents":3067},"check":"repair check: trim yield direction","expected":{"packs":{"lemon":1},"per_serving_cents":1055,"total_cents":5271},"passed":false},{"actual":{"packs":{"beef":1,"eggs":4,"onion":1},"per_serving_cents":380,"total_cents":1898},"check":"generated control 1","expected":{"packs":{"beef":1,"eggs":4,"onion":2},"per_serving_cents":470,"total_cents":2348},"passed":false},{"actual":{"packs":{"beef":16,"herbs":8,"onion":1},"per_serving_cents":963,"total_cents":5777},"check":"generated control 2","expected":{"packs":{"beef":28,"herbs":10,"onion":2},"per_serving_cents":1375,"total_cents":8246},"passed":false},{"actual":{"packs":{"cream":1},"per_serving_cents":180,"total_cents":540},"check":"generated control 3","expected":{"packs":{"cream":1},"per_serving_cents":270,"total_cents":810},"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"exact whole pack\", \"actual\": {\"total_cents\": 1200, \"per_serving_cents\": 300, \"packs\": {\"beef\": 1}}, \"expected\": {\"packs\": {\"beef\": 1}, \"per_serving_cents\": 300, \"total_cents\": 1200}, \"passed\": true}, {\"check\": \"trim loss\", \"actual\": {\"total_cents\": 80, \"per_serving_cents\": 81, \"packs\": {}}, \"expected\": {\"packs\": {}, \"per_serving_cents\": 99, \"total_cents\": 99}, \"passed\": false}, {\"check\": \"bulk herbs\", \"actual\": {\"total_cents\": 101, \"per_serving_cents\": 34, \"packs\": {}}, \"expected\": {\"packs\": {}, \"per_serving_cents\": 60, \"total_cents\": 180}, \"passed\": false}, {\"check\": \"regression: trim yield direction\", \"actual\": {\"total_cents\": 1864, \"per_serving_cents\": 267, \"packs\": {\"cream\": 1, \"herbs\": 2}}, \"expected\": {\"packs\": {\"cream\": 1, \"herbs\": 4}, \"per_serving_cents\": 351, \"total_cents\": 2455}, \"passed\": false}, {\"check\": \"repair check: trim yield direction\", \"actual\": {\"total_cents\": 3067, \"per_serving_cents\": 614, \"packs\": {\"lemon\": 1}}, \"expected\": {\"packs\": {\"lemon\": 1}, \"per_serving_cents\": 1055, \"total_cents\": 5271}, \"passed\": false}, {\"check\": \"generated control 1\", \"actual\": {\"total_cents\": 1898, \"per_serving_cents\": 380, \"packs\": {\"beef\": 1, \"onion\": 1, \"eggs\": 4}}, \"expected\": {\"packs\": {\"beef\": 1, \"eggs\": 4, \"onion\": 2}, \"per_serving_cents\": 470, \"total_cents\": 2348}, \"passed\": false}, {\"check\": \"generated control 2\", \"actual\": {\"total_cents\": 5777, \"per_serving_cents\": 963, \"packs\": {\"onion\": 1, \"herbs\": 8, \"beef\": 16}}, \"expected\": {\"packs\": {\"beef\": 28, \"herbs\": 10, \"onion\": 2}, \"per_serving_cents\": 1375, \"total_cents\": 8246}, \"passed\": false}, {\"check\": \"generated control 3\", \"actual\": {\"total_cents\": 540, \"per_serving_cents\": 180, \"packs\": {\"cream\": 1}}, \"expected\": {\"packs\": {\"cream\": 1}, \"per_serving_cents\": 270, \"total_cents\": 810}, \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":50.108,"exit_code":0,"observations":[{"actual":{"packs":{"beef":1},"per_serving_cents":300,"total_cents":1200},"check":"exact whole pack","expected":{"packs":{"beef":1},"per_serving_cents":300,"total_cents":1200},"passed":true},{"actual":{"packs":{},"per_serving_cents":99,"total_cents":99},"check":"trim loss","expected":{"packs":{},"per_serving_cents":99,"total_cents":99},"passed":true},{"actual":{"packs":{},"per_serving_cents":60,"total_cents":180},"check":"bulk herbs","expected":{"packs":{},"per_serving_cents":60,"total_cents":180},"passed":true},{"actual":{"packs":{"cream":1,"herbs":4},"per_serving_cents":351,"total_cents":2455},"check":"regression: trim yield direction","expected":{"packs":{"cream":1,"herbs":4},"per_serving_cents":351,"total_cents":2455},"passed":true},{"actual":{"packs":{"lemon":1},"per_serving_cents":1055,"total_cents":5271},"check":"repair check: trim yield direction","expected":{"packs":{"lemon":1},"per_serving_cents":1055,"total_cents":5271},"passed":true},{"actual":{"packs":{"beef":1,"eggs":4,"onion":2},"per_serving_cents":470,"total_cents":2348},"check":"generated control 1","expected":{"packs":{"beef":1,"eggs":4,"onion":2},"per_serving_cents":470,"total_cents":2348},"passed":true},{"actual":{"packs":{"beef":28,"herbs":10,"onion":2},"per_serving_cents":1375,"total_cents":8246},"check":"generated control 2","expected":{"packs":{"beef":28,"herbs":10,"onion":2},"per_serving_cents":1375,"total_cents":8246},"passed":true},{"actual":{"packs":{"cream":1},"per_serving_cents":270,"total_cents":810},"check":"generated control 3","expected":{"packs":{"cream":1},"per_serving_cents":270,"total_cents":810},"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"exact whole pack\", \"actual\": {\"total_cents\": 1200, \"per_serving_cents\": 300, \"packs\": {\"beef\": 1}}, \"expected\": {\"packs\": {\"beef\": 1}, \"per_serving_cents\": 300, \"total_cents\": 1200}, \"passed\": true}, {\"check\": \"trim loss\", \"actual\": {\"total_cents\": 99, \"per_serving_cents\": 99, \"packs\": {}}, \"expected\": {\"packs\": {}, \"per_serving_cents\": 99, \"total_cents\": 99}, \"passed\": true}, {\"check\": \"bulk herbs\", \"actual\": {\"total_cents\": 180, \"per_serving_cents\": 60, \"packs\": {}}, \"expected\": {\"packs\": {}, \"per_serving_cents\": 60, \"total_cents\": 180}, \"passed\": true}, {\"check\": \"regression: trim yield direction\", \"actual\": {\"total_cents\": 2455, \"per_serving_cents\": 351, \"packs\": {\"cream\": 1, \"herbs\": 4}}, \"expected\": {\"packs\": {\"cream\": 1, \"herbs\": 4}, \"per_serving_cents\": 351, \"total_cents\": 2455}, \"passed\": true}, {\"check\": \"repair check: trim yield direction\", \"actual\": {\"total_cents\": 5271, \"per_serving_cents\": 1055, \"packs\": {\"lemon\": 1}}, \"expected\": {\"packs\": {\"lemon\": 1}, \"per_serving_cents\": 1055, \"total_cents\": 5271}, \"passed\": true}, {\"check\": \"generated control 1\", \"actual\": {\"total_cents\": 2348, \"per_serving_cents\": 470, \"packs\": {\"beef\": 1, \"onion\": 2, \"eggs\": 4}}, \"expected\": {\"packs\": {\"beef\": 1, \"eggs\": 4, \"onion\": 2}, \"per_serving_cents\": 470, \"total_cents\": 2348}, \"passed\": true}, {\"check\": \"generated control 2\", \"actual\": {\"total_cents\": 8246, \"per_serving_cents\": 1375, \"packs\": {\"onion\": 2, \"herbs\": 10, \"beef\": 28}}, \"expected\": {\"packs\": {\"beef\": 28, \"herbs\": 10, \"onion\": 2}, \"per_serving_cents\": 1375, \"total_cents\": 8246}, \"passed\": true}, {\"check\": \"generated control 3\", \"actual\": {\"total_cents\": 810, \"per_serving_cents\": 270, \"packs\": {\"cream\": 1}}, \"expected\": {\"packs\": {\"cream\": 1}, \"per_serving_cents\": 270, \"total_cents\": 810}, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}