{"abstract":"A pantry entry \"egg\" does not cancel recipe rows \"eggs\".","category":"Recipe scaling and nutrition","checks":8,"contract":"Rows [name, qty, unit]. Names normalize: trim, lower, \"-oes\" -> drop \"es\", \"-ies\" -> \"y\", other trailing \"s\" dropped unless \"ss\". Volume (tsp=1, tbsp=3, cup=48 tsp), mass (g, kg=1000 g) and other units aggregate separately per name. Pantry {name: [qty, unit]} subtracts from the same name and dimension, never below 0. Output sorted by (name, dimension) as [name, str(qty), unit], skipping zero totals; volume shows cup if >=12 tsp, else tbsp if >=3 tsp, else tsp; mass shows kg if >=1000 g.","evaluation_group":"w2-recipe_scaling_and_nutrition-shopping-list","failed_approach":"Lower-casing alone still misses plural and whitespace differences.","family":"w2-recipe_scaling_and_nutrition-shopping-list-pantry-name-normalization","id":"FA-97141","implementations":{"attempt":{"sha256":"08c6702b4eb83c35155891e16c6c36fec25303303a4d20d79ecdf32e8ef8eaa4","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(recipes, pantry):\n    VOL = {'tsp': 1, 'tbsp': 3, 'cup': 48}\n    MASS = {'g': 1, 'kg': 1000}\n    def norm(n):\n        n = n.strip().lower()\n        if n.endswith('oes'):\n            return n[:-2]\n        if n.endswith('ies'):\n            return n[:-3] + 'y'\n        if n.endswith('s') and not n.endswith('ss'):\n            return n[:-1]\n        return n\n    def base(q, u):\n        if u in VOL:\n            return 'volume', Fraction(q) * VOL[u]\n        if u in MASS:\n            return 'mass', Fraction(q) * MASS[u]\n        return u, Fraction(q)\n    tot = {}\n    for recipe in recipes:\n        for name, q, u in recipe:\n            dim, v = base(q, u)\n            k = (norm(name), dim)\n            tot[k] = tot.get(k, 0) + v\n    for name, (q, u) in pantry.items():\n        dim, v = base(q, u)\n        pk = (name.lower(), dim)\n        if pk in tot:\n            tot[pk] = max(Fraction(0), tot[pk] - v)\n    out = []\n    for (name, dim), v in sorted(tot.items()):\n        if v == 0:\n            continue\n        if dim == 'volume':\n            unit, v2 = ('cup', v / 48) if v >= 12 else ('tbsp', v / 3) if v >= 3 else ('tsp', v)\n        elif dim == 'mass':\n            unit, v2 = ('kg', v / 1000) if v >= 1000 else ('g', v)\n        else:\n            unit, v2 = dim, v\n        out.append([name, str(v2), unit])\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['single recipe', [[[['flour', '1', 'cup']]], {}], [['flour', '1', 'cup']]],\n  ['merge plurals', [[[['tomatoes', '2', 'each']], [['Tomato', '1', 'each']]], {}],\n   [['tomato', '3', 'each']]],\n  ['pantry covers all', [[[['eggs', '2', 'each']]], {'egg': ['6', 'each']}], []],\n  ['regression: pantry name normalization',\n   [[[['berries', '3', 'tbsp'], ['flour', '1', 'tbsp'], ['watercress', '3/4', 'tsp'],\n      ['tomatoes', '1', 'tsp']],\n     [['watercress', '1/2', 'g'], ['berry', '4', 'cup'], ['sugar ', '3/4', 'tsp']],\n     [['potatoes', '4', 'kg']]],\n    {'berries': ['3/4', 'cup'], 'tomatoes': ['3', 'tbsp']}],\n   [['berry', '55/16', 'cup'], ['flour', '1', 'tbsp'], ['potato', '4', 'kg'], ['sugar', '3/4', 'tsp'],\n    ['watercress', '1/2', 'g'], ['watercress', '3/4', 'tsp']]],\n  ['repair check: pantry name normalization',\n   [[[['egg', '3/4', 'cup'], ['berries', '3', 'each'], ['tomatoes', '3/4', 'cup'], ['grapes', '4', 'kg']]],\n    {'berries': ['1/3', 'cup'], 'grapes': ['2', 'kg']}],\n   [['berry', '3', 'each'], ['egg', '3/4', 'cup'], ['grape', '2', 'kg'], ['tomato', '3/4', 'cup']]],\n  ['generated control 1',\n   [[[['peas', '2', 'tsp'], ['grapes', '2', 'tbsp'], ['potatoes', '1/4', 'cup'], ['sugar ', '1/2', 'each']],\n     [['berry', '3/4', 'tsp'], ['sugar ', '1/2', 'tsp'], ['watercress', '3', 'cup'], ['egg', '2', 'g']],\n     [['sugar ', '4', 'tsp'], ['grape', '2', 'each'], ['grape', '1/4', 'kg']]],\n    {'Tomato': ['2', 'tsp']}],\n   [['berry', '3/4', 'tsp'], ['egg', '2', 'g'], ['grape', '2', 'each'], ['grape', '250', 'g'],\n    ['grape', '2', 'tbsp'], ['pea', '2', 'tsp'], ['potato', '1/4', 'cup'], ['sugar', '1/2', 'each'],\n    ['sugar', '3/2', 'tbsp'], ['watercress', '3', 'cup']]],\n  ['generated control 2',\n   [[[['sugar ', '1/2', 'tbsp'], ['egg', '1/4', 'tbsp']],\n     [['egg', '4', 'tbsp'], ['watercress', '1/3', 'tbsp']],\n     [['tomatoes', '3', 'each'], ['peas', '2', 'tsp']]],\n    {'peas': ['1/2', 'each'], 'sugar ': ['1/3', 'g']}],\n   [['egg', '17/64', 'cup'], ['pea', '2', 'tsp'], ['sugar', '3/2', 'tsp'], ['tomato', '3', 'each'],\n    ['watercress', '1', 'tsp']]],\n  ['generated control 3',\n   [[[['berry', '1/2', 'tsp'], ['watercress', '1/3', 'tsp'], ['Tomato', '1/3', 'tsp'], ['grape', '2', 'kg']]],\n    {'flour': ['3/4', 'tsp']}],\n   [['berry', '1/2', 'tsp'], ['grape', '2', 'kg'], ['tomato', '1/3', 'tsp'], ['watercress', '1/3', 'tsp']]]],\n [['merge plurals', [[[['tomatoes', '2', 'each']], [['Tomato', '1', 'each']]], {}],\n   [['tomato', '3', 'each']]],\n  ['pantry covers all', [[[['eggs', '2', 'each']]], {'egg': ['6', 'each']}], []],\n  ['watercress keeps ss', [[[['watercress', '100', 'g']]], {}], [['watercress', '100', 'g']]],\n  ['regression: pantry name normalization',\n   [[[['peas', '3/4', 'cup'], ['watercress', '2', 'g'], ['berry', '4', 'cup'], ['egg', '1/3', 'cup']]],\n    {'eggs': ['1/2', 'tbsp']}],\n   [['berry', '4', 'cup'], ['egg', '29/96', 'cup'], ['pea', '3/4', 'cup'], ['watercress', '2', 'g']]],\n  ['repair check: pantry name normalization',\n   [[[['grapes', '2', 'tbsp'], ['grape', '3/4', 'g']],\n     [['grape', '2', 'kg'], ['watercress', '1/3', 'tbsp'], ['egg', '1/4', 'kg'], ['eggs', '1', 'tsp']],\n     [['peas', '1/3', 'tbsp']]],\n    {'peas': ['1/2', 'cup']}],\n   [['egg', '250', 'g'], ['egg', '1', 'tsp'], ['grape', '8003/4000', 'kg'], ['grape', '2', 'tbsp'],\n    ['watercress', '1', 'tsp']]],\n  ['generated control 1',\n   [[[['flour', '3/4', 'tsp'], ['grapes', '1/2', 'cup']],\n     [['peas', '1/2', 'tsp'], ['tomatoes', '3/4', 'tbsp'], ['berries', '1', 'cup'], ['eggs', '4', 'kg']]],\n    {}],\n   [['berry', '1', 'cup'], ['egg', '4', 'kg'], ['flour', '3/4', 'tsp'], ['grape', '1/2', 'cup'],\n    ['pea', '1/2', 'tsp'], ['tomato', '9/4', 'tsp']]],\n  ['generated control 2',\n   [[[['berry', '4', 'each'], ['Tomato', '3/4', 'each'], ['grape', '3', 'g'], ['sugar ', '4', 'tbsp']],\n     [['sugar ', '2', 'each'], ['watercress', '3/4', 'tsp']]],\n    {'berries': ['1/2', 'tsp']}],\n   [['berry', '4', 'each'], ['grape', '3', 'g'], ['sugar', '2', 'each'], ['sugar', '1/4', 'cup'],\n    ['tomato', '3/4', 'each'], ['watercress', '3/4', 'tsp']]],\n  ['generated control 3',\n   [[[['flour', '3', 'g'], ['grape', '3', 'tsp']],\n     [['tomatoes', '1', 'g'], ['potatoes', '1/4', 'cup'], ['berries', '1/3', 'cup']]],\n    {'berry': ['1/4', 'tsp'], 'sugar ': ['1', 'kg']}],\n   [['berry', '21/64', 'cup'], ['flour', '3', 'g'], ['grape', '1', 'tbsp'], ['potato', '1/4', 'cup'],\n    ['tomato', '1', 'g']]]],\n [['pantry covers all', [[[['eggs', '2', 'each']]], {'egg': ['6', 'each']}], []],\n  ['watercress keeps ss', [[[['watercress', '100', 'g']]], {}], [['watercress', '100', 'g']]],\n  ['single recipe', [[[['flour', '1', 'cup']]], {}], [['flour', '1', 'cup']]],\n  ['regression: pantry name normalization',\n   [[[['tomatoes', '3', 'g'], ['Tomato', '1/3', 'cup'], ['grapes', '4', 'tbsp'], ['potatoes', '1/3', 'tsp']],\n     [['eggs', '1/2', 'each'], ['tomatoes', '2', 'g']],\n     [['tomatoes', '3/4', 'g'], ['egg', '1/3', 'tsp'], ['berries', '2', 'kg'], ['peas', '2', 'cup']]],\n    {'berry': ['1/3', 'cup'], 'tomatoes': ['4', 'tbsp']}],\n   [['berry', '2', 'kg'], ['egg', '1/2', 'each'], ['egg', '1/3', 'tsp'], ['grape', '1/4', 'cup'],\n    ['pea', '2', 'cup'], ['potato', '1/3', 'tsp'], ['tomato', '23/4', 'g'], ['tomato', '4/3', 'tbsp']]],\n  ['repair check: pantry name normalization',\n   [[[['tomatoes', '4', 'g'], ['tomatoes', '1/2', 'each'], ['Tomato', '3', 'tsp'],\n      ['grapes', '1/4', 'tbsp']]],\n    {'grapes': ['1', 'tsp']}],\n   [['tomato', '1/2', 'each'], ['tomato', '4', 'g'], ['tomato', '1', 'tbsp']]],\n  ['generated control 1',\n   [[[['grapes', '1/3', 'kg'], ['sugar ', '1/2', 'each'], ['Tomato', '1/2', 'each']]], {}],\n   [['grape', '1000/3', 'g'], ['sugar', '1/2', 'each'], ['tomato', '1/2', 'each']]],\n  ['generated control 2', [[[['eggs', '4', 'kg'], ['Tomato', '1/3', 'each'], ['berries', '1/4', 'tsp']]], {}],\n   [['berry', '1/4', 'tsp'], ['egg', '4', 'kg'], ['tomato', '1/3', 'each']]],\n  ['generated control 3',\n   [[[['peas', '1/4', 'cup'], ['sugar ', '1/4', 'each'], ['Tomato', '4', 'g'], ['egg', '2', 'g']]],\n    {'eggs': ['1/4', 'tsp'], 'peas': ['3', 'cup']}],\n   [['egg', '2', 'g'], ['sugar', '1/4', 'each'], ['tomato', '4', 'g']]]],\n [['watercress keeps ss', [[[['watercress', '100', 'g']]], {}], [['watercress', '100', 'g']]],\n  ['single recipe', [[[['flour', '1', 'cup']]], {}], [['flour', '1', 'cup']]],\n  ['merge plurals', [[[['tomatoes', '2', 'each']], [['Tomato', '1', 'each']]], {}],\n   [['tomato', '3', 'each']]],\n  ['regression: pantry name normalization',\n   [[[['egg', '4', 'cup'], ['tomatoes', '3', 'tbsp']], [['peas', '1/3', 'g'], ['sugar ', '1/3', 'each']],\n     [['tomatoes', '1', 'g']]],\n    {'egg': ['1', 'each'], 'eggs': ['3/4', 'tbsp']}],\n   [['egg', '253/64', 'cup'], ['pea', '1/3', 'g'], ['sugar', '1/3', 'each'], ['tomato', '1', 'g'],\n    ['tomato', '3', 'tbsp']]],\n  ['repair check: pantry name normalization',\n   [[[['Tomato', '1/3', 'g'], ['eggs', '3', 'g']], [['watercress', '1/3', 'kg']],\n     [['sugar ', '1/3', 'kg'], ['egg', '1/4', 'kg']]],\n    {'tomatoes': ['4', 'g'], 'watercress': ['2', 'cup']}],\n   [['egg', '253', 'g'], ['sugar', '1000/3', 'g'], ['watercress', '1000/3', 'g']]],\n  ['generated control 1',\n   [[[['watercress', '2', 'cup'], ['tomatoes', '1/4', 'kg'], ['grape', '1/4', 'tbsp'],\n      ['grapes', '3', 'tbsp']],\n     [['watercress', '1', 'kg']], [['sugar ', '4', 'each'], ['berries', '1/3', 'tsp']]],\n    {}],\n   [['berry', '1/3', 'tsp'], ['grape', '13/4', 'tbsp'], ['sugar', '4', 'each'], ['tomato', '250', 'g'],\n    ['watercress', '1', 'kg'], ['watercress', '2', 'cup']]],\n  ['generated control 2',\n   [[[['peas', '1/3', 'each'], ['flour', '4', 'kg'], ['Tomato', '1/2', 'tbsp']]], {'berry': ['4', 'each']}],\n   [['flour', '4', 'kg'], ['pea', '1/3', 'each'], ['tomato', '3/2', 'tsp']]],\n  ['generated control 3',\n   [[[['potatoes', '4', 'kg'], ['sugar ', '3/4', 'cup']], [['peas', '3', 'kg'], ['potatoes', '2', 'tbsp']],\n     [['watercress', '4', 'each'], ['berry', '3', 'cup'], ['grape', '1/4', 'each']]],\n    {'berries': ['2', 'g'], 'berry': ['1/4', 'cup']}],\n   [['berry', '11/4', 'cup'], ['grape', '1/4', 'each'], ['pea', '3', 'kg'], ['potato', '4', 'kg'],\n    ['potato', '2', 'tbsp'], ['sugar', '3/4', 'cup'], ['watercress', '4', 'each']]]],\n [['single recipe', [[[['flour', '1', 'cup']]], {}], [['flour', '1', 'cup']]],\n  ['merge plurals', [[[['tomatoes', '2', 'each']], [['Tomato', '1', 'each']]], {}],\n   [['tomato', '3', 'each']]],\n  ['pantry covers all', [[[['eggs', '2', 'each']]], {'egg': ['6', 'each']}], []],\n  ['regression: pantry name normalization',\n   [[[['grape', '1/2', 'each'], ['potatoes', '3/4', 'each']],\n     [['berry', '3', 'g'], ['tomatoes', '1/2', 'tsp']]],\n    {'grapes': ['3/4', 'each']}],\n   [['berry', '3', 'g'], ['potato', '3/4', 'each'], ['tomato', '1/2', 'tsp']]],\n  ['repair check: pantry name normalization',\n   [[[['flour', '3/4', 'cup'], ['berries', '2', 'tsp'], ['watercress', '1/2', 'tbsp']],\n     [['tomatoes', '3/4', 'each'], ['watercress', '1', 'cup'], ['sugar ', '1/2', 'tbsp'],\n      ['berry', '1/2', 'tbsp']]],\n    {'egg': ['1/3', 'each'], 'sugar ': ['1/4', 'cup']}],\n   [['berry', '7/6', 'tbsp'], ['flour', '3/4', 'cup'], ['tomato', '3/4', 'each'],\n    ['watercress', '33/32', 'cup']]],\n  ['generated control 1',\n   [[[['egg', '2', 'g'], ['eggs', '4', 'tsp']],\n     [['peas', '1/2', 'tbsp'], ['watercress', '1/4', 'tbsp'], ['tomatoes', '4', 'g']],\n     [['egg', '4', 'cup']]],\n    {'grapes': ['4', 'cup'], 'watercress': ['1/3', 'cup']}],\n   [['egg', '2', 'g'], ['egg', '49/12', 'cup'], ['pea', '3/2', 'tsp'], ['tomato', '4', 'g']]],\n  ['generated control 2',\n   [[[['sugar ', '2', 'kg'], ['grape', '4', 'each'], ['flour', '4', 'kg']],\n     [['flour', '1/3', 'tsp'], ['tomatoes', '4', 'each'], ['berries', '1/4', 'tsp'], ['peas', '1/4', 'each']],\n     [['tomatoes', '3/4', 'tsp'], ['watercress', '4', 'each'], ['flour', '3/4', 'each'],\n      ['eggs', '1/2', 'g']]],\n    {'flour': ['2', 'tbsp']}],\n   [['berry', '1/4', 'tsp'], ['egg', '1/2', 'g'], ['flour', '3/4', 'each'], ['flour', '4', 'kg'],\n    ['grape', '4', 'each'], ['pea', '1/4', 'each'], ['sugar', '2', 'kg'], ['tomato', '4', 'each'],\n    ['tomato', '3/4', 'tsp'], ['watercress', '4', 'each']]],\n  ['generated control 3',\n   [[[['eggs', '4', 'tbsp']], [['berry', '3/4', 'each'], ['tomatoes', '3', 'g'], ['grapes', '1/2', 'kg']]],\n    {}],\n   [['berry', '3/4', 'each'], ['egg', '1/4', 'cup'], ['grape', '500', 'g'], ['tomato', '3', 'g']]]]]\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":"cd498604764bd7ef6325611eb4d965bc27432c783132d49d9ba545983381bef1","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(recipes, pantry):\n    VOL = {'tsp': 1, 'tbsp': 3, 'cup': 48}\n    MASS = {'g': 1, 'kg': 1000}\n    def norm(n):\n        n = n.strip().lower()\n        if n.endswith('oes'):\n            return n[:-2]\n        if n.endswith('ies'):\n            return n[:-3] + 'y'\n        if n.endswith('s') and not n.endswith('ss'):\n            return n[:-1]\n        return n\n    def base(q, u):\n        if u in VOL:\n            return 'volume', Fraction(q) * VOL[u]\n        if u in MASS:\n            return 'mass', Fraction(q) * MASS[u]\n        return u, Fraction(q)\n    tot = {}\n    for recipe in recipes:\n        for name, q, u in recipe:\n            dim, v = base(q, u)\n            k = (norm(name), dim)\n            tot[k] = tot.get(k, 0) + v\n    for name, (q, u) in pantry.items():\n        dim, v = base(q, u)\n        pk = (name, dim)\n        if pk in tot:\n            tot[pk] = max(Fraction(0), tot[pk] - v)\n    out = []\n    for (name, dim), v in sorted(tot.items()):\n        if v == 0:\n            continue\n        if dim == 'volume':\n            unit, v2 = ('cup', v / 48) if v >= 12 else ('tbsp', v / 3) if v >= 3 else ('tsp', v)\n        elif dim == 'mass':\n            unit, v2 = ('kg', v / 1000) if v >= 1000 else ('g', v)\n        else:\n            unit, v2 = dim, v\n        out.append([name, str(v2), unit])\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['single recipe', [[[['flour', '1', 'cup']]], {}], [['flour', '1', 'cup']]],\n  ['merge plurals', [[[['tomatoes', '2', 'each']], [['Tomato', '1', 'each']]], {}],\n   [['tomato', '3', 'each']]],\n  ['pantry covers all', [[[['eggs', '2', 'each']]], {'egg': ['6', 'each']}], []],\n  ['regression: pantry name normalization',\n   [[[['berries', '3', 'tbsp'], ['flour', '1', 'tbsp'], ['watercress', '3/4', 'tsp'],\n      ['tomatoes', '1', 'tsp']],\n     [['watercress', '1/2', 'g'], ['berry', '4', 'cup'], ['sugar ', '3/4', 'tsp']],\n     [['potatoes', '4', 'kg']]],\n    {'berries': ['3/4', 'cup'], 'tomatoes': ['3', 'tbsp']}],\n   [['berry', '55/16', 'cup'], ['flour', '1', 'tbsp'], ['potato', '4', 'kg'], ['sugar', '3/4', 'tsp'],\n    ['watercress', '1/2', 'g'], ['watercress', '3/4', 'tsp']]],\n  ['repair check: pantry name normalization',\n   [[[['egg', '3/4', 'cup'], ['berries', '3', 'each'], ['tomatoes', '3/4', 'cup'], ['grapes', '4', 'kg']]],\n    {'berries': ['1/3', 'cup'], 'grapes': ['2', 'kg']}],\n   [['berry', '3', 'each'], ['egg', '3/4', 'cup'], ['grape', '2', 'kg'], ['tomato', '3/4', 'cup']]],\n  ['generated control 1',\n   [[[['peas', '2', 'tsp'], ['grapes', '2', 'tbsp'], ['potatoes', '1/4', 'cup'], ['sugar ', '1/2', 'each']],\n     [['berry', '3/4', 'tsp'], ['sugar ', '1/2', 'tsp'], ['watercress', '3', 'cup'], ['egg', '2', 'g']],\n     [['sugar ', '4', 'tsp'], ['grape', '2', 'each'], ['grape', '1/4', 'kg']]],\n    {'Tomato': ['2', 'tsp']}],\n   [['berry', '3/4', 'tsp'], ['egg', '2', 'g'], ['grape', '2', 'each'], ['grape', '250', 'g'],\n    ['grape', '2', 'tbsp'], ['pea', '2', 'tsp'], ['potato', '1/4', 'cup'], ['sugar', '1/2', 'each'],\n    ['sugar', '3/2', 'tbsp'], ['watercress', '3', 'cup']]],\n  ['generated control 2',\n   [[[['sugar ', '1/2', 'tbsp'], ['egg', '1/4', 'tbsp']],\n     [['egg', '4', 'tbsp'], ['watercress', '1/3', 'tbsp']],\n     [['tomatoes', '3', 'each'], ['peas', '2', 'tsp']]],\n    {'peas': ['1/2', 'each'], 'sugar ': ['1/3', 'g']}],\n   [['egg', '17/64', 'cup'], ['pea', '2', 'tsp'], ['sugar', '3/2', 'tsp'], ['tomato', '3', 'each'],\n    ['watercress', '1', 'tsp']]],\n  ['generated control 3',\n   [[[['berry', '1/2', 'tsp'], ['watercress', '1/3', 'tsp'], ['Tomato', '1/3', 'tsp'], ['grape', '2', 'kg']]],\n    {'flour': ['3/4', 'tsp']}],\n   [['berry', '1/2', 'tsp'], ['grape', '2', 'kg'], ['tomato', '1/3', 'tsp'], ['watercress', '1/3', 'tsp']]]],\n [['merge plurals', [[[['tomatoes', '2', 'each']], [['Tomato', '1', 'each']]], {}],\n   [['tomato', '3', 'each']]],\n  ['pantry covers all', [[[['eggs', '2', 'each']]], {'egg': ['6', 'each']}], []],\n  ['watercress keeps ss', [[[['watercress', '100', 'g']]], {}], [['watercress', '100', 'g']]],\n  ['regression: pantry name normalization',\n   [[[['peas', '3/4', 'cup'], ['watercress', '2', 'g'], ['berry', '4', 'cup'], ['egg', '1/3', 'cup']]],\n    {'eggs': ['1/2', 'tbsp']}],\n   [['berry', '4', 'cup'], ['egg', '29/96', 'cup'], ['pea', '3/4', 'cup'], ['watercress', '2', 'g']]],\n  ['repair check: pantry name normalization',\n   [[[['grapes', '2', 'tbsp'], ['grape', '3/4', 'g']],\n     [['grape', '2', 'kg'], ['watercress', '1/3', 'tbsp'], ['egg', '1/4', 'kg'], ['eggs', '1', 'tsp']],\n     [['peas', '1/3', 'tbsp']]],\n    {'peas': ['1/2', 'cup']}],\n   [['egg', '250', 'g'], ['egg', '1', 'tsp'], ['grape', '8003/4000', 'kg'], ['grape', '2', 'tbsp'],\n    ['watercress', '1', 'tsp']]],\n  ['generated control 1',\n   [[[['flour', '3/4', 'tsp'], ['grapes', '1/2', 'cup']],\n     [['peas', '1/2', 'tsp'], ['tomatoes', '3/4', 'tbsp'], ['berries', '1', 'cup'], ['eggs', '4', 'kg']]],\n    {}],\n   [['berry', '1', 'cup'], ['egg', '4', 'kg'], ['flour', '3/4', 'tsp'], ['grape', '1/2', 'cup'],\n    ['pea', '1/2', 'tsp'], ['tomato', '9/4', 'tsp']]],\n  ['generated control 2',\n   [[[['berry', '4', 'each'], ['Tomato', '3/4', 'each'], ['grape', '3', 'g'], ['sugar ', '4', 'tbsp']],\n     [['sugar ', '2', 'each'], ['watercress', '3/4', 'tsp']]],\n    {'berries': ['1/2', 'tsp']}],\n   [['berry', '4', 'each'], ['grape', '3', 'g'], ['sugar', '2', 'each'], ['sugar', '1/4', 'cup'],\n    ['tomato', '3/4', 'each'], ['watercress', '3/4', 'tsp']]],\n  ['generated control 3',\n   [[[['flour', '3', 'g'], ['grape', '3', 'tsp']],\n     [['tomatoes', '1', 'g'], ['potatoes', '1/4', 'cup'], ['berries', '1/3', 'cup']]],\n    {'berry': ['1/4', 'tsp'], 'sugar ': ['1', 'kg']}],\n   [['berry', '21/64', 'cup'], ['flour', '3', 'g'], ['grape', '1', 'tbsp'], ['potato', '1/4', 'cup'],\n    ['tomato', '1', 'g']]]],\n [['pantry covers all', [[[['eggs', '2', 'each']]], {'egg': ['6', 'each']}], []],\n  ['watercress keeps ss', [[[['watercress', '100', 'g']]], {}], [['watercress', '100', 'g']]],\n  ['single recipe', [[[['flour', '1', 'cup']]], {}], [['flour', '1', 'cup']]],\n  ['regression: pantry name normalization',\n   [[[['tomatoes', '3', 'g'], ['Tomato', '1/3', 'cup'], ['grapes', '4', 'tbsp'], ['potatoes', '1/3', 'tsp']],\n     [['eggs', '1/2', 'each'], ['tomatoes', '2', 'g']],\n     [['tomatoes', '3/4', 'g'], ['egg', '1/3', 'tsp'], ['berries', '2', 'kg'], ['peas', '2', 'cup']]],\n    {'berry': ['1/3', 'cup'], 'tomatoes': ['4', 'tbsp']}],\n   [['berry', '2', 'kg'], ['egg', '1/2', 'each'], ['egg', '1/3', 'tsp'], ['grape', '1/4', 'cup'],\n    ['pea', '2', 'cup'], ['potato', '1/3', 'tsp'], ['tomato', '23/4', 'g'], ['tomato', '4/3', 'tbsp']]],\n  ['repair check: pantry name normalization',\n   [[[['tomatoes', '4', 'g'], ['tomatoes', '1/2', 'each'], ['Tomato', '3', 'tsp'],\n      ['grapes', '1/4', 'tbsp']]],\n    {'grapes': ['1', 'tsp']}],\n   [['tomato', '1/2', 'each'], ['tomato', '4', 'g'], ['tomato', '1', 'tbsp']]],\n  ['generated control 1',\n   [[[['grapes', '1/3', 'kg'], ['sugar ', '1/2', 'each'], ['Tomato', '1/2', 'each']]], {}],\n   [['grape', '1000/3', 'g'], ['sugar', '1/2', 'each'], ['tomato', '1/2', 'each']]],\n  ['generated control 2', [[[['eggs', '4', 'kg'], ['Tomato', '1/3', 'each'], ['berries', '1/4', 'tsp']]], {}],\n   [['berry', '1/4', 'tsp'], ['egg', '4', 'kg'], ['tomato', '1/3', 'each']]],\n  ['generated control 3',\n   [[[['peas', '1/4', 'cup'], ['sugar ', '1/4', 'each'], ['Tomato', '4', 'g'], ['egg', '2', 'g']]],\n    {'eggs': ['1/4', 'tsp'], 'peas': ['3', 'cup']}],\n   [['egg', '2', 'g'], ['sugar', '1/4', 'each'], ['tomato', '4', 'g']]]],\n [['watercress keeps ss', [[[['watercress', '100', 'g']]], {}], [['watercress', '100', 'g']]],\n  ['single recipe', [[[['flour', '1', 'cup']]], {}], [['flour', '1', 'cup']]],\n  ['merge plurals', [[[['tomatoes', '2', 'each']], [['Tomato', '1', 'each']]], {}],\n   [['tomato', '3', 'each']]],\n  ['regression: pantry name normalization',\n   [[[['egg', '4', 'cup'], ['tomatoes', '3', 'tbsp']], [['peas', '1/3', 'g'], ['sugar ', '1/3', 'each']],\n     [['tomatoes', '1', 'g']]],\n    {'egg': ['1', 'each'], 'eggs': ['3/4', 'tbsp']}],\n   [['egg', '253/64', 'cup'], ['pea', '1/3', 'g'], ['sugar', '1/3', 'each'], ['tomato', '1', 'g'],\n    ['tomato', '3', 'tbsp']]],\n  ['repair check: pantry name normalization',\n   [[[['Tomato', '1/3', 'g'], ['eggs', '3', 'g']], [['watercress', '1/3', 'kg']],\n     [['sugar ', '1/3', 'kg'], ['egg', '1/4', 'kg']]],\n    {'tomatoes': ['4', 'g'], 'watercress': ['2', 'cup']}],\n   [['egg', '253', 'g'], ['sugar', '1000/3', 'g'], ['watercress', '1000/3', 'g']]],\n  ['generated control 1',\n   [[[['watercress', '2', 'cup'], ['tomatoes', '1/4', 'kg'], ['grape', '1/4', 'tbsp'],\n      ['grapes', '3', 'tbsp']],\n     [['watercress', '1', 'kg']], [['sugar ', '4', 'each'], ['berries', '1/3', 'tsp']]],\n    {}],\n   [['berry', '1/3', 'tsp'], ['grape', '13/4', 'tbsp'], ['sugar', '4', 'each'], ['tomato', '250', 'g'],\n    ['watercress', '1', 'kg'], ['watercress', '2', 'cup']]],\n  ['generated control 2',\n   [[[['peas', '1/3', 'each'], ['flour', '4', 'kg'], ['Tomato', '1/2', 'tbsp']]], {'berry': ['4', 'each']}],\n   [['flour', '4', 'kg'], ['pea', '1/3', 'each'], ['tomato', '3/2', 'tsp']]],\n  ['generated control 3',\n   [[[['potatoes', '4', 'kg'], ['sugar ', '3/4', 'cup']], [['peas', '3', 'kg'], ['potatoes', '2', 'tbsp']],\n     [['watercress', '4', 'each'], ['berry', '3', 'cup'], ['grape', '1/4', 'each']]],\n    {'berries': ['2', 'g'], 'berry': ['1/4', 'cup']}],\n   [['berry', '11/4', 'cup'], ['grape', '1/4', 'each'], ['pea', '3', 'kg'], ['potato', '4', 'kg'],\n    ['potato', '2', 'tbsp'], ['sugar', '3/4', 'cup'], ['watercress', '4', 'each']]]],\n [['single recipe', [[[['flour', '1', 'cup']]], {}], [['flour', '1', 'cup']]],\n  ['merge plurals', [[[['tomatoes', '2', 'each']], [['Tomato', '1', 'each']]], {}],\n   [['tomato', '3', 'each']]],\n  ['pantry covers all', [[[['eggs', '2', 'each']]], {'egg': ['6', 'each']}], []],\n  ['regression: pantry name normalization',\n   [[[['grape', '1/2', 'each'], ['potatoes', '3/4', 'each']],\n     [['berry', '3', 'g'], ['tomatoes', '1/2', 'tsp']]],\n    {'grapes': ['3/4', 'each']}],\n   [['berry', '3', 'g'], ['potato', '3/4', 'each'], ['tomato', '1/2', 'tsp']]],\n  ['repair check: pantry name normalization',\n   [[[['flour', '3/4', 'cup'], ['berries', '2', 'tsp'], ['watercress', '1/2', 'tbsp']],\n     [['tomatoes', '3/4', 'each'], ['watercress', '1', 'cup'], ['sugar ', '1/2', 'tbsp'],\n      ['berry', '1/2', 'tbsp']]],\n    {'egg': ['1/3', 'each'], 'sugar ': ['1/4', 'cup']}],\n   [['berry', '7/6', 'tbsp'], ['flour', '3/4', 'cup'], ['tomato', '3/4', 'each'],\n    ['watercress', '33/32', 'cup']]],\n  ['generated control 1',\n   [[[['egg', '2', 'g'], ['eggs', '4', 'tsp']],\n     [['peas', '1/2', 'tbsp'], ['watercress', '1/4', 'tbsp'], ['tomatoes', '4', 'g']],\n     [['egg', '4', 'cup']]],\n    {'grapes': ['4', 'cup'], 'watercress': ['1/3', 'cup']}],\n   [['egg', '2', 'g'], ['egg', '49/12', 'cup'], ['pea', '3/2', 'tsp'], ['tomato', '4', 'g']]],\n  ['generated control 2',\n   [[[['sugar ', '2', 'kg'], ['grape', '4', 'each'], ['flour', '4', 'kg']],\n     [['flour', '1/3', 'tsp'], ['tomatoes', '4', 'each'], ['berries', '1/4', 'tsp'], ['peas', '1/4', 'each']],\n     [['tomatoes', '3/4', 'tsp'], ['watercress', '4', 'each'], ['flour', '3/4', 'each'],\n      ['eggs', '1/2', 'g']]],\n    {'flour': ['2', 'tbsp']}],\n   [['berry', '1/4', 'tsp'], ['egg', '1/2', 'g'], ['flour', '3/4', 'each'], ['flour', '4', 'kg'],\n    ['grape', '4', 'each'], ['pea', '1/4', 'each'], ['sugar', '2', 'kg'], ['tomato', '4', 'each'],\n    ['tomato', '3/4', 'tsp'], ['watercress', '4', 'each']]],\n  ['generated control 3',\n   [[[['eggs', '4', 'tbsp']], [['berry', '3/4', 'each'], ['tomatoes', '3', 'g'], ['grapes', '1/2', 'kg']]],\n    {}],\n   [['berry', '3/4', 'each'], ['egg', '1/4', 'cup'], ['grape', '500', 'g'], ['tomato', '3', 'g']]]]]\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":"e3e916bb85eaf9dfdc3355e8a28e9a4434254145b18d7cb2f3b73d3c442cf800","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(recipes, pantry):\n    VOL = {'tsp': 1, 'tbsp': 3, 'cup': 48}\n    MASS = {'g': 1, 'kg': 1000}\n    def norm(n):\n        n = n.strip().lower()\n        if n.endswith('oes'):\n            return n[:-2]\n        if n.endswith('ies'):\n            return n[:-3] + 'y'\n        if n.endswith('s') and not n.endswith('ss'):\n            return n[:-1]\n        return n\n    def base(q, u):\n        if u in VOL:\n            return 'volume', Fraction(q) * VOL[u]\n        if u in MASS:\n            return 'mass', Fraction(q) * MASS[u]\n        return u, Fraction(q)\n    tot = {}\n    for recipe in recipes:\n        for name, q, u in recipe:\n            dim, v = base(q, u)\n            k = (norm(name), dim)\n            tot[k] = tot.get(k, 0) + v\n    for name, (q, u) in pantry.items():\n        dim, v = base(q, u)\n        pk = (norm(name), dim)\n        if pk in tot:\n            tot[pk] = max(Fraction(0), tot[pk] - v)\n    out = []\n    for (name, dim), v in sorted(tot.items()):\n        if v == 0:\n            continue\n        if dim == 'volume':\n            unit, v2 = ('cup', v / 48) if v >= 12 else ('tbsp', v / 3) if v >= 3 else ('tsp', v)\n        elif dim == 'mass':\n            unit, v2 = ('kg', v / 1000) if v >= 1000 else ('g', v)\n        else:\n            unit, v2 = dim, v\n        out.append([name, str(v2), unit])\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['single recipe', [[[['flour', '1', 'cup']]], {}], [['flour', '1', 'cup']]],\n  ['merge plurals', [[[['tomatoes', '2', 'each']], [['Tomato', '1', 'each']]], {}],\n   [['tomato', '3', 'each']]],\n  ['pantry covers all', [[[['eggs', '2', 'each']]], {'egg': ['6', 'each']}], []],\n  ['regression: pantry name normalization',\n   [[[['berries', '3', 'tbsp'], ['flour', '1', 'tbsp'], ['watercress', '3/4', 'tsp'],\n      ['tomatoes', '1', 'tsp']],\n     [['watercress', '1/2', 'g'], ['berry', '4', 'cup'], ['sugar ', '3/4', 'tsp']],\n     [['potatoes', '4', 'kg']]],\n    {'berries': ['3/4', 'cup'], 'tomatoes': ['3', 'tbsp']}],\n   [['berry', '55/16', 'cup'], ['flour', '1', 'tbsp'], ['potato', '4', 'kg'], ['sugar', '3/4', 'tsp'],\n    ['watercress', '1/2', 'g'], ['watercress', '3/4', 'tsp']]],\n  ['repair check: pantry name normalization',\n   [[[['egg', '3/4', 'cup'], ['berries', '3', 'each'], ['tomatoes', '3/4', 'cup'], ['grapes', '4', 'kg']]],\n    {'berries': ['1/3', 'cup'], 'grapes': ['2', 'kg']}],\n   [['berry', '3', 'each'], ['egg', '3/4', 'cup'], ['grape', '2', 'kg'], ['tomato', '3/4', 'cup']]],\n  ['generated control 1',\n   [[[['peas', '2', 'tsp'], ['grapes', '2', 'tbsp'], ['potatoes', '1/4', 'cup'], ['sugar ', '1/2', 'each']],\n     [['berry', '3/4', 'tsp'], ['sugar ', '1/2', 'tsp'], ['watercress', '3', 'cup'], ['egg', '2', 'g']],\n     [['sugar ', '4', 'tsp'], ['grape', '2', 'each'], ['grape', '1/4', 'kg']]],\n    {'Tomato': ['2', 'tsp']}],\n   [['berry', '3/4', 'tsp'], ['egg', '2', 'g'], ['grape', '2', 'each'], ['grape', '250', 'g'],\n    ['grape', '2', 'tbsp'], ['pea', '2', 'tsp'], ['potato', '1/4', 'cup'], ['sugar', '1/2', 'each'],\n    ['sugar', '3/2', 'tbsp'], ['watercress', '3', 'cup']]],\n  ['generated control 2',\n   [[[['sugar ', '1/2', 'tbsp'], ['egg', '1/4', 'tbsp']],\n     [['egg', '4', 'tbsp'], ['watercress', '1/3', 'tbsp']],\n     [['tomatoes', '3', 'each'], ['peas', '2', 'tsp']]],\n    {'peas': ['1/2', 'each'], 'sugar ': ['1/3', 'g']}],\n   [['egg', '17/64', 'cup'], ['pea', '2', 'tsp'], ['sugar', '3/2', 'tsp'], ['tomato', '3', 'each'],\n    ['watercress', '1', 'tsp']]],\n  ['generated control 3',\n   [[[['berry', '1/2', 'tsp'], ['watercress', '1/3', 'tsp'], ['Tomato', '1/3', 'tsp'], ['grape', '2', 'kg']]],\n    {'flour': ['3/4', 'tsp']}],\n   [['berry', '1/2', 'tsp'], ['grape', '2', 'kg'], ['tomato', '1/3', 'tsp'], ['watercress', '1/3', 'tsp']]]],\n [['merge plurals', [[[['tomatoes', '2', 'each']], [['Tomato', '1', 'each']]], {}],\n   [['tomato', '3', 'each']]],\n  ['pantry covers all', [[[['eggs', '2', 'each']]], {'egg': ['6', 'each']}], []],\n  ['watercress keeps ss', [[[['watercress', '100', 'g']]], {}], [['watercress', '100', 'g']]],\n  ['regression: pantry name normalization',\n   [[[['peas', '3/4', 'cup'], ['watercress', '2', 'g'], ['berry', '4', 'cup'], ['egg', '1/3', 'cup']]],\n    {'eggs': ['1/2', 'tbsp']}],\n   [['berry', '4', 'cup'], ['egg', '29/96', 'cup'], ['pea', '3/4', 'cup'], ['watercress', '2', 'g']]],\n  ['repair check: pantry name normalization',\n   [[[['grapes', '2', 'tbsp'], ['grape', '3/4', 'g']],\n     [['grape', '2', 'kg'], ['watercress', '1/3', 'tbsp'], ['egg', '1/4', 'kg'], ['eggs', '1', 'tsp']],\n     [['peas', '1/3', 'tbsp']]],\n    {'peas': ['1/2', 'cup']}],\n   [['egg', '250', 'g'], ['egg', '1', 'tsp'], ['grape', '8003/4000', 'kg'], ['grape', '2', 'tbsp'],\n    ['watercress', '1', 'tsp']]],\n  ['generated control 1',\n   [[[['flour', '3/4', 'tsp'], ['grapes', '1/2', 'cup']],\n     [['peas', '1/2', 'tsp'], ['tomatoes', '3/4', 'tbsp'], ['berries', '1', 'cup'], ['eggs', '4', 'kg']]],\n    {}],\n   [['berry', '1', 'cup'], ['egg', '4', 'kg'], ['flour', '3/4', 'tsp'], ['grape', '1/2', 'cup'],\n    ['pea', '1/2', 'tsp'], ['tomato', '9/4', 'tsp']]],\n  ['generated control 2',\n   [[[['berry', '4', 'each'], ['Tomato', '3/4', 'each'], ['grape', '3', 'g'], ['sugar ', '4', 'tbsp']],\n     [['sugar ', '2', 'each'], ['watercress', '3/4', 'tsp']]],\n    {'berries': ['1/2', 'tsp']}],\n   [['berry', '4', 'each'], ['grape', '3', 'g'], ['sugar', '2', 'each'], ['sugar', '1/4', 'cup'],\n    ['tomato', '3/4', 'each'], ['watercress', '3/4', 'tsp']]],\n  ['generated control 3',\n   [[[['flour', '3', 'g'], ['grape', '3', 'tsp']],\n     [['tomatoes', '1', 'g'], ['potatoes', '1/4', 'cup'], ['berries', '1/3', 'cup']]],\n    {'berry': ['1/4', 'tsp'], 'sugar ': ['1', 'kg']}],\n   [['berry', '21/64', 'cup'], ['flour', '3', 'g'], ['grape', '1', 'tbsp'], ['potato', '1/4', 'cup'],\n    ['tomato', '1', 'g']]]],\n [['pantry covers all', [[[['eggs', '2', 'each']]], {'egg': ['6', 'each']}], []],\n  ['watercress keeps ss', [[[['watercress', '100', 'g']]], {}], [['watercress', '100', 'g']]],\n  ['single recipe', [[[['flour', '1', 'cup']]], {}], [['flour', '1', 'cup']]],\n  ['regression: pantry name normalization',\n   [[[['tomatoes', '3', 'g'], ['Tomato', '1/3', 'cup'], ['grapes', '4', 'tbsp'], ['potatoes', '1/3', 'tsp']],\n     [['eggs', '1/2', 'each'], ['tomatoes', '2', 'g']],\n     [['tomatoes', '3/4', 'g'], ['egg', '1/3', 'tsp'], ['berries', '2', 'kg'], ['peas', '2', 'cup']]],\n    {'berry': ['1/3', 'cup'], 'tomatoes': ['4', 'tbsp']}],\n   [['berry', '2', 'kg'], ['egg', '1/2', 'each'], ['egg', '1/3', 'tsp'], ['grape', '1/4', 'cup'],\n    ['pea', '2', 'cup'], ['potato', '1/3', 'tsp'], ['tomato', '23/4', 'g'], ['tomato', '4/3', 'tbsp']]],\n  ['repair check: pantry name normalization',\n   [[[['tomatoes', '4', 'g'], ['tomatoes', '1/2', 'each'], ['Tomato', '3', 'tsp'],\n      ['grapes', '1/4', 'tbsp']]],\n    {'grapes': ['1', 'tsp']}],\n   [['tomato', '1/2', 'each'], ['tomato', '4', 'g'], ['tomato', '1', 'tbsp']]],\n  ['generated control 1',\n   [[[['grapes', '1/3', 'kg'], ['sugar ', '1/2', 'each'], ['Tomato', '1/2', 'each']]], {}],\n   [['grape', '1000/3', 'g'], ['sugar', '1/2', 'each'], ['tomato', '1/2', 'each']]],\n  ['generated control 2', [[[['eggs', '4', 'kg'], ['Tomato', '1/3', 'each'], ['berries', '1/4', 'tsp']]], {}],\n   [['berry', '1/4', 'tsp'], ['egg', '4', 'kg'], ['tomato', '1/3', 'each']]],\n  ['generated control 3',\n   [[[['peas', '1/4', 'cup'], ['sugar ', '1/4', 'each'], ['Tomato', '4', 'g'], ['egg', '2', 'g']]],\n    {'eggs': ['1/4', 'tsp'], 'peas': ['3', 'cup']}],\n   [['egg', '2', 'g'], ['sugar', '1/4', 'each'], ['tomato', '4', 'g']]]],\n [['watercress keeps ss', [[[['watercress', '100', 'g']]], {}], [['watercress', '100', 'g']]],\n  ['single recipe', [[[['flour', '1', 'cup']]], {}], [['flour', '1', 'cup']]],\n  ['merge plurals', [[[['tomatoes', '2', 'each']], [['Tomato', '1', 'each']]], {}],\n   [['tomato', '3', 'each']]],\n  ['regression: pantry name normalization',\n   [[[['egg', '4', 'cup'], ['tomatoes', '3', 'tbsp']], [['peas', '1/3', 'g'], ['sugar ', '1/3', 'each']],\n     [['tomatoes', '1', 'g']]],\n    {'egg': ['1', 'each'], 'eggs': ['3/4', 'tbsp']}],\n   [['egg', '253/64', 'cup'], ['pea', '1/3', 'g'], ['sugar', '1/3', 'each'], ['tomato', '1', 'g'],\n    ['tomato', '3', 'tbsp']]],\n  ['repair check: pantry name normalization',\n   [[[['Tomato', '1/3', 'g'], ['eggs', '3', 'g']], [['watercress', '1/3', 'kg']],\n     [['sugar ', '1/3', 'kg'], ['egg', '1/4', 'kg']]],\n    {'tomatoes': ['4', 'g'], 'watercress': ['2', 'cup']}],\n   [['egg', '253', 'g'], ['sugar', '1000/3', 'g'], ['watercress', '1000/3', 'g']]],\n  ['generated control 1',\n   [[[['watercress', '2', 'cup'], ['tomatoes', '1/4', 'kg'], ['grape', '1/4', 'tbsp'],\n      ['grapes', '3', 'tbsp']],\n     [['watercress', '1', 'kg']], [['sugar ', '4', 'each'], ['berries', '1/3', 'tsp']]],\n    {}],\n   [['berry', '1/3', 'tsp'], ['grape', '13/4', 'tbsp'], ['sugar', '4', 'each'], ['tomato', '250', 'g'],\n    ['watercress', '1', 'kg'], ['watercress', '2', 'cup']]],\n  ['generated control 2',\n   [[[['peas', '1/3', 'each'], ['flour', '4', 'kg'], ['Tomato', '1/2', 'tbsp']]], {'berry': ['4', 'each']}],\n   [['flour', '4', 'kg'], ['pea', '1/3', 'each'], ['tomato', '3/2', 'tsp']]],\n  ['generated control 3',\n   [[[['potatoes', '4', 'kg'], ['sugar ', '3/4', 'cup']], [['peas', '3', 'kg'], ['potatoes', '2', 'tbsp']],\n     [['watercress', '4', 'each'], ['berry', '3', 'cup'], ['grape', '1/4', 'each']]],\n    {'berries': ['2', 'g'], 'berry': ['1/4', 'cup']}],\n   [['berry', '11/4', 'cup'], ['grape', '1/4', 'each'], ['pea', '3', 'kg'], ['potato', '4', 'kg'],\n    ['potato', '2', 'tbsp'], ['sugar', '3/4', 'cup'], ['watercress', '4', 'each']]]],\n [['single recipe', [[[['flour', '1', 'cup']]], {}], [['flour', '1', 'cup']]],\n  ['merge plurals', [[[['tomatoes', '2', 'each']], [['Tomato', '1', 'each']]], {}],\n   [['tomato', '3', 'each']]],\n  ['pantry covers all', [[[['eggs', '2', 'each']]], {'egg': ['6', 'each']}], []],\n  ['regression: pantry name normalization',\n   [[[['grape', '1/2', 'each'], ['potatoes', '3/4', 'each']],\n     [['berry', '3', 'g'], ['tomatoes', '1/2', 'tsp']]],\n    {'grapes': ['3/4', 'each']}],\n   [['berry', '3', 'g'], ['potato', '3/4', 'each'], ['tomato', '1/2', 'tsp']]],\n  ['repair check: pantry name normalization',\n   [[[['flour', '3/4', 'cup'], ['berries', '2', 'tsp'], ['watercress', '1/2', 'tbsp']],\n     [['tomatoes', '3/4', 'each'], ['watercress', '1', 'cup'], ['sugar ', '1/2', 'tbsp'],\n      ['berry', '1/2', 'tbsp']]],\n    {'egg': ['1/3', 'each'], 'sugar ': ['1/4', 'cup']}],\n   [['berry', '7/6', 'tbsp'], ['flour', '3/4', 'cup'], ['tomato', '3/4', 'each'],\n    ['watercress', '33/32', 'cup']]],\n  ['generated control 1',\n   [[[['egg', '2', 'g'], ['eggs', '4', 'tsp']],\n     [['peas', '1/2', 'tbsp'], ['watercress', '1/4', 'tbsp'], ['tomatoes', '4', 'g']],\n     [['egg', '4', 'cup']]],\n    {'grapes': ['4', 'cup'], 'watercress': ['1/3', 'cup']}],\n   [['egg', '2', 'g'], ['egg', '49/12', 'cup'], ['pea', '3/2', 'tsp'], ['tomato', '4', 'g']]],\n  ['generated control 2',\n   [[[['sugar ', '2', 'kg'], ['grape', '4', 'each'], ['flour', '4', 'kg']],\n     [['flour', '1/3', 'tsp'], ['tomatoes', '4', 'each'], ['berries', '1/4', 'tsp'], ['peas', '1/4', 'each']],\n     [['tomatoes', '3/4', 'tsp'], ['watercress', '4', 'each'], ['flour', '3/4', 'each'],\n      ['eggs', '1/2', 'g']]],\n    {'flour': ['2', 'tbsp']}],\n   [['berry', '1/4', 'tsp'], ['egg', '1/2', 'g'], ['flour', '3/4', 'each'], ['flour', '4', 'kg'],\n    ['grape', '4', 'each'], ['pea', '1/4', 'each'], ['sugar', '2', 'kg'], ['tomato', '4', 'each'],\n    ['tomato', '3/4', 'tsp'], ['watercress', '4', 'each']]],\n  ['generated control 3',\n   [[[['eggs', '4', 'tbsp']], [['berry', '3/4', 'each'], ['tomatoes', '3', 'g'], ['grapes', '1/2', 'kg']]],\n    {}],\n   [['berry', '3/4', 'each'], ['egg', '1/4', 'cup'], ['grape', '500', 'g'], ['tomato', '3', 'g']]]]]\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-shopping-list-pantry-name-normalization","generated_at":"2026-09-29T14:52:29.280675+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Meal planners merge ingredient lists across recipes and subtract what is already in the pantry.","repair":"Normalize pantry names with the same function.","root_cause":"Pantry names are looked up without the plural normalization applied to recipe rows.","sha256":"e9221727c3b04c86e214abea977f5faa360a7e2251c315175ad89e45645574bf","title":"Shopping list aggregator: pantry name normalization · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":42.996,"exit_code":1,"observations":[{"actual":[["flour","1","cup"]],"check":"single recipe","expected":[["flour","1","cup"]],"passed":true},{"actual":[["tomato","3","each"]],"check":"merge plurals","expected":[["tomato","3","each"]],"passed":true},{"actual":[],"check":"pantry covers all","expected":[],"passed":true},{"actual":[["berry","67/16","cup"],["flour","1","tbsp"],["potato","4","kg"],["sugar","3/4","tsp"],["tomato","1","tsp"],["watercress","1/2","g"],["watercress","3/4","tsp"]],"check":"regression: pantry name normalization","expected":[["berry","55/16","cup"],["flour","1","tbsp"],["potato","4","kg"],["sugar","3/4","tsp"],["watercress","1/2","g"],["watercress","3/4","tsp"]],"passed":false},{"actual":[["berry","3","each"],["egg","3/4","cup"],["grape","4","kg"],["tomato","3/4","cup"]],"check":"repair check: pantry name normalization","expected":[["berry","3","each"],["egg","3/4","cup"],["grape","2","kg"],["tomato","3/4","cup"]],"passed":false},{"actual":[["berry","3/4","tsp"],["egg","2","g"],["grape","2","each"],["grape","250","g"],["grape","2","tbsp"],["pea","2","tsp"],["potato","1/4","cup"],["sugar","1/2","each"],["sugar","3/2","tbsp"],["watercress","3","cup"]],"check":"generated control 1","expected":[["berry","3/4","tsp"],["egg","2","g"],["grape","2","each"],["grape","250","g"],["grape","2","tbsp"],["pea","2","tsp"],["potato","1/4","cup"],["sugar","1/2","each"],["sugar","3/2","tbsp"],["watercress","3","cup"]],"passed":true},{"actual":[["egg","17/64","cup"],["pea","2","tsp"],["sugar","3/2","tsp"],["tomato","3","each"],["watercress","1","tsp"]],"check":"generated control 2","expected":[["egg","17/64","cup"],["pea","2","tsp"],["sugar","3/2","tsp"],["tomato","3","each"],["watercress","1","tsp"]],"passed":true},{"actual":[["berry","1/2","tsp"],["grape","2","kg"],["tomato","1/3","tsp"],["watercress","1/3","tsp"]],"check":"generated control 3","expected":[["berry","1/2","tsp"],["grape","2","kg"],["tomato","1/3","tsp"],["watercress","1/3","tsp"]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"single recipe\", \"actual\": [[\"flour\", \"1\", \"cup\"]], \"expected\": [[\"flour\", \"1\", \"cup\"]], \"passed\": true}, {\"check\": \"merge plurals\", \"actual\": [[\"tomato\", \"3\", \"each\"]], \"expected\": [[\"tomato\", \"3\", \"each\"]], \"passed\": true}, {\"check\": \"pantry covers all\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"regression: pantry name normalization\", \"actual\": [[\"berry\", \"67/16\", \"cup\"], [\"flour\", \"1\", \"tbsp\"], [\"potato\", \"4\", \"kg\"], [\"sugar\", \"3/4\", \"tsp\"], [\"tomato\", \"1\", \"tsp\"], [\"watercress\", \"1/2\", \"g\"], [\"watercress\", \"3/4\", \"tsp\"]], \"expected\": [[\"berry\", \"55/16\", \"cup\"], [\"flour\", \"1\", \"tbsp\"], [\"potato\", \"4\", \"kg\"], [\"sugar\", \"3/4\", \"tsp\"], [\"watercress\", \"1/2\", \"g\"], [\"watercress\", \"3/4\", \"tsp\"]], \"passed\": false}, {\"check\": \"repair check: pantry name normalization\", \"actual\": [[\"berry\", \"3\", \"each\"], [\"egg\", \"3/4\", \"cup\"], [\"grape\", \"4\", \"kg\"], [\"tomato\", \"3/4\", \"cup\"]], \"expected\": [[\"berry\", \"3\", \"each\"], [\"egg\", \"3/4\", \"cup\"], [\"grape\", \"2\", \"kg\"], [\"tomato\", \"3/4\", \"cup\"]], \"passed\": false}, {\"check\": \"generated control 1\", \"actual\": [[\"berry\", \"3/4\", \"tsp\"], [\"egg\", \"2\", \"g\"], [\"grape\", \"2\", \"each\"], [\"grape\", \"250\", \"g\"], [\"grape\", \"2\", \"tbsp\"], [\"pea\", \"2\", \"tsp\"], [\"potato\", \"1/4\", \"cup\"], [\"sugar\", \"1/2\", \"each\"], [\"sugar\", \"3/2\", \"tbsp\"], [\"watercress\", \"3\", \"cup\"]], \"expected\": [[\"berry\", \"3/4\", \"tsp\"], [\"egg\", \"2\", \"g\"], [\"grape\", \"2\", \"each\"], [\"grape\", \"250\", \"g\"], [\"grape\", \"2\", \"tbsp\"], [\"pea\", \"2\", \"tsp\"], [\"potato\", \"1/4\", \"cup\"], [\"sugar\", \"1/2\", \"each\"], [\"sugar\", \"3/2\", \"tbsp\"], [\"watercress\", \"3\", \"cup\"]], \"passed\": true}, {\"check\": \"generated control 2\", \"actual\": [[\"egg\", \"17/64\", \"cup\"], [\"pea\", \"2\", \"tsp\"], [\"sugar\", \"3/2\", \"tsp\"], [\"tomato\", \"3\", \"each\"], [\"watercress\", \"1\", \"tsp\"]], \"expected\": [[\"egg\", \"17/64\", \"cup\"], [\"pea\", \"2\", \"tsp\"], [\"sugar\", \"3/2\", \"tsp\"], [\"tomato\", \"3\", \"each\"], [\"watercress\", \"1\", \"tsp\"]], \"passed\": true}, {\"check\": \"generated control 3\", \"actual\": [[\"berry\", \"1/2\", \"tsp\"], [\"grape\", \"2\", \"kg\"], [\"tomato\", \"1/3\", \"tsp\"], [\"watercress\", \"1/3\", \"tsp\"]], \"expected\": [[\"berry\", \"1/2\", \"tsp\"], [\"grape\", \"2\", \"kg\"], [\"tomato\", \"1/3\", \"tsp\"], [\"watercress\", \"1/3\", \"tsp\"]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":45.311,"exit_code":1,"observations":[{"actual":[["flour","1","cup"]],"check":"single recipe","expected":[["flour","1","cup"]],"passed":true},{"actual":[["tomato","3","each"]],"check":"merge plurals","expected":[["tomato","3","each"]],"passed":true},{"actual":[],"check":"pantry covers all","expected":[],"passed":true},{"actual":[["berry","67/16","cup"],["flour","1","tbsp"],["potato","4","kg"],["sugar","3/4","tsp"],["tomato","1","tsp"],["watercress","1/2","g"],["watercress","3/4","tsp"]],"check":"regression: pantry name normalization","expected":[["berry","55/16","cup"],["flour","1","tbsp"],["potato","4","kg"],["sugar","3/4","tsp"],["watercress","1/2","g"],["watercress","3/4","tsp"]],"passed":false},{"actual":[["berry","3","each"],["egg","3/4","cup"],["grape","4","kg"],["tomato","3/4","cup"]],"check":"repair check: pantry name normalization","expected":[["berry","3","each"],["egg","3/4","cup"],["grape","2","kg"],["tomato","3/4","cup"]],"passed":false},{"actual":[["berry","3/4","tsp"],["egg","2","g"],["grape","2","each"],["grape","250","g"],["grape","2","tbsp"],["pea","2","tsp"],["potato","1/4","cup"],["sugar","1/2","each"],["sugar","3/2","tbsp"],["watercress","3","cup"]],"check":"generated control 1","expected":[["berry","3/4","tsp"],["egg","2","g"],["grape","2","each"],["grape","250","g"],["grape","2","tbsp"],["pea","2","tsp"],["potato","1/4","cup"],["sugar","1/2","each"],["sugar","3/2","tbsp"],["watercress","3","cup"]],"passed":true},{"actual":[["egg","17/64","cup"],["pea","2","tsp"],["sugar","3/2","tsp"],["tomato","3","each"],["watercress","1","tsp"]],"check":"generated control 2","expected":[["egg","17/64","cup"],["pea","2","tsp"],["sugar","3/2","tsp"],["tomato","3","each"],["watercress","1","tsp"]],"passed":true},{"actual":[["berry","1/2","tsp"],["grape","2","kg"],["tomato","1/3","tsp"],["watercress","1/3","tsp"]],"check":"generated control 3","expected":[["berry","1/2","tsp"],["grape","2","kg"],["tomato","1/3","tsp"],["watercress","1/3","tsp"]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"single recipe\", \"actual\": [[\"flour\", \"1\", \"cup\"]], \"expected\": [[\"flour\", \"1\", \"cup\"]], \"passed\": true}, {\"check\": \"merge plurals\", \"actual\": [[\"tomato\", \"3\", \"each\"]], \"expected\": [[\"tomato\", \"3\", \"each\"]], \"passed\": true}, {\"check\": \"pantry covers all\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"regression: pantry name normalization\", \"actual\": [[\"berry\", \"67/16\", \"cup\"], [\"flour\", \"1\", \"tbsp\"], [\"potato\", \"4\", \"kg\"], [\"sugar\", \"3/4\", \"tsp\"], [\"tomato\", \"1\", \"tsp\"], [\"watercress\", \"1/2\", \"g\"], [\"watercress\", \"3/4\", \"tsp\"]], \"expected\": [[\"berry\", \"55/16\", \"cup\"], [\"flour\", \"1\", \"tbsp\"], [\"potato\", \"4\", \"kg\"], [\"sugar\", \"3/4\", \"tsp\"], [\"watercress\", \"1/2\", \"g\"], [\"watercress\", \"3/4\", \"tsp\"]], \"passed\": false}, {\"check\": \"repair check: pantry name normalization\", \"actual\": [[\"berry\", \"3\", \"each\"], [\"egg\", \"3/4\", \"cup\"], [\"grape\", \"4\", \"kg\"], [\"tomato\", \"3/4\", \"cup\"]], \"expected\": [[\"berry\", \"3\", \"each\"], [\"egg\", \"3/4\", \"cup\"], [\"grape\", \"2\", \"kg\"], [\"tomato\", \"3/4\", \"cup\"]], \"passed\": false}, {\"check\": \"generated control 1\", \"actual\": [[\"berry\", \"3/4\", \"tsp\"], [\"egg\", \"2\", \"g\"], [\"grape\", \"2\", \"each\"], [\"grape\", \"250\", \"g\"], [\"grape\", \"2\", \"tbsp\"], [\"pea\", \"2\", \"tsp\"], [\"potato\", \"1/4\", \"cup\"], [\"sugar\", \"1/2\", \"each\"], [\"sugar\", \"3/2\", \"tbsp\"], [\"watercress\", \"3\", \"cup\"]], \"expected\": [[\"berry\", \"3/4\", \"tsp\"], [\"egg\", \"2\", \"g\"], [\"grape\", \"2\", \"each\"], [\"grape\", \"250\", \"g\"], [\"grape\", \"2\", \"tbsp\"], [\"pea\", \"2\", \"tsp\"], [\"potato\", \"1/4\", \"cup\"], [\"sugar\", \"1/2\", \"each\"], [\"sugar\", \"3/2\", \"tbsp\"], [\"watercress\", \"3\", \"cup\"]], \"passed\": true}, {\"check\": \"generated control 2\", \"actual\": [[\"egg\", \"17/64\", \"cup\"], [\"pea\", \"2\", \"tsp\"], [\"sugar\", \"3/2\", \"tsp\"], [\"tomato\", \"3\", \"each\"], [\"watercress\", \"1\", \"tsp\"]], \"expected\": [[\"egg\", \"17/64\", \"cup\"], [\"pea\", \"2\", \"tsp\"], [\"sugar\", \"3/2\", \"tsp\"], [\"tomato\", \"3\", \"each\"], [\"watercress\", \"1\", \"tsp\"]], \"passed\": true}, {\"check\": \"generated control 3\", \"actual\": [[\"berry\", \"1/2\", \"tsp\"], [\"grape\", \"2\", \"kg\"], [\"tomato\", \"1/3\", \"tsp\"], [\"watercress\", \"1/3\", \"tsp\"]], \"expected\": [[\"berry\", \"1/2\", \"tsp\"], [\"grape\", \"2\", \"kg\"], [\"tomato\", \"1/3\", \"tsp\"], [\"watercress\", \"1/3\", \"tsp\"]], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":44.771,"exit_code":0,"observations":[{"actual":[["flour","1","cup"]],"check":"single recipe","expected":[["flour","1","cup"]],"passed":true},{"actual":[["tomato","3","each"]],"check":"merge plurals","expected":[["tomato","3","each"]],"passed":true},{"actual":[],"check":"pantry covers all","expected":[],"passed":true},{"actual":[["berry","55/16","cup"],["flour","1","tbsp"],["potato","4","kg"],["sugar","3/4","tsp"],["watercress","1/2","g"],["watercress","3/4","tsp"]],"check":"regression: pantry name normalization","expected":[["berry","55/16","cup"],["flour","1","tbsp"],["potato","4","kg"],["sugar","3/4","tsp"],["watercress","1/2","g"],["watercress","3/4","tsp"]],"passed":true},{"actual":[["berry","3","each"],["egg","3/4","cup"],["grape","2","kg"],["tomato","3/4","cup"]],"check":"repair check: pantry name normalization","expected":[["berry","3","each"],["egg","3/4","cup"],["grape","2","kg"],["tomato","3/4","cup"]],"passed":true},{"actual":[["berry","3/4","tsp"],["egg","2","g"],["grape","2","each"],["grape","250","g"],["grape","2","tbsp"],["pea","2","tsp"],["potato","1/4","cup"],["sugar","1/2","each"],["sugar","3/2","tbsp"],["watercress","3","cup"]],"check":"generated control 1","expected":[["berry","3/4","tsp"],["egg","2","g"],["grape","2","each"],["grape","250","g"],["grape","2","tbsp"],["pea","2","tsp"],["potato","1/4","cup"],["sugar","1/2","each"],["sugar","3/2","tbsp"],["watercress","3","cup"]],"passed":true},{"actual":[["egg","17/64","cup"],["pea","2","tsp"],["sugar","3/2","tsp"],["tomato","3","each"],["watercress","1","tsp"]],"check":"generated control 2","expected":[["egg","17/64","cup"],["pea","2","tsp"],["sugar","3/2","tsp"],["tomato","3","each"],["watercress","1","tsp"]],"passed":true},{"actual":[["berry","1/2","tsp"],["grape","2","kg"],["tomato","1/3","tsp"],["watercress","1/3","tsp"]],"check":"generated control 3","expected":[["berry","1/2","tsp"],["grape","2","kg"],["tomato","1/3","tsp"],["watercress","1/3","tsp"]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"single recipe\", \"actual\": [[\"flour\", \"1\", \"cup\"]], \"expected\": [[\"flour\", \"1\", \"cup\"]], \"passed\": true}, {\"check\": \"merge plurals\", \"actual\": [[\"tomato\", \"3\", \"each\"]], \"expected\": [[\"tomato\", \"3\", \"each\"]], \"passed\": true}, {\"check\": \"pantry covers all\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"regression: pantry name normalization\", \"actual\": [[\"berry\", \"55/16\", \"cup\"], [\"flour\", \"1\", \"tbsp\"], [\"potato\", \"4\", \"kg\"], [\"sugar\", \"3/4\", \"tsp\"], [\"watercress\", \"1/2\", \"g\"], [\"watercress\", \"3/4\", \"tsp\"]], \"expected\": [[\"berry\", \"55/16\", \"cup\"], [\"flour\", \"1\", \"tbsp\"], [\"potato\", \"4\", \"kg\"], [\"sugar\", \"3/4\", \"tsp\"], [\"watercress\", \"1/2\", \"g\"], [\"watercress\", \"3/4\", \"tsp\"]], \"passed\": true}, {\"check\": \"repair check: pantry name normalization\", \"actual\": [[\"berry\", \"3\", \"each\"], [\"egg\", \"3/4\", \"cup\"], [\"grape\", \"2\", \"kg\"], [\"tomato\", \"3/4\", \"cup\"]], \"expected\": [[\"berry\", \"3\", \"each\"], [\"egg\", \"3/4\", \"cup\"], [\"grape\", \"2\", \"kg\"], [\"tomato\", \"3/4\", \"cup\"]], \"passed\": true}, {\"check\": \"generated control 1\", \"actual\": [[\"berry\", \"3/4\", \"tsp\"], [\"egg\", \"2\", \"g\"], [\"grape\", \"2\", \"each\"], [\"grape\", \"250\", \"g\"], [\"grape\", \"2\", \"tbsp\"], [\"pea\", \"2\", \"tsp\"], [\"potato\", \"1/4\", \"cup\"], [\"sugar\", \"1/2\", \"each\"], [\"sugar\", \"3/2\", \"tbsp\"], [\"watercress\", \"3\", \"cup\"]], \"expected\": [[\"berry\", \"3/4\", \"tsp\"], [\"egg\", \"2\", \"g\"], [\"grape\", \"2\", \"each\"], [\"grape\", \"250\", \"g\"], [\"grape\", \"2\", \"tbsp\"], [\"pea\", \"2\", \"tsp\"], [\"potato\", \"1/4\", \"cup\"], [\"sugar\", \"1/2\", \"each\"], [\"sugar\", \"3/2\", \"tbsp\"], [\"watercress\", \"3\", \"cup\"]], \"passed\": true}, {\"check\": \"generated control 2\", \"actual\": [[\"egg\", \"17/64\", \"cup\"], [\"pea\", \"2\", \"tsp\"], [\"sugar\", \"3/2\", \"tsp\"], [\"tomato\", \"3\", \"each\"], [\"watercress\", \"1\", \"tsp\"]], \"expected\": [[\"egg\", \"17/64\", \"cup\"], [\"pea\", \"2\", \"tsp\"], [\"sugar\", \"3/2\", \"tsp\"], [\"tomato\", \"3\", \"each\"], [\"watercress\", \"1\", \"tsp\"]], \"passed\": true}, {\"check\": \"generated control 3\", \"actual\": [[\"berry\", \"1/2\", \"tsp\"], [\"grape\", \"2\", \"kg\"], [\"tomato\", \"1/3\", \"tsp\"], [\"watercress\", \"1/3\", \"tsp\"]], \"expected\": [[\"berry\", \"1/2\", \"tsp\"], [\"grape\", \"2\", \"kg\"], [\"tomato\", \"1/3\", \"tsp\"], [\"watercress\", \"1/3\", \"tsp\"]], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}