{"abstract":"Grading a pattern down makes it bigger.","category":"Knitting and sewing pattern grading","checks":8,"contract":"Sizes 6..22 in steps of 2 (others -> \"error: size\"). Grading one size step between sizes s and s+2 changes the circumference by `small` cm if the lower size s < brk, else `large`. Going down subtracts the same step amounts. Return [circumference, per quarter-panel = circumference/4], both half-up to 0.1.","evaluation_group":"w2-knitting_and_sewing_pattern_grading-grade-rules","failed_approach":"Going down with only the small increment ignores the size break.","family":"w2-knitting_and_sewing_pattern_grading-grade-rules-downward-grading-sign","id":"FA-97521","implementations":{"attempt":{"sha256":"e1a2d8c3e9152171c6b37e7fc1b142018dc6d6286c34f7984970f1b8b2fb2dbe","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(base_size, target_size, base_cm, small, large, brk):\n    SIZES = [6, 8, 10, 12, 14, 16, 18, 20, 22]\n    if base_size not in SIZES or target_size not in SIZES:\n        return 'error: size'\n    i, j = SIZES.index(base_size), SIZES.index(target_size)\n    m = Fraction(str(base_cm))\n    step = 1 if j > i else -1\n    k = i\n    while k != j:\n        lo = min(k, k + step)\n        inc = small if SIZES[lo] < brk else large\n        m += inc if j > i else -small\n        k += step\n    q = m / 4\n    return [math.floor(m * 10 + Fraction(1, 2)) / 10, math.floor(q * 10 + Fraction(1, 2)) / 10]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['same size', [12, 12, '92.5', 5, 6, 16], [92.5, 23.1]],\n  ['across the break', [14, 20, '96', 5, 6, 16], [113.0, 28.3]],\n  ['down across the break', [20, 14, '110', 5, 6, 16], [93.0, 23.3]],\n  ['regression: downward grading sign', [14, 10, '96', 5, 6, 16], [86.0, 21.5]],\n  ['repair check: downward grading sign', [22, 16, '88', 4, 7, 16], [67.0, 16.8]],\n  ['generated control 1', [12, 22, '92.5', 4, 7, 16], [121.5, 30.4]],\n  ['generated control 2', [6, 12, '100', 4, 7, 12], [112.0, 28.0]],\n  ['generated control 3', [6, 18, '88', 4, 6, 14], [116.0, 29.0]]],\n [['across the break', [14, 20, '96', 5, 6, 16], [113.0, 28.3]],\n  ['down across the break', [20, 14, '110', 5, 6, 16], [93.0, 23.3]],\n  ['unknown size', [12, 24, '92', 5, 6, 16], 'error: size'],\n  ['regression: downward grading sign', [14, 8, '88', 5, 7, 14], [73.0, 18.3]],\n  ['repair check: downward grading sign', [22, 14, '100', 4, 7, 16], [75.0, 18.8]],\n  ['generated control 1', [10, 6, '96', 5, 6, 12], [86.0, 21.5]],\n  ['generated control 2', [10, 20, '96', 5, 6, 12], [125.0, 31.3]],\n  ['generated control 3', [14, 16, '88', 4, 6, 16], [92.0, 23.0]]],\n [['down across the break', [20, 14, '110', 5, 6, 16], [93.0, 23.3]],\n  ['unknown size', [12, 24, '92', 5, 6, 16], 'error: size'],\n  ['same size', [12, 12, '92.5', 5, 6, 16], [92.5, 23.1]],\n  ['regression: downward grading sign', [14, 8, '96', 4, 6, 12], [82.0, 20.5]],\n  ['repair check: downward grading sign', [20, 6, '96', 5, 7, 16], [57.0, 14.3]],\n  ['generated control 1', [14, 22, '92.5', 4, 7, 16], [117.5, 29.4]],\n  ['generated control 2', [14, 16, '88', 4, 6, 14], [94.0, 23.5]],\n  ['generated control 3', [22, 22, '100', 4, 6, 14], [100.0, 25.0]]],\n [['unknown size', [12, 24, '92', 5, 6, 16], 'error: size'],\n  ['same size', [12, 12, '92.5', 5, 6, 16], [92.5, 23.1]],\n  ['across the break', [14, 20, '96', 5, 6, 16], [113.0, 28.3]],\n  ['regression: downward grading sign', [18, 8, '96', 5, 7, 14], [67.0, 16.8]],\n  ['repair check: downward grading sign', [20, 12, '96', 5, 7, 12], [68.0, 17.0]],\n  ['generated control 1', [14, 16, '100', 5, 6, 18], [105.0, 26.3]],\n  ['generated control 2', [22, 6, '100', 4, 6, 16], [62.0, 15.5]],\n  ['generated control 3', [18, 24, '100', 5, 7, 12], 'error: size']],\n [['same size', [12, 12, '92.5', 5, 6, 16], [92.5, 23.1]],\n  ['across the break', [14, 20, '96', 5, 6, 16], [113.0, 28.3]],\n  ['down across the break', [20, 14, '110', 5, 6, 16], [93.0, 23.3]],\n  ['regression: downward grading sign', [22, 8, '92.5', 5, 7, 12], [47.5, 11.9]],\n  ['repair check: downward grading sign', [16, 12, '88', 4, 7, 14], [77.0, 19.3]],\n  ['generated control 1', [12, 24, '96', 5, 6, 16], 'error: size'],\n  ['generated control 2', [18, 18, '100', 4, 7, 16], [100.0, 25.0]],\n  ['generated control 3', [14, 22, '88', 5, 6, 16], [111.0, 27.8]]]]\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":"5e0d6529a33595cbacf4a5a3662a5a5295a1dd5843a438a2d1821812816b1b86","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(base_size, target_size, base_cm, small, large, brk):\n    SIZES = [6, 8, 10, 12, 14, 16, 18, 20, 22]\n    if base_size not in SIZES or target_size not in SIZES:\n        return 'error: size'\n    i, j = SIZES.index(base_size), SIZES.index(target_size)\n    m = Fraction(str(base_cm))\n    step = 1 if j > i else -1\n    k = i\n    while k != j:\n        lo = min(k, k + step)\n        inc = small if SIZES[lo] < brk else large\n        m += inc\n        k += step\n    q = m / 4\n    return [math.floor(m * 10 + Fraction(1, 2)) / 10, math.floor(q * 10 + Fraction(1, 2)) / 10]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['same size', [12, 12, '92.5', 5, 6, 16], [92.5, 23.1]],\n  ['across the break', [14, 20, '96', 5, 6, 16], [113.0, 28.3]],\n  ['down across the break', [20, 14, '110', 5, 6, 16], [93.0, 23.3]],\n  ['regression: downward grading sign', [14, 10, '96', 5, 6, 16], [86.0, 21.5]],\n  ['repair check: downward grading sign', [22, 16, '88', 4, 7, 16], [67.0, 16.8]],\n  ['generated control 1', [12, 22, '92.5', 4, 7, 16], [121.5, 30.4]],\n  ['generated control 2', [6, 12, '100', 4, 7, 12], [112.0, 28.0]],\n  ['generated control 3', [6, 18, '88', 4, 6, 14], [116.0, 29.0]]],\n [['across the break', [14, 20, '96', 5, 6, 16], [113.0, 28.3]],\n  ['down across the break', [20, 14, '110', 5, 6, 16], [93.0, 23.3]],\n  ['unknown size', [12, 24, '92', 5, 6, 16], 'error: size'],\n  ['regression: downward grading sign', [14, 8, '88', 5, 7, 14], [73.0, 18.3]],\n  ['repair check: downward grading sign', [22, 14, '100', 4, 7, 16], [75.0, 18.8]],\n  ['generated control 1', [10, 6, '96', 5, 6, 12], [86.0, 21.5]],\n  ['generated control 2', [10, 20, '96', 5, 6, 12], [125.0, 31.3]],\n  ['generated control 3', [14, 16, '88', 4, 6, 16], [92.0, 23.0]]],\n [['down across the break', [20, 14, '110', 5, 6, 16], [93.0, 23.3]],\n  ['unknown size', [12, 24, '92', 5, 6, 16], 'error: size'],\n  ['same size', [12, 12, '92.5', 5, 6, 16], [92.5, 23.1]],\n  ['regression: downward grading sign', [14, 8, '96', 4, 6, 12], [82.0, 20.5]],\n  ['repair check: downward grading sign', [20, 6, '96', 5, 7, 16], [57.0, 14.3]],\n  ['generated control 1', [14, 22, '92.5', 4, 7, 16], [117.5, 29.4]],\n  ['generated control 2', [14, 16, '88', 4, 6, 14], [94.0, 23.5]],\n  ['generated control 3', [22, 22, '100', 4, 6, 14], [100.0, 25.0]]],\n [['unknown size', [12, 24, '92', 5, 6, 16], 'error: size'],\n  ['same size', [12, 12, '92.5', 5, 6, 16], [92.5, 23.1]],\n  ['across the break', [14, 20, '96', 5, 6, 16], [113.0, 28.3]],\n  ['regression: downward grading sign', [18, 8, '96', 5, 7, 14], [67.0, 16.8]],\n  ['repair check: downward grading sign', [20, 12, '96', 5, 7, 12], [68.0, 17.0]],\n  ['generated control 1', [14, 16, '100', 5, 6, 18], [105.0, 26.3]],\n  ['generated control 2', [22, 6, '100', 4, 6, 16], [62.0, 15.5]],\n  ['generated control 3', [18, 24, '100', 5, 7, 12], 'error: size']],\n [['same size', [12, 12, '92.5', 5, 6, 16], [92.5, 23.1]],\n  ['across the break', [14, 20, '96', 5, 6, 16], [113.0, 28.3]],\n  ['down across the break', [20, 14, '110', 5, 6, 16], [93.0, 23.3]],\n  ['regression: downward grading sign', [22, 8, '92.5', 5, 7, 12], [47.5, 11.9]],\n  ['repair check: downward grading sign', [16, 12, '88', 4, 7, 14], [77.0, 19.3]],\n  ['generated control 1', [12, 24, '96', 5, 6, 16], 'error: size'],\n  ['generated control 2', [18, 18, '100', 4, 7, 16], [100.0, 25.0]],\n  ['generated control 3', [14, 22, '88', 5, 6, 16], [111.0, 27.8]]]]\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":"b97a85c9b3b61a3fb9e9b3367184f67e5aa484a43ab292f232377bab61ef5083","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(base_size, target_size, base_cm, small, large, brk):\n    SIZES = [6, 8, 10, 12, 14, 16, 18, 20, 22]\n    if base_size not in SIZES or target_size not in SIZES:\n        return 'error: size'\n    i, j = SIZES.index(base_size), SIZES.index(target_size)\n    m = Fraction(str(base_cm))\n    step = 1 if j > i else -1\n    k = i\n    while k != j:\n        lo = min(k, k + step)\n        inc = small if SIZES[lo] < brk else large\n        m += step * inc\n        k += step\n    q = m / 4\n    return [math.floor(m * 10 + Fraction(1, 2)) / 10, math.floor(q * 10 + Fraction(1, 2)) / 10]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['same size', [12, 12, '92.5', 5, 6, 16], [92.5, 23.1]],\n  ['across the break', [14, 20, '96', 5, 6, 16], [113.0, 28.3]],\n  ['down across the break', [20, 14, '110', 5, 6, 16], [93.0, 23.3]],\n  ['regression: downward grading sign', [14, 10, '96', 5, 6, 16], [86.0, 21.5]],\n  ['repair check: downward grading sign', [22, 16, '88', 4, 7, 16], [67.0, 16.8]],\n  ['generated control 1', [12, 22, '92.5', 4, 7, 16], [121.5, 30.4]],\n  ['generated control 2', [6, 12, '100', 4, 7, 12], [112.0, 28.0]],\n  ['generated control 3', [6, 18, '88', 4, 6, 14], [116.0, 29.0]]],\n [['across the break', [14, 20, '96', 5, 6, 16], [113.0, 28.3]],\n  ['down across the break', [20, 14, '110', 5, 6, 16], [93.0, 23.3]],\n  ['unknown size', [12, 24, '92', 5, 6, 16], 'error: size'],\n  ['regression: downward grading sign', [14, 8, '88', 5, 7, 14], [73.0, 18.3]],\n  ['repair check: downward grading sign', [22, 14, '100', 4, 7, 16], [75.0, 18.8]],\n  ['generated control 1', [10, 6, '96', 5, 6, 12], [86.0, 21.5]],\n  ['generated control 2', [10, 20, '96', 5, 6, 12], [125.0, 31.3]],\n  ['generated control 3', [14, 16, '88', 4, 6, 16], [92.0, 23.0]]],\n [['down across the break', [20, 14, '110', 5, 6, 16], [93.0, 23.3]],\n  ['unknown size', [12, 24, '92', 5, 6, 16], 'error: size'],\n  ['same size', [12, 12, '92.5', 5, 6, 16], [92.5, 23.1]],\n  ['regression: downward grading sign', [14, 8, '96', 4, 6, 12], [82.0, 20.5]],\n  ['repair check: downward grading sign', [20, 6, '96', 5, 7, 16], [57.0, 14.3]],\n  ['generated control 1', [14, 22, '92.5', 4, 7, 16], [117.5, 29.4]],\n  ['generated control 2', [14, 16, '88', 4, 6, 14], [94.0, 23.5]],\n  ['generated control 3', [22, 22, '100', 4, 6, 14], [100.0, 25.0]]],\n [['unknown size', [12, 24, '92', 5, 6, 16], 'error: size'],\n  ['same size', [12, 12, '92.5', 5, 6, 16], [92.5, 23.1]],\n  ['across the break', [14, 20, '96', 5, 6, 16], [113.0, 28.3]],\n  ['regression: downward grading sign', [18, 8, '96', 5, 7, 14], [67.0, 16.8]],\n  ['repair check: downward grading sign', [20, 12, '96', 5, 7, 12], [68.0, 17.0]],\n  ['generated control 1', [14, 16, '100', 5, 6, 18], [105.0, 26.3]],\n  ['generated control 2', [22, 6, '100', 4, 6, 16], [62.0, 15.5]],\n  ['generated control 3', [18, 24, '100', 5, 7, 12], 'error: size']],\n [['same size', [12, 12, '92.5', 5, 6, 16], [92.5, 23.1]],\n  ['across the break', [14, 20, '96', 5, 6, 16], [113.0, 28.3]],\n  ['down across the break', [20, 14, '110', 5, 6, 16], [93.0, 23.3]],\n  ['regression: downward grading sign', [22, 8, '92.5', 5, 7, 12], [47.5, 11.9]],\n  ['repair check: downward grading sign', [16, 12, '88', 4, 7, 14], [77.0, 19.3]],\n  ['generated control 1', [12, 24, '96', 5, 6, 16], 'error: size'],\n  ['generated control 2', [18, 18, '100', 4, 7, 16], [100.0, 25.0]],\n  ['generated control 3', [14, 22, '88', 5, 6, 16], [111.0, 27.8]]]]\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-grade-rules-downward-grading-sign","generated_at":"2026-09-29T14:52:33.007441+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Sewing pattern grading applies different increments above a size break and distributes them across front and back pieces.","repair":"Multiply the increment by the step direction.","root_cause":"Increments are always added, even when grading to smaller sizes.","sha256":"9127947e5f0ed5218fce3510cb1bdca5907c81178e43b53832e42549aee921fd","title":"Sewing pattern grade rule stepper: downward grading sign · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":42.336,"exit_code":1,"observations":[{"actual":[92.5,23.1],"check":"same size","expected":[92.5,23.1],"passed":true},{"actual":[113.0,28.3],"check":"across the break","expected":[113.0,28.3],"passed":true},{"actual":[95.0,23.8],"check":"down across the break","expected":[93.0,23.3],"passed":false},{"actual":[86.0,21.5],"check":"regression: downward grading sign","expected":[86.0,21.5],"passed":true},{"actual":[76.0,19.0],"check":"repair check: downward grading sign","expected":[67.0,16.8],"passed":false},{"actual":[121.5,30.4],"check":"generated control 1","expected":[121.5,30.4],"passed":true},{"actual":[112.0,28.0],"check":"generated control 2","expected":[112.0,28.0],"passed":true},{"actual":[116.0,29.0],"check":"generated control 3","expected":[116.0,29.0],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"same size\", \"actual\": [92.5, 23.1], \"expected\": [92.5, 23.1], \"passed\": true}, {\"check\": \"across the break\", \"actual\": [113.0, 28.3], \"expected\": [113.0, 28.3], \"passed\": true}, {\"check\": \"down across the break\", \"actual\": [95.0, 23.8], \"expected\": [93.0, 23.3], \"passed\": false}, {\"check\": \"regression: downward grading sign\", \"actual\": [86.0, 21.5], \"expected\": [86.0, 21.5], \"passed\": true}, {\"check\": \"repair check: downward grading sign\", \"actual\": [76.0, 19.0], \"expected\": [67.0, 16.8], \"passed\": false}, {\"check\": \"generated control 1\", \"actual\": [121.5, 30.4], \"expected\": [121.5, 30.4], \"passed\": true}, {\"check\": \"generated control 2\", \"actual\": [112.0, 28.0], \"expected\": [112.0, 28.0], \"passed\": true}, {\"check\": \"generated control 3\", \"actual\": [116.0, 29.0], \"expected\": [116.0, 29.0], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.87,"exit_code":1,"observations":[{"actual":[92.5,23.1],"check":"same size","expected":[92.5,23.1],"passed":true},{"actual":[113.0,28.3],"check":"across the break","expected":[113.0,28.3],"passed":true},{"actual":[127.0,31.8],"check":"down across the break","expected":[93.0,23.3],"passed":false},{"actual":[106.0,26.5],"check":"regression: downward grading sign","expected":[86.0,21.5],"passed":false},{"actual":[109.0,27.3],"check":"repair check: downward grading sign","expected":[67.0,16.8],"passed":false},{"actual":[121.5,30.4],"check":"generated control 1","expected":[121.5,30.4],"passed":true},{"actual":[112.0,28.0],"check":"generated control 2","expected":[112.0,28.0],"passed":true},{"actual":[116.0,29.0],"check":"generated control 3","expected":[116.0,29.0],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"same size\", \"actual\": [92.5, 23.1], \"expected\": [92.5, 23.1], \"passed\": true}, {\"check\": \"across the break\", \"actual\": [113.0, 28.3], \"expected\": [113.0, 28.3], \"passed\": true}, {\"check\": \"down across the break\", \"actual\": [127.0, 31.8], \"expected\": [93.0, 23.3], \"passed\": false}, {\"check\": \"regression: downward grading sign\", \"actual\": [106.0, 26.5], \"expected\": [86.0, 21.5], \"passed\": false}, {\"check\": \"repair check: downward grading sign\", \"actual\": [109.0, 27.3], \"expected\": [67.0, 16.8], \"passed\": false}, {\"check\": \"generated control 1\", \"actual\": [121.5, 30.4], \"expected\": [121.5, 30.4], \"passed\": true}, {\"check\": \"generated control 2\", \"actual\": [112.0, 28.0], \"expected\": [112.0, 28.0], \"passed\": true}, {\"check\": \"generated control 3\", \"actual\": [116.0, 29.0], \"expected\": [116.0, 29.0], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":43.365,"exit_code":0,"observations":[{"actual":[92.5,23.1],"check":"same size","expected":[92.5,23.1],"passed":true},{"actual":[113.0,28.3],"check":"across the break","expected":[113.0,28.3],"passed":true},{"actual":[93.0,23.3],"check":"down across the break","expected":[93.0,23.3],"passed":true},{"actual":[86.0,21.5],"check":"regression: downward grading sign","expected":[86.0,21.5],"passed":true},{"actual":[67.0,16.8],"check":"repair check: downward grading sign","expected":[67.0,16.8],"passed":true},{"actual":[121.5,30.4],"check":"generated control 1","expected":[121.5,30.4],"passed":true},{"actual":[112.0,28.0],"check":"generated control 2","expected":[112.0,28.0],"passed":true},{"actual":[116.0,29.0],"check":"generated control 3","expected":[116.0,29.0],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"same size\", \"actual\": [92.5, 23.1], \"expected\": [92.5, 23.1], \"passed\": true}, {\"check\": \"across the break\", \"actual\": [113.0, 28.3], \"expected\": [113.0, 28.3], \"passed\": true}, {\"check\": \"down across the break\", \"actual\": [93.0, 23.3], \"expected\": [93.0, 23.3], \"passed\": true}, {\"check\": \"regression: downward grading sign\", \"actual\": [86.0, 21.5], \"expected\": [86.0, 21.5], \"passed\": true}, {\"check\": \"repair check: downward grading sign\", \"actual\": [67.0, 16.8], \"expected\": [67.0, 16.8], \"passed\": true}, {\"check\": \"generated control 1\", \"actual\": [121.5, 30.4], \"expected\": [121.5, 30.4], \"passed\": true}, {\"check\": \"generated control 2\", \"actual\": [112.0, 28.0], \"expected\": [112.0, 28.0], \"passed\": true}, {\"check\": \"generated control 3\", \"actual\": [116.0, 29.0], \"expected\": [116.0, 29.0], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}