{"abstract":"Salt and spices come out at three quarters of even the unscaled amount.","category":"Recipe scaling and nutrition","checks":8,"contract":"Scale [name, qty, unit, kind] rows from base to target servings. Factor f=target/base (both must be positive, else an error string). Seasoning rows scale by 1+(f-1)*3/4 (damped); other rows by f. Unit \"each\" rounds half-up to an integer with a floor of 1. Other units round half-up to the nearest 1/8 and print as reduced kitchen fractions (\"1 1/2\", \"3/4\", \"2\"); a zero result prints \"pinch\".","contract_signature":"items, base, target","evaluation_group":"w2-recipe_scaling_and_nutrition-servings-scaler","failed_approach":"Applying the damping only on scale-ups leaves scale-downs linear, so reduced batches lose too much seasoning.","family":"w2-recipe_scaling_and_nutrition-servings-scaler-seasoning-damping","id":"FA-96846","implementations":{"attempt":{"sha256":"958fffacdad95c7fda334356be7dc40f2f37fea902c6cb47c4c492156bee999e","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(items, base, target):\n    if base <= 0 or target <= 0:\n        return 'error: servings must be positive'\n    f = Fraction(target, base)\n    def fmt(e):\n        if e == 0:\n            return 'pinch'\n        whole, rem = divmod(e, 8)\n        if rem == 0:\n            return str(whole)\n        g = math.gcd(rem, 8)\n        frac = '%d/%d' % (rem // g, 8 // g)\n        return frac if whole == 0 else '%d %s' % (whole, frac)\n    out = []\n    for name, qty, unit, kind in items:\n        q = Fraction(qty)\n        if kind == 'seasoning':\n            s = q * (1 + (f - 1) * Fraction(3, 4)) if f > 1 else q * f\n        else:\n            s = q * f\n        if unit == 'each':\n            n = int(s) + (1 if s - int(s) >= Fraction(1, 2) else 0)\n            out.append([name, str(max(1, n)), unit])\n        else:\n            e = int(s * 8 + Fraction(1, 2))\n            out.append([name, fmt(e), unit])\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['identity scaling control', [[['egg', '2', 'each', 'base'], ['flour', '3/2', 'cup', 'base']], 4, 4],\n   [['egg', '2', 'each'], ['flour', '1 1/2', 'cup']]],\n  ['zero servings rejected', [[['egg', '2', 'each', 'base']], 0, 4], 'error: servings must be positive'],\n  ['double batch with seasoning', [[['salt', '1', 'tsp', 'seasoning'], ['egg', '3', 'each', 'base']], 4, 8],\n   [['salt', '1 3/4', 'tsp'], ['egg', '6', 'each']]],\n  ['regression: seasoning damping',\n   [[['butter', '3/2', 'tbsp', 'base'], ['cumin', '1', 'tsp', 'seasoning'], ['flour', '9/4', 'cup', 'base']],\n    1, 4],\n   [['butter', '6', 'tbsp'], ['cumin', '3 1/4', 'tsp'], ['flour', '9', 'cup']]],\n  ['repair check: seasoning damping',\n   [[['butter', '1/2', 'tbsp', 'base'], ['garlic clove', '1/2', 'each', 'base'],\n     ['cumin', '2/3', 'tsp', 'seasoning']],\n    8, 1],\n   [['butter', '1/8', 'tbsp'], ['garlic clove', '1', 'each'], ['cumin', '1/4', 'tsp']]],\n  ['generated control 1', [[['flour', '2/3', 'cup', 'base'], ['milk', '9/4', 'cup', 'base']], 1, 5],\n   [['flour', '3 3/8', 'cup'], ['milk', '11 1/4', 'cup']]],\n  ['generated control 2', [[['flour', '1/4', 'cup', 'base'], ['lime', '1', 'each', 'base']], 4, 2],\n   [['flour', '1/8', 'cup'], ['lime', '1', 'each']]],\n  ['generated control 3',\n   [[['garlic clove', '1/2', 'each', 'base'], ['egg', '5', 'each', 'base'], ['butter', '1/2', 'tbsp', 'base'],\n     ['lime', '1', 'each', 'base'], ['cumin', '1/4', 'tsp', 'seasoning']],\n    1, 2],\n   [['garlic clove', '1', 'each'], ['egg', '10', 'each'], ['butter', '1', 'tbsp'], ['lime', '2', 'each'],\n    ['cumin', '1/2', 'tsp']]]],\n [['zero servings rejected', [[['egg', '2', 'each', 'base']], 0, 4], 'error: servings must be positive'],\n  ['double batch with seasoning', [[['salt', '1', 'tsp', 'seasoning'], ['egg', '3', 'each', 'base']], 4, 8],\n   [['salt', '1 3/4', 'tsp'], ['egg', '6', 'each']]],\n  ['tiny scale-down to pinch', [[['cumin', '1/8', 'tsp', 'base'], ['egg', '1', 'each', 'base']], 8, 1],\n   [['cumin', 'pinch', 'tsp'], ['egg', '1', 'each']]],\n  ['regression: seasoning damping',\n   [[['pepper', '5/2', 'tsp', 'seasoning'], ['egg', '1', 'each', 'base'],\n     ['garlic clove', '4', 'each', 'base']],\n    5, 1],\n   [['pepper', '1', 'tsp'], ['egg', '1', 'each'], ['garlic clove', '1', 'each']]],\n  ['repair check: seasoning damping',\n   [[['flour', '9/4', 'cup', 'base'], ['cumin', '1/8', 'tsp', 'seasoning'], ['egg', '3', 'each', 'base'],\n     ['lime', '2', 'each', 'base'], ['milk', '1/8', 'cup', 'base']],\n    6, 2],\n   [['flour', '3/4', 'cup'], ['cumin', '1/8', 'tsp'], ['egg', '1', 'each'], ['lime', '1', 'each'],\n    ['milk', 'pinch', 'cup']]],\n  ['generated control 1', [[['lime', '3', 'each', 'base'], ['butter', '3', 'tbsp', 'base']], 4, 11],\n   [['lime', '8', 'each'], ['butter', '8 1/4', 'tbsp']]],\n  ['generated control 2',\n   [[['garlic clove', '1', 'each', 'base'], ['milk', '2', 'cup', 'base'], ['lime', '4', 'each', 'base'],\n     ['cumin', '1/8', 'tsp', 'seasoning'], ['butter', '1/8', 'tbsp', 'base']],\n    2, 1],\n   [['garlic clove', '1', 'each'], ['milk', '1', 'cup'], ['lime', '2', 'each'], ['cumin', '1/8', 'tsp'],\n    ['butter', '1/8', 'tbsp']]],\n  ['generated control 3',\n   [[['cumin', '1/2', 'tsp', 'seasoning'], ['flour', '2', 'cup', 'base'], ['egg', '3', 'each', 'base']], 8,\n    9],\n   [['cumin', '1/2', 'tsp'], ['flour', '2 1/4', 'cup'], ['egg', '3', 'each']]]],\n [['double batch with seasoning', [[['salt', '1', 'tsp', 'seasoning'], ['egg', '3', 'each', 'base']], 4, 8],\n   [['salt', '1 3/4', 'tsp'], ['egg', '6', 'each']]],\n  ['tiny scale-down to pinch', [[['cumin', '1/8', 'tsp', 'base'], ['egg', '1', 'each', 'base']], 8, 1],\n   [['cumin', 'pinch', 'tsp'], ['egg', '1', 'each']]],\n  ['half egg rounds up', [[['egg', '3', 'each', 'base'], ['milk', '1/2', 'cup', 'base']], 4, 6],\n   [['egg', '5', 'each'], ['milk', '3/4', 'cup']]],\n  ['regression: seasoning damping',\n   [[['egg', '2', 'each', 'base'], ['cumin', '1/3', 'tsp', 'seasoning'], ['salt', '1/4', 'tsp', 'seasoning'],\n     ['butter', '3/2', 'tbsp', 'base'], ['garlic clove', '5', 'each', 'base']],\n    4, 12],\n   [['egg', '6', 'each'], ['cumin', '7/8', 'tsp'], ['salt', '5/8', 'tsp'], ['butter', '4 1/2', 'tbsp'],\n    ['garlic clove', '15', 'each']]],\n  ['repair check: seasoning damping',\n   [[['cumin', '5/2', 'tsp', 'seasoning'], ['lime', '1/2', 'each', 'base'], ['flour', '3', 'cup', 'base'],\n     ['pepper', '1/8', 'tsp', 'seasoning'], ['egg', '5', 'each', 'base']],\n    8, 5],\n   [['cumin', '1 3/4', 'tsp'], ['lime', '1', 'each'], ['flour', '1 7/8', 'cup'], ['pepper', '1/8', 'tsp'],\n    ['egg', '3', 'each']]],\n  ['generated control 1', [[['egg', '1', 'each', 'base'], ['butter', '1', 'tbsp', 'base']], 6, 12],\n   [['egg', '2', 'each'], ['butter', '2', 'tbsp']]],\n  ['generated control 2',\n   [[['butter', '1/8', 'tbsp', 'base'], ['garlic clove', '1/2', 'each', 'base'],\n     ['flour', '3/2', 'cup', 'base']],\n    4, 12],\n   [['butter', '3/8', 'tbsp'], ['garlic clove', '2', 'each'], ['flour', '4 1/2', 'cup']]],\n  ['generated control 3',\n   [[['pepper', '5/2', 'tsp', 'seasoning'], ['flour', '2', 'cup', 'base'], ['egg', '2', 'each', 'base'],\n     ['milk', '1/4', 'cup', 'base'], ['butter', '2', 'tbsp', 'base']],\n    2, 12],\n   [['pepper', '11 7/8', 'tsp'], ['flour', '12', 'cup'], ['egg', '12', 'each'], ['milk', '1 1/2', 'cup'],\n    ['butter', '12', 'tbsp']]]],\n [['tiny scale-down to pinch', [[['cumin', '1/8', 'tsp', 'base'], ['egg', '1', 'each', 'base']], 8, 1],\n   [['cumin', 'pinch', 'tsp'], ['egg', '1', 'each']]],\n  ['half egg rounds up', [[['egg', '3', 'each', 'base'], ['milk', '1/2', 'cup', 'base']], 4, 6],\n   [['egg', '5', 'each'], ['milk', '3/4', 'cup']]],\n  ['identity scaling control', [[['egg', '2', 'each', 'base'], ['flour', '3/2', 'cup', 'base']], 4, 4],\n   [['egg', '2', 'each'], ['flour', '1 1/2', 'cup']]],\n  ['regression: seasoning damping',\n   [[['cumin', '2', 'tsp', 'seasoning'], ['milk', '1/2', 'cup', 'base']], 5, 8],\n   [['cumin', '2 7/8', 'tsp'], ['milk', '3/4', 'cup']]],\n  ['repair check: seasoning damping',\n   [[['cumin', '1', 'tsp', 'seasoning'], ['pepper', '1/4', 'tsp', 'seasoning'],\n     ['butter', '1/3', 'tbsp', 'base'], ['garlic clove', '3', 'each', 'base']],\n    8, 1],\n   [['cumin', '3/8', 'tsp'], ['pepper', '1/8', 'tsp'], ['butter', 'pinch', 'tbsp'],\n    ['garlic clove', '1', 'each']]],\n  ['generated control 1', [[['cumin', '2', 'tsp', 'seasoning'], ['salt', '1/2', 'tsp', 'seasoning']], 5, 9],\n   [['cumin', '3 1/4', 'tsp'], ['salt', '3/4', 'tsp']]],\n  ['generated control 2',\n   [[['garlic clove', '1/2', 'each', 'base'], ['egg', '1/2', 'each', 'base'], ['milk', '1/8', 'cup', 'base']],\n    6, 9],\n   [['garlic clove', '1', 'each'], ['egg', '1', 'each'], ['milk', '1/4', 'cup']]],\n  ['generated control 3', [[['milk', '1/4', 'cup', 'base'], ['butter', '1/4', 'tbsp', 'base']], 7, 8],\n   [['milk', '1/4', 'cup'], ['butter', '1/4', 'tbsp']]]],\n [['half egg rounds up', [[['egg', '3', 'each', 'base'], ['milk', '1/2', 'cup', 'base']], 4, 6],\n   [['egg', '5', 'each'], ['milk', '3/4', 'cup']]],\n  ['identity scaling control', [[['egg', '2', 'each', 'base'], ['flour', '3/2', 'cup', 'base']], 4, 4],\n   [['egg', '2', 'each'], ['flour', '1 1/2', 'cup']]],\n  ['zero servings rejected', [[['egg', '2', 'each', 'base']], 0, 4], 'error: servings must be positive'],\n  ['regression: seasoning damping',\n   [[['lime', '3', 'each', 'base'], ['cumin', '1/8', 'tsp', 'seasoning'], ['egg', '1', 'each', 'base'],\n     ['garlic clove', '5', 'each', 'base'], ['pepper', '5/2', 'tsp', 'seasoning']],\n    7, 7],\n   [['lime', '3', 'each'], ['cumin', '1/8', 'tsp'], ['egg', '1', 'each'], ['garlic clove', '5', 'each'],\n    ['pepper', '2 1/2', 'tsp']]],\n  ['repair check: seasoning damping',\n   [[['pepper', '3', 'tsp', 'seasoning'], ['salt', '3/2', 'tsp', 'seasoning']], 4, 3],\n   [['pepper', '2 1/2', 'tsp'], ['salt', '1 1/4', 'tsp']]],\n  ['generated control 1',\n   [[['salt', '5/2', 'tsp', 'seasoning'], ['milk', '1/4', 'cup', 'base'], ['butter', '1', 'tbsp', 'base'],\n     ['cumin', '1/3', 'tsp', 'seasoning']],\n    8, 11],\n   [['salt', '3 1/4', 'tsp'], ['milk', '3/8', 'cup'], ['butter', '1 3/8', 'tbsp'], ['cumin', '3/8', 'tsp']]],\n  ['generated control 2',\n   [[['salt', '1/4', 'tsp', 'seasoning'], ['egg', '3', 'each', 'base'], ['cumin', '1/2', 'tsp', 'seasoning'],\n     ['flour', '1/2', 'cup', 'base'], ['lime', '5', 'each', 'base']],\n    5, 11],\n   [['salt', '1/2', 'tsp'], ['egg', '7', 'each'], ['cumin', '1', 'tsp'], ['flour', '1 1/8', 'cup'],\n    ['lime', '11', 'each']]],\n  ['generated control 3',\n   [[['butter', '1', 'tbsp', 'base'], ['pepper', '2', 'tsp', 'seasoning'], ['egg', '4', 'each', 'base']], 1,\n    12],\n   [['butter', '12', 'tbsp'], ['pepper', '18 1/2', 'tsp'], ['egg', '48', 'each']]]]]\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":"7f92a82c2eeba9bf2a3f87b51ff6073e316645adbb99ea1b61db26d43e18fcc9","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(items, base, target):\n    if base <= 0 or target <= 0:\n        return 'error: servings must be positive'\n    f = Fraction(target, base)\n    def fmt(e):\n        if e == 0:\n            return 'pinch'\n        whole, rem = divmod(e, 8)\n        if rem == 0:\n            return str(whole)\n        g = math.gcd(rem, 8)\n        frac = '%d/%d' % (rem // g, 8 // g)\n        return frac if whole == 0 else '%d %s' % (whole, frac)\n    out = []\n    for name, qty, unit, kind in items:\n        q = Fraction(qty)\n        if kind == 'seasoning':\n            s = q * f * Fraction(3, 4)\n        else:\n            s = q * f\n        if unit == 'each':\n            n = int(s) + (1 if s - int(s) >= Fraction(1, 2) else 0)\n            out.append([name, str(max(1, n)), unit])\n        else:\n            e = int(s * 8 + Fraction(1, 2))\n            out.append([name, fmt(e), unit])\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['identity scaling control', [[['egg', '2', 'each', 'base'], ['flour', '3/2', 'cup', 'base']], 4, 4],\n   [['egg', '2', 'each'], ['flour', '1 1/2', 'cup']]],\n  ['zero servings rejected', [[['egg', '2', 'each', 'base']], 0, 4], 'error: servings must be positive'],\n  ['double batch with seasoning', [[['salt', '1', 'tsp', 'seasoning'], ['egg', '3', 'each', 'base']], 4, 8],\n   [['salt', '1 3/4', 'tsp'], ['egg', '6', 'each']]],\n  ['regression: seasoning damping',\n   [[['butter', '3/2', 'tbsp', 'base'], ['cumin', '1', 'tsp', 'seasoning'], ['flour', '9/4', 'cup', 'base']],\n    1, 4],\n   [['butter', '6', 'tbsp'], ['cumin', '3 1/4', 'tsp'], ['flour', '9', 'cup']]],\n  ['repair check: seasoning damping',\n   [[['butter', '1/2', 'tbsp', 'base'], ['garlic clove', '1/2', 'each', 'base'],\n     ['cumin', '2/3', 'tsp', 'seasoning']],\n    8, 1],\n   [['butter', '1/8', 'tbsp'], ['garlic clove', '1', 'each'], ['cumin', '1/4', 'tsp']]],\n  ['generated control 1', [[['flour', '2/3', 'cup', 'base'], ['milk', '9/4', 'cup', 'base']], 1, 5],\n   [['flour', '3 3/8', 'cup'], ['milk', '11 1/4', 'cup']]],\n  ['generated control 2', [[['flour', '1/4', 'cup', 'base'], ['lime', '1', 'each', 'base']], 4, 2],\n   [['flour', '1/8', 'cup'], ['lime', '1', 'each']]],\n  ['generated control 3',\n   [[['garlic clove', '1/2', 'each', 'base'], ['egg', '5', 'each', 'base'], ['butter', '1/2', 'tbsp', 'base'],\n     ['lime', '1', 'each', 'base'], ['cumin', '1/4', 'tsp', 'seasoning']],\n    1, 2],\n   [['garlic clove', '1', 'each'], ['egg', '10', 'each'], ['butter', '1', 'tbsp'], ['lime', '2', 'each'],\n    ['cumin', '1/2', 'tsp']]]],\n [['zero servings rejected', [[['egg', '2', 'each', 'base']], 0, 4], 'error: servings must be positive'],\n  ['double batch with seasoning', [[['salt', '1', 'tsp', 'seasoning'], ['egg', '3', 'each', 'base']], 4, 8],\n   [['salt', '1 3/4', 'tsp'], ['egg', '6', 'each']]],\n  ['tiny scale-down to pinch', [[['cumin', '1/8', 'tsp', 'base'], ['egg', '1', 'each', 'base']], 8, 1],\n   [['cumin', 'pinch', 'tsp'], ['egg', '1', 'each']]],\n  ['regression: seasoning damping',\n   [[['pepper', '5/2', 'tsp', 'seasoning'], ['egg', '1', 'each', 'base'],\n     ['garlic clove', '4', 'each', 'base']],\n    5, 1],\n   [['pepper', '1', 'tsp'], ['egg', '1', 'each'], ['garlic clove', '1', 'each']]],\n  ['repair check: seasoning damping',\n   [[['flour', '9/4', 'cup', 'base'], ['cumin', '1/8', 'tsp', 'seasoning'], ['egg', '3', 'each', 'base'],\n     ['lime', '2', 'each', 'base'], ['milk', '1/8', 'cup', 'base']],\n    6, 2],\n   [['flour', '3/4', 'cup'], ['cumin', '1/8', 'tsp'], ['egg', '1', 'each'], ['lime', '1', 'each'],\n    ['milk', 'pinch', 'cup']]],\n  ['generated control 1', [[['lime', '3', 'each', 'base'], ['butter', '3', 'tbsp', 'base']], 4, 11],\n   [['lime', '8', 'each'], ['butter', '8 1/4', 'tbsp']]],\n  ['generated control 2',\n   [[['garlic clove', '1', 'each', 'base'], ['milk', '2', 'cup', 'base'], ['lime', '4', 'each', 'base'],\n     ['cumin', '1/8', 'tsp', 'seasoning'], ['butter', '1/8', 'tbsp', 'base']],\n    2, 1],\n   [['garlic clove', '1', 'each'], ['milk', '1', 'cup'], ['lime', '2', 'each'], ['cumin', '1/8', 'tsp'],\n    ['butter', '1/8', 'tbsp']]],\n  ['generated control 3',\n   [[['cumin', '1/2', 'tsp', 'seasoning'], ['flour', '2', 'cup', 'base'], ['egg', '3', 'each', 'base']], 8,\n    9],\n   [['cumin', '1/2', 'tsp'], ['flour', '2 1/4', 'cup'], ['egg', '3', 'each']]]],\n [['double batch with seasoning', [[['salt', '1', 'tsp', 'seasoning'], ['egg', '3', 'each', 'base']], 4, 8],\n   [['salt', '1 3/4', 'tsp'], ['egg', '6', 'each']]],\n  ['tiny scale-down to pinch', [[['cumin', '1/8', 'tsp', 'base'], ['egg', '1', 'each', 'base']], 8, 1],\n   [['cumin', 'pinch', 'tsp'], ['egg', '1', 'each']]],\n  ['half egg rounds up', [[['egg', '3', 'each', 'base'], ['milk', '1/2', 'cup', 'base']], 4, 6],\n   [['egg', '5', 'each'], ['milk', '3/4', 'cup']]],\n  ['regression: seasoning damping',\n   [[['egg', '2', 'each', 'base'], ['cumin', '1/3', 'tsp', 'seasoning'], ['salt', '1/4', 'tsp', 'seasoning'],\n     ['butter', '3/2', 'tbsp', 'base'], ['garlic clove', '5', 'each', 'base']],\n    4, 12],\n   [['egg', '6', 'each'], ['cumin', '7/8', 'tsp'], ['salt', '5/8', 'tsp'], ['butter', '4 1/2', 'tbsp'],\n    ['garlic clove', '15', 'each']]],\n  ['repair check: seasoning damping',\n   [[['cumin', '5/2', 'tsp', 'seasoning'], ['lime', '1/2', 'each', 'base'], ['flour', '3', 'cup', 'base'],\n     ['pepper', '1/8', 'tsp', 'seasoning'], ['egg', '5', 'each', 'base']],\n    8, 5],\n   [['cumin', '1 3/4', 'tsp'], ['lime', '1', 'each'], ['flour', '1 7/8', 'cup'], ['pepper', '1/8', 'tsp'],\n    ['egg', '3', 'each']]],\n  ['generated control 1', [[['egg', '1', 'each', 'base'], ['butter', '1', 'tbsp', 'base']], 6, 12],\n   [['egg', '2', 'each'], ['butter', '2', 'tbsp']]],\n  ['generated control 2',\n   [[['butter', '1/8', 'tbsp', 'base'], ['garlic clove', '1/2', 'each', 'base'],\n     ['flour', '3/2', 'cup', 'base']],\n    4, 12],\n   [['butter', '3/8', 'tbsp'], ['garlic clove', '2', 'each'], ['flour', '4 1/2', 'cup']]],\n  ['generated control 3',\n   [[['pepper', '5/2', 'tsp', 'seasoning'], ['flour', '2', 'cup', 'base'], ['egg', '2', 'each', 'base'],\n     ['milk', '1/4', 'cup', 'base'], ['butter', '2', 'tbsp', 'base']],\n    2, 12],\n   [['pepper', '11 7/8', 'tsp'], ['flour', '12', 'cup'], ['egg', '12', 'each'], ['milk', '1 1/2', 'cup'],\n    ['butter', '12', 'tbsp']]]],\n [['tiny scale-down to pinch', [[['cumin', '1/8', 'tsp', 'base'], ['egg', '1', 'each', 'base']], 8, 1],\n   [['cumin', 'pinch', 'tsp'], ['egg', '1', 'each']]],\n  ['half egg rounds up', [[['egg', '3', 'each', 'base'], ['milk', '1/2', 'cup', 'base']], 4, 6],\n   [['egg', '5', 'each'], ['milk', '3/4', 'cup']]],\n  ['identity scaling control', [[['egg', '2', 'each', 'base'], ['flour', '3/2', 'cup', 'base']], 4, 4],\n   [['egg', '2', 'each'], ['flour', '1 1/2', 'cup']]],\n  ['regression: seasoning damping',\n   [[['cumin', '2', 'tsp', 'seasoning'], ['milk', '1/2', 'cup', 'base']], 5, 8],\n   [['cumin', '2 7/8', 'tsp'], ['milk', '3/4', 'cup']]],\n  ['repair check: seasoning damping',\n   [[['cumin', '1', 'tsp', 'seasoning'], ['pepper', '1/4', 'tsp', 'seasoning'],\n     ['butter', '1/3', 'tbsp', 'base'], ['garlic clove', '3', 'each', 'base']],\n    8, 1],\n   [['cumin', '3/8', 'tsp'], ['pepper', '1/8', 'tsp'], ['butter', 'pinch', 'tbsp'],\n    ['garlic clove', '1', 'each']]],\n  ['generated control 1', [[['cumin', '2', 'tsp', 'seasoning'], ['salt', '1/2', 'tsp', 'seasoning']], 5, 9],\n   [['cumin', '3 1/4', 'tsp'], ['salt', '3/4', 'tsp']]],\n  ['generated control 2',\n   [[['garlic clove', '1/2', 'each', 'base'], ['egg', '1/2', 'each', 'base'], ['milk', '1/8', 'cup', 'base']],\n    6, 9],\n   [['garlic clove', '1', 'each'], ['egg', '1', 'each'], ['milk', '1/4', 'cup']]],\n  ['generated control 3', [[['milk', '1/4', 'cup', 'base'], ['butter', '1/4', 'tbsp', 'base']], 7, 8],\n   [['milk', '1/4', 'cup'], ['butter', '1/4', 'tbsp']]]],\n [['half egg rounds up', [[['egg', '3', 'each', 'base'], ['milk', '1/2', 'cup', 'base']], 4, 6],\n   [['egg', '5', 'each'], ['milk', '3/4', 'cup']]],\n  ['identity scaling control', [[['egg', '2', 'each', 'base'], ['flour', '3/2', 'cup', 'base']], 4, 4],\n   [['egg', '2', 'each'], ['flour', '1 1/2', 'cup']]],\n  ['zero servings rejected', [[['egg', '2', 'each', 'base']], 0, 4], 'error: servings must be positive'],\n  ['regression: seasoning damping',\n   [[['lime', '3', 'each', 'base'], ['cumin', '1/8', 'tsp', 'seasoning'], ['egg', '1', 'each', 'base'],\n     ['garlic clove', '5', 'each', 'base'], ['pepper', '5/2', 'tsp', 'seasoning']],\n    7, 7],\n   [['lime', '3', 'each'], ['cumin', '1/8', 'tsp'], ['egg', '1', 'each'], ['garlic clove', '5', 'each'],\n    ['pepper', '2 1/2', 'tsp']]],\n  ['repair check: seasoning damping',\n   [[['pepper', '3', 'tsp', 'seasoning'], ['salt', '3/2', 'tsp', 'seasoning']], 4, 3],\n   [['pepper', '2 1/2', 'tsp'], ['salt', '1 1/4', 'tsp']]],\n  ['generated control 1',\n   [[['salt', '5/2', 'tsp', 'seasoning'], ['milk', '1/4', 'cup', 'base'], ['butter', '1', 'tbsp', 'base'],\n     ['cumin', '1/3', 'tsp', 'seasoning']],\n    8, 11],\n   [['salt', '3 1/4', 'tsp'], ['milk', '3/8', 'cup'], ['butter', '1 3/8', 'tbsp'], ['cumin', '3/8', 'tsp']]],\n  ['generated control 2',\n   [[['salt', '1/4', 'tsp', 'seasoning'], ['egg', '3', 'each', 'base'], ['cumin', '1/2', 'tsp', 'seasoning'],\n     ['flour', '1/2', 'cup', 'base'], ['lime', '5', 'each', 'base']],\n    5, 11],\n   [['salt', '1/2', 'tsp'], ['egg', '7', 'each'], ['cumin', '1', 'tsp'], ['flour', '1 1/8', 'cup'],\n    ['lime', '11', 'each']]],\n  ['generated control 3',\n   [[['butter', '1', 'tbsp', 'base'], ['pepper', '2', 'tsp', 'seasoning'], ['egg', '4', 'each', 'base']], 1,\n    12],\n   [['butter', '12', 'tbsp'], ['pepper', '18 1/2', 'tsp'], ['egg', '48', 'each']]]]]\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-servings-scaler-seasoning-damping","generated_at":"2026-09-29T14:52:26.413330+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Home and commercial recipe scalers must keep countable items whole and print measurable fractions cooks can actually portion.","root_cause":"Seasoning multiplies the whole factor by 3/4 instead of damping only the change (f-1) by 3/4.","sha256":"fa56dff6d365e782e5cff8c9eaa01ac4a35b2ef9515140cd473e310fa3800226","title":"Servings scaler: seasoning damping · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":41.99,"exit_code":1,"observations":[{"actual":[["egg","2","each"],["flour","1 1/2","cup"]],"check":"identity scaling control","expected":[["egg","2","each"],["flour","1 1/2","cup"]],"passed":true},{"actual":"error: servings must be positive","check":"zero servings rejected","expected":"error: servings must be positive","passed":true},{"actual":[["salt","1 3/4","tsp"],["egg","6","each"]],"check":"double batch with seasoning","expected":[["salt","1 3/4","tsp"],["egg","6","each"]],"passed":true},{"actual":[["butter","6","tbsp"],["cumin","3 1/4","tsp"],["flour","9","cup"]],"check":"regression: seasoning damping","expected":[["butter","6","tbsp"],["cumin","3 1/4","tsp"],["flour","9","cup"]],"passed":true},{"actual":[["butter","1/8","tbsp"],["garlic clove","1","each"],["cumin","1/8","tsp"]],"check":"repair check: seasoning damping","expected":[["butter","1/8","tbsp"],["garlic clove","1","each"],["cumin","1/4","tsp"]],"passed":false},{"actual":[["flour","3 3/8","cup"],["milk","11 1/4","cup"]],"check":"generated control 1","expected":[["flour","3 3/8","cup"],["milk","11 1/4","cup"]],"passed":true},{"actual":[["flour","1/8","cup"],["lime","1","each"]],"check":"generated control 2","expected":[["flour","1/8","cup"],["lime","1","each"]],"passed":true},{"actual":[["garlic clove","1","each"],["egg","10","each"],["butter","1","tbsp"],["lime","2","each"],["cumin","1/2","tsp"]],"check":"generated control 3","expected":[["garlic clove","1","each"],["egg","10","each"],["butter","1","tbsp"],["lime","2","each"],["cumin","1/2","tsp"]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"identity scaling control\", \"actual\": [[\"egg\", \"2\", \"each\"], [\"flour\", \"1 1/2\", \"cup\"]], \"expected\": [[\"egg\", \"2\", \"each\"], [\"flour\", \"1 1/2\", \"cup\"]], \"passed\": true}, {\"check\": \"zero servings rejected\", \"actual\": \"error: servings must be positive\", \"expected\": \"error: servings must be positive\", \"passed\": true}, {\"check\": \"double batch with seasoning\", \"actual\": [[\"salt\", \"1 3/4\", \"tsp\"], [\"egg\", \"6\", \"each\"]], \"expected\": [[\"salt\", \"1 3/4\", \"tsp\"], [\"egg\", \"6\", \"each\"]], \"passed\": true}, {\"check\": \"regression: seasoning damping\", \"actual\": [[\"butter\", \"6\", \"tbsp\"], [\"cumin\", \"3 1/4\", \"tsp\"], [\"flour\", \"9\", \"cup\"]], \"expected\": [[\"butter\", \"6\", \"tbsp\"], [\"cumin\", \"3 1/4\", \"tsp\"], [\"flour\", \"9\", \"cup\"]], \"passed\": true}, {\"check\": \"repair check: seasoning damping\", \"actual\": [[\"butter\", \"1/8\", \"tbsp\"], [\"garlic clove\", \"1\", \"each\"], [\"cumin\", \"1/8\", \"tsp\"]], \"expected\": [[\"butter\", \"1/8\", \"tbsp\"], [\"garlic clove\", \"1\", \"each\"], [\"cumin\", \"1/4\", \"tsp\"]], \"passed\": false}, {\"check\": \"generated control 1\", \"actual\": [[\"flour\", \"3 3/8\", \"cup\"], [\"milk\", \"11 1/4\", \"cup\"]], \"expected\": [[\"flour\", \"3 3/8\", \"cup\"], [\"milk\", \"11 1/4\", \"cup\"]], \"passed\": true}, {\"check\": \"generated control 2\", \"actual\": [[\"flour\", \"1/8\", \"cup\"], [\"lime\", \"1\", \"each\"]], \"expected\": [[\"flour\", \"1/8\", \"cup\"], [\"lime\", \"1\", \"each\"]], \"passed\": true}, {\"check\": \"generated control 3\", \"actual\": [[\"garlic clove\", \"1\", \"each\"], [\"egg\", \"10\", \"each\"], [\"butter\", \"1\", \"tbsp\"], [\"lime\", \"2\", \"each\"], [\"cumin\", \"1/2\", \"tsp\"]], \"expected\": [[\"garlic clove\", \"1\", \"each\"], [\"egg\", \"10\", \"each\"], [\"butter\", \"1\", \"tbsp\"], [\"lime\", \"2\", \"each\"], [\"cumin\", \"1/2\", \"tsp\"]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.03,"exit_code":1,"observations":[{"actual":[["egg","2","each"],["flour","1 1/2","cup"]],"check":"identity scaling control","expected":[["egg","2","each"],["flour","1 1/2","cup"]],"passed":true},{"actual":"error: servings must be positive","check":"zero servings rejected","expected":"error: servings must be positive","passed":true},{"actual":[["salt","1 1/2","tsp"],["egg","6","each"]],"check":"double batch with seasoning","expected":[["salt","1 3/4","tsp"],["egg","6","each"]],"passed":false},{"actual":[["butter","6","tbsp"],["cumin","3","tsp"],["flour","9","cup"]],"check":"regression: seasoning damping","expected":[["butter","6","tbsp"],["cumin","3 1/4","tsp"],["flour","9","cup"]],"passed":false},{"actual":[["butter","1/8","tbsp"],["garlic clove","1","each"],["cumin","1/8","tsp"]],"check":"repair check: seasoning damping","expected":[["butter","1/8","tbsp"],["garlic clove","1","each"],["cumin","1/4","tsp"]],"passed":false},{"actual":[["flour","3 3/8","cup"],["milk","11 1/4","cup"]],"check":"generated control 1","expected":[["flour","3 3/8","cup"],["milk","11 1/4","cup"]],"passed":true},{"actual":[["flour","1/8","cup"],["lime","1","each"]],"check":"generated control 2","expected":[["flour","1/8","cup"],["lime","1","each"]],"passed":true},{"actual":[["garlic clove","1","each"],["egg","10","each"],["butter","1","tbsp"],["lime","2","each"],["cumin","3/8","tsp"]],"check":"generated control 3","expected":[["garlic clove","1","each"],["egg","10","each"],["butter","1","tbsp"],["lime","2","each"],["cumin","1/2","tsp"]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"identity scaling control\", \"actual\": [[\"egg\", \"2\", \"each\"], [\"flour\", \"1 1/2\", \"cup\"]], \"expected\": [[\"egg\", \"2\", \"each\"], [\"flour\", \"1 1/2\", \"cup\"]], \"passed\": true}, {\"check\": \"zero servings rejected\", \"actual\": \"error: servings must be positive\", \"expected\": \"error: servings must be positive\", \"passed\": true}, {\"check\": \"double batch with seasoning\", \"actual\": [[\"salt\", \"1 1/2\", \"tsp\"], [\"egg\", \"6\", \"each\"]], \"expected\": [[\"salt\", \"1 3/4\", \"tsp\"], [\"egg\", \"6\", \"each\"]], \"passed\": false}, {\"check\": \"regression: seasoning damping\", \"actual\": [[\"butter\", \"6\", \"tbsp\"], [\"cumin\", \"3\", \"tsp\"], [\"flour\", \"9\", \"cup\"]], \"expected\": [[\"butter\", \"6\", \"tbsp\"], [\"cumin\", \"3 1/4\", \"tsp\"], [\"flour\", \"9\", \"cup\"]], \"passed\": false}, {\"check\": \"repair check: seasoning damping\", \"actual\": [[\"butter\", \"1/8\", \"tbsp\"], [\"garlic clove\", \"1\", \"each\"], [\"cumin\", \"1/8\", \"tsp\"]], \"expected\": [[\"butter\", \"1/8\", \"tbsp\"], [\"garlic clove\", \"1\", \"each\"], [\"cumin\", \"1/4\", \"tsp\"]], \"passed\": false}, {\"check\": \"generated control 1\", \"actual\": [[\"flour\", \"3 3/8\", \"cup\"], [\"milk\", \"11 1/4\", \"cup\"]], \"expected\": [[\"flour\", \"3 3/8\", \"cup\"], [\"milk\", \"11 1/4\", \"cup\"]], \"passed\": true}, {\"check\": \"generated control 2\", \"actual\": [[\"flour\", \"1/8\", \"cup\"], [\"lime\", \"1\", \"each\"]], \"expected\": [[\"flour\", \"1/8\", \"cup\"], [\"lime\", \"1\", \"each\"]], \"passed\": true}, {\"check\": \"generated control 3\", \"actual\": [[\"garlic clove\", \"1\", \"each\"], [\"egg\", \"10\", \"each\"], [\"butter\", \"1\", \"tbsp\"], [\"lime\", \"2\", \"each\"], [\"cumin\", \"3/8\", \"tsp\"]], \"expected\": [[\"garlic clove\", \"1\", \"each\"], [\"egg\", \"10\", \"each\"], [\"butter\", \"1\", \"tbsp\"], [\"lime\", \"2\", \"each\"], [\"cumin\", \"1/2\", \"tsp\"]], \"passed\": false}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}