{"abstract":"A 36 inch bust is sized XS.","category":"Knitting and sewing pattern grading","checks":8,"contract":"Chart (cm) XS 80/62/86, S 86/68/92, M 92/74/98, L 100/82/106, XL 108/90/114 (bust/waist/hip). Inches convert at 2.54. A size fits a measurement when chart + 1 cm >= body; pick the smallest fitting size. top: by bust; skirt: the larger of waist size and hip size; dress: bust size and hip size, same -> that size, else \"grade A to B\" (bust size to hip size). No fitting size -> \"out of range\"; other garments -> \"error: garment\".","contract_signature":"bust, waist, hip, garment, units","evaluation_group":"w2-knitting_and_sewing_pattern_grading-size-selection","failed_approach":"Rounding to 2.5 cm per inch shifts sizes near the tolerance edge.","family":"w2-knitting_and_sewing_pattern_grading-size-selection-inch-conversion","id":"FA-97546","implementations":{"attempt":{"sha256":"a39c3a31907695a671bc33e8e3bfc0385f9c628a5951030805db749e55cd1a0c","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(bust, waist, hip, garment, units):\n    CHART = [['XS', 80, 62, 86], ['S', 86, 68, 92], ['M', 92, 74, 98], ['L', 100, 82, 106], ['XL', 108, 90, 114]]\n    ORDER = [row[0] for row in CHART]\n    k = Fraction(5, 2) if units == 'in' else Fraction(1)\n    b, w, h = (Fraction(str(v)) * k for v in (bust, waist, hip))\n    def pick(col, v):\n        for row in CHART:\n            if row[col] + 1 >= v:\n                return row[0]\n        return None\n    if garment == 'top':\n        s = pick(1, b)\n        return s if s else 'out of range'\n    if garment == 'skirt':\n        a, c = pick(2, w), pick(3, h)\n        if not a or not c:\n            return 'out of range'\n        return max(a, c, key=ORDER.index)\n    if garment == 'dress':\n        a, c = pick(1, b), pick(3, h)\n        if not a or not c:\n            return 'out of range'\n        return a if a == c else 'grade %s to %s' % (a, c)\n    return 'error: garment' \ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['top within tolerance', [93, 70, 95, 'top', 'cm'], 'M'],\n  ['skirt waist governs', [90, 80, 95, 'skirt', 'cm'], 'L'],\n  ['dress grade', [86, 70, 104, 'dress', 'cm'], 'grade S to L'],\n  ['regression: inch conversion', [34, 27, 38, 'skirt', 'in'], 'M'],\n  ['repair check: inch conversion', [40, 25, 40, 'dress', 'in'], 'grade XL to L'],\n  ['generated control 1', [80, 89, 93, 'skirt', 'cm'], 'XL'],\n  ['generated control 2', [108, 74, 94, 'coat', 'cm'], 'error: garment'],\n  ['generated control 3', [106, 70, 94, 'dress', 'cm'], 'grade XL to M']],\n [['skirt waist governs', [90, 80, 95, 'skirt', 'cm'], 'L'],\n  ['dress grade', [86, 70, 104, 'dress', 'cm'], 'grade S to L'],\n  ['inches top', [36, 28, 38, 'top', 'in'], 'M'],\n  ['regression: inch conversion', [42.5, 25, 34, 'dress', 'in'], 'grade XL to XS'],\n  ['repair check: inch conversion', [40, 25, 36, 'top', 'in'], 'XL'],\n  ['generated control 1', [34, 27, 36, 'coat', 'in'], 'error: garment'],\n  ['generated control 2', [42.5, 31, 43, 'dress', 'in'], 'XL'],\n  ['generated control 3', [34, 31, 40, 'skirt', 'in'], 'L']],\n [['dress grade', [86, 70, 104, 'dress', 'cm'], 'grade S to L'],\n  ['inches top', [36, 28, 38, 'top', 'in'], 'M'],\n  ['out of range dress', [120, 90, 100, 'dress', 'cm'], 'out of range'],\n  ['regression: inch conversion', [34, 34, 36, 'top', 'in'], 'S'],\n  ['repair check: inch conversion', [40, 31, 40, 'dress', 'in'], 'grade XL to L'],\n  ['generated control 1', [93, 61, 88, 'coat', 'cm'], 'error: garment'],\n  ['generated control 2', [91, 85, 118, 'skirt', 'cm'], 'out of range'],\n  ['generated control 3', [79, 78, 106, 'skirt', 'cm'], 'L']],\n [['inches top', [36, 28, 38, 'top', 'in'], 'M'],\n  ['out of range dress', [120, 90, 100, 'dress', 'cm'], 'out of range'],\n  ['top within tolerance', [93, 70, 95, 'top', 'cm'], 'M'],\n  ['regression: inch conversion', [40, 27, 38, 'dress', 'in'], 'grade XL to M'],\n  ['repair check: inch conversion', [32, 25, 34, 'skirt', 'in'], 'S'],\n  ['generated control 1', [96, 93, 95, 'skirt', 'cm'], 'out of range'],\n  ['generated control 2', [95, 78, 107, 'dress', 'cm'], 'L'],\n  ['generated control 3', [110, 94, 112, 'dress', 'cm'], 'out of range']],\n [['out of range dress', [120, 90, 100, 'dress', 'cm'], 'out of range'],\n  ['top within tolerance', [93, 70, 95, 'top', 'cm'], 'M'],\n  ['skirt waist governs', [90, 80, 95, 'skirt', 'cm'], 'L'],\n  ['regression: inch conversion', [34, 34, 38, 'dress', 'in'], 'grade S to M'],\n  ['repair check: inch conversion', [40, 25, 38, 'top', 'in'], 'XL'],\n  ['generated control 1', [107, 89, 114, 'skirt', 'cm'], 'XL'],\n  ['generated control 2', [111, 89, 90, 'coat', 'cm'], 'error: garment'],\n  ['generated control 3', [82, 85, 85, 'top', 'cm'], 'S']]]\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":"c967d25dfbc951e5a20443a20a64eda5bbb50adba692cea3bc7897371c5ae66e","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(bust, waist, hip, garment, units):\n    CHART = [['XS', 80, 62, 86], ['S', 86, 68, 92], ['M', 92, 74, 98], ['L', 100, 82, 106], ['XL', 108, 90, 114]]\n    ORDER = [row[0] for row in CHART]\n    k = 1 / Fraction(254, 100) if units == 'in' else Fraction(1)\n    b, w, h = (Fraction(str(v)) * k for v in (bust, waist, hip))\n    def pick(col, v):\n        for row in CHART:\n            if row[col] + 1 >= v:\n                return row[0]\n        return None\n    if garment == 'top':\n        s = pick(1, b)\n        return s if s else 'out of range'\n    if garment == 'skirt':\n        a, c = pick(2, w), pick(3, h)\n        if not a or not c:\n            return 'out of range'\n        return max(a, c, key=ORDER.index)\n    if garment == 'dress':\n        a, c = pick(1, b), pick(3, h)\n        if not a or not c:\n            return 'out of range'\n        return a if a == c else 'grade %s to %s' % (a, c)\n    return 'error: garment' \ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['top within tolerance', [93, 70, 95, 'top', 'cm'], 'M'],\n  ['skirt waist governs', [90, 80, 95, 'skirt', 'cm'], 'L'],\n  ['dress grade', [86, 70, 104, 'dress', 'cm'], 'grade S to L'],\n  ['regression: inch conversion', [34, 27, 38, 'skirt', 'in'], 'M'],\n  ['repair check: inch conversion', [40, 25, 40, 'dress', 'in'], 'grade XL to L'],\n  ['generated control 1', [80, 89, 93, 'skirt', 'cm'], 'XL'],\n  ['generated control 2', [108, 74, 94, 'coat', 'cm'], 'error: garment'],\n  ['generated control 3', [106, 70, 94, 'dress', 'cm'], 'grade XL to M']],\n [['skirt waist governs', [90, 80, 95, 'skirt', 'cm'], 'L'],\n  ['dress grade', [86, 70, 104, 'dress', 'cm'], 'grade S to L'],\n  ['inches top', [36, 28, 38, 'top', 'in'], 'M'],\n  ['regression: inch conversion', [42.5, 25, 34, 'dress', 'in'], 'grade XL to XS'],\n  ['repair check: inch conversion', [40, 25, 36, 'top', 'in'], 'XL'],\n  ['generated control 1', [34, 27, 36, 'coat', 'in'], 'error: garment'],\n  ['generated control 2', [42.5, 31, 43, 'dress', 'in'], 'XL'],\n  ['generated control 3', [34, 31, 40, 'skirt', 'in'], 'L']],\n [['dress grade', [86, 70, 104, 'dress', 'cm'], 'grade S to L'],\n  ['inches top', [36, 28, 38, 'top', 'in'], 'M'],\n  ['out of range dress', [120, 90, 100, 'dress', 'cm'], 'out of range'],\n  ['regression: inch conversion', [34, 34, 36, 'top', 'in'], 'S'],\n  ['repair check: inch conversion', [40, 31, 40, 'dress', 'in'], 'grade XL to L'],\n  ['generated control 1', [93, 61, 88, 'coat', 'cm'], 'error: garment'],\n  ['generated control 2', [91, 85, 118, 'skirt', 'cm'], 'out of range'],\n  ['generated control 3', [79, 78, 106, 'skirt', 'cm'], 'L']],\n [['inches top', [36, 28, 38, 'top', 'in'], 'M'],\n  ['out of range dress', [120, 90, 100, 'dress', 'cm'], 'out of range'],\n  ['top within tolerance', [93, 70, 95, 'top', 'cm'], 'M'],\n  ['regression: inch conversion', [40, 27, 38, 'dress', 'in'], 'grade XL to M'],\n  ['repair check: inch conversion', [32, 25, 34, 'skirt', 'in'], 'S'],\n  ['generated control 1', [96, 93, 95, 'skirt', 'cm'], 'out of range'],\n  ['generated control 2', [95, 78, 107, 'dress', 'cm'], 'L'],\n  ['generated control 3', [110, 94, 112, 'dress', 'cm'], 'out of range']],\n [['out of range dress', [120, 90, 100, 'dress', 'cm'], 'out of range'],\n  ['top within tolerance', [93, 70, 95, 'top', 'cm'], 'M'],\n  ['skirt waist governs', [90, 80, 95, 'skirt', 'cm'], 'L'],\n  ['regression: inch conversion', [34, 34, 38, 'dress', 'in'], 'grade S to M'],\n  ['repair check: inch conversion', [40, 25, 38, 'top', 'in'], 'XL'],\n  ['generated control 1', [107, 89, 114, 'skirt', 'cm'], 'XL'],\n  ['generated control 2', [111, 89, 90, 'coat', 'cm'], 'error: garment'],\n  ['generated control 3', [82, 85, 85, 'top', 'cm'], 'S']]]\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-knitting_and_sewing_pattern_grading-size-selection-inch-conversion","generated_at":"2026-09-29T14:52:33.240452+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Sewists choose a pattern size per body zone and grade between sizes.","root_cause":"Inches are divided by 2.54 instead of multiplied.","sha256":"578d4fa4d5e2c5e2bdcdb5970043817e9cad9af4f97c64d519a01fdc5ac1dc7a","title":"Pattern size selector: inch conversion · 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":44.364,"exit_code":1,"observations":[{"actual":"M","check":"top within tolerance","expected":"M","passed":true},{"actual":"L","check":"skirt waist governs","expected":"L","passed":true},{"actual":"grade S to L","check":"dress grade","expected":"grade S to L","passed":true},{"actual":"M","check":"regression: inch conversion","expected":"M","passed":true},{"actual":"L","check":"repair check: inch conversion","expected":"grade XL to L","passed":false},{"actual":"XL","check":"generated control 1","expected":"XL","passed":true},{"actual":"error: garment","check":"generated control 2","expected":"error: garment","passed":true},{"actual":"grade XL to M","check":"generated control 3","expected":"grade XL to M","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"top within tolerance\", \"actual\": \"M\", \"expected\": \"M\", \"passed\": true}, {\"check\": \"skirt waist governs\", \"actual\": \"L\", \"expected\": \"L\", \"passed\": true}, {\"check\": \"dress grade\", \"actual\": \"grade S to L\", \"expected\": \"grade S to L\", \"passed\": true}, {\"check\": \"regression: inch conversion\", \"actual\": \"M\", \"expected\": \"M\", \"passed\": true}, {\"check\": \"repair check: inch conversion\", \"actual\": \"L\", \"expected\": \"grade XL to L\", \"passed\": false}, {\"check\": \"generated control 1\", \"actual\": \"XL\", \"expected\": \"XL\", \"passed\": true}, {\"check\": \"generated control 2\", \"actual\": \"error: garment\", \"expected\": \"error: garment\", \"passed\": true}, {\"check\": \"generated control 3\", \"actual\": \"grade XL to M\", \"expected\": \"grade XL to M\", \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.298,"exit_code":1,"observations":[{"actual":"M","check":"top within tolerance","expected":"M","passed":true},{"actual":"L","check":"skirt waist governs","expected":"L","passed":true},{"actual":"grade S to L","check":"dress grade","expected":"grade S to L","passed":true},{"actual":"XS","check":"regression: inch conversion","expected":"M","passed":false},{"actual":"XS","check":"repair check: inch conversion","expected":"grade XL to L","passed":false},{"actual":"XL","check":"generated control 1","expected":"XL","passed":true},{"actual":"error: garment","check":"generated control 2","expected":"error: garment","passed":true},{"actual":"grade XL to M","check":"generated control 3","expected":"grade XL to M","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"top within tolerance\", \"actual\": \"M\", \"expected\": \"M\", \"passed\": true}, {\"check\": \"skirt waist governs\", \"actual\": \"L\", \"expected\": \"L\", \"passed\": true}, {\"check\": \"dress grade\", \"actual\": \"grade S to L\", \"expected\": \"grade S to L\", \"passed\": true}, {\"check\": \"regression: inch conversion\", \"actual\": \"XS\", \"expected\": \"M\", \"passed\": false}, {\"check\": \"repair check: inch conversion\", \"actual\": \"XS\", \"expected\": \"grade XL to L\", \"passed\": false}, {\"check\": \"generated control 1\", \"actual\": \"XL\", \"expected\": \"XL\", \"passed\": true}, {\"check\": \"generated control 2\", \"actual\": \"error: garment\", \"expected\": \"error: garment\", \"passed\": true}, {\"check\": \"generated control 3\", \"actual\": \"grade XL to M\", \"expected\": \"grade XL to M\", \"passed\": true}], \"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."}}