{"abstract":"A swatch that grew is reported as shrinking.","category":"Knitting and sewing pattern grading","checks":8,"contract":"A swatch of sts x rows measured before and after washing. Use post-wash dimensions: cast on = half-up target_w*sts/w_post; rows = target_h*rows/h_post rounded to the nearest even number (ties up); width change % = (w_post/w_pre - 1)*100 half-up to 0.1. Return [cast_on, rows, width_change].","contract_signature":"sts, rows, w_pre, w_post, h_pre, h_post, target_w, target_h","evaluation_group":"w2-knitting_and_sewing_pattern_grading-post-wash-gauge","failed_approach":"Dividing by the post-wash width understates growth.","family":"w2-knitting_and_sewing_pattern_grading-post-wash-gauge-change-percentage","id":"FA-97731","implementations":{"attempt":{"sha256":"08979629264c4944ba5c521ffb65ad0c109d58d09cfbcfd3d73ecb323ab5cf1c","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(sts, rows, w_pre, w_post, h_pre, h_post, target_w, target_h):\n    wpo = Fraction(w_post)\n    hpo = Fraction(h_post)\n    cast = math.floor(target_w * sts / wpo + Fraction(1, 2))\n    rr = target_h * rows / hpo\n    row_count = 2 * math.floor(rr / 2 + Fraction(1, 2))\n    change = (wpo - Fraction(w_pre)) / wpo * 100\n    return [cast, row_count, math.floor(change * 10 + Fraction(1, 2)) / 10]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['no change', [20, 28, '10', '10', '10', '10', 50, 45], [100, 126, 0.0]],\n  ['growth', [22, 30, '10', '11', '10', '10.4', 50, 60], [100, 174, 10.0]],\n  ['shrink', [24, 32, '10.5', '9.5', '10.2', '9', 40, 30], [101, 106, -9.5]],\n  ['regression: change percentage', [30, 40, '10.5', '11', '10.2', '10', 50, 30], [136, 120, 4.8]],\n  ['repair check: change percentage', [20, 28, '10.5', '10', '10', '10', 50, 45], [100, 126, -4.8]],\n  ['generated control 1', [20, 32, '10.5', '10.5', '10.2', '10', 50, 45], [95, 144, 0.0]],\n  ['generated control 2', [20, 40, '10', '10.8', '10', '10.4', 50, 60], [93, 230, 8.0]],\n  ['generated control 3', [20, 30, '10', '11', '10.2', '9.5', 40, 45], [73, 142, 10.0]]],\n [['growth', [22, 30, '10', '11', '10', '10.4', 50, 60], [100, 174, 10.0]],\n  ['shrink', [24, 32, '10.5', '9.5', '10.2', '9', 40, 30], [101, 106, -9.5]],\n  ['no change', [20, 28, '10', '10', '10', '10', 50, 45], [100, 126, 0.0]],\n  ['regression: change percentage', [24, 32, '10.5', '11', '10', '10', 50, 45], [109, 144, 4.8]],\n  ['repair check: change percentage', [24, 30, '10', '10.5', '10.2', '9', 55, 45], [126, 150, 5.0]],\n  ['generated control 1', [24, 28, '10', '10.5', '10.2', '9.5', 50, 30], [114, 88, 5.0]],\n  ['generated control 2', [30, 40, '10.5', '9.5', '10', '10', 40, 60], [126, 240, -9.5]],\n  ['generated control 3', [22, 30, '10', '9.5', '10.2', '10', 55, 60], [127, 180, -5.0]]],\n [['shrink', [24, 32, '10.5', '9.5', '10.2', '9', 40, 30], [101, 106, -9.5]],\n  ['no change', [20, 28, '10', '10', '10', '10', 50, 45], [100, 126, 0.0]],\n  ['growth', [22, 30, '10', '11', '10', '10.4', 50, 60], [100, 174, 10.0]],\n  ['regression: change percentage', [24, 30, '10.5', '10', '10', '10', 50, 60], [120, 180, -4.8]],\n  ['repair check: change percentage', [24, 40, '10.5', '10.8', '10', '9', 50, 30], [111, 134, 2.9]],\n  ['generated control 1', [20, 28, '10.5', '10.5', '10', '9', 50, 45], [95, 140, 0.0]],\n  ['generated control 2', [30, 30, '10', '10.5', '10.2', '10', 55, 45], [157, 136, 5.0]],\n  ['generated control 3', [20, 32, '10.5', '10.8', '10', '10', 55, 30], [102, 96, 2.9]]],\n [['no change', [20, 28, '10', '10', '10', '10', 50, 45], [100, 126, 0.0]],\n  ['growth', [22, 30, '10', '11', '10', '10.4', 50, 60], [100, 174, 10.0]],\n  ['shrink', [24, 32, '10.5', '9.5', '10.2', '9', 40, 30], [101, 106, -9.5]],\n  ['regression: change percentage', [24, 30, '10', '11', '10.2', '9', 50, 30], [109, 100, 10.0]],\n  ['repair check: change percentage', [20, 40, '10.5', '10.8', '10', '10', 50, 30], [93, 120, 2.9]],\n  ['generated control 1', [30, 40, '10.5', '9.5', '10.2', '9.5', 40, 45], [126, 190, -9.5]],\n  ['generated control 2', [20, 32, '10.5', '11', '10.2', '9.5', 55, 45], [100, 152, 4.8]],\n  ['generated control 3', [24, 28, '10.5', '9.5', '10', '9', 40, 60], [101, 186, -9.5]]],\n [['growth', [22, 30, '10', '11', '10', '10.4', 50, 60], [100, 174, 10.0]],\n  ['shrink', [24, 32, '10.5', '9.5', '10.2', '9', 40, 30], [101, 106, -9.5]],\n  ['no change', [20, 28, '10', '10', '10', '10', 50, 45], [100, 126, 0.0]],\n  ['regression: change percentage', [22, 28, '10.5', '10', '10.2', '10.4', 55, 60], [121, 162, -4.8]],\n  ['repair check: change percentage', [20, 30, '10.5', '10', '10.2', '9', 55, 60], [110, 200, -4.8]],\n  ['generated control 1', [30, 30, '10', '10', '10', '9', 50, 30], [150, 100, 0.0]],\n  ['generated control 2', [24, 32, '10.5', '10', '10', '10.4', 55, 45], [132, 138, -4.8]],\n  ['generated control 3', [22, 40, '10', '10.5', '10', '10.4', 40, 45], [84, 174, 5.0]]]]\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":"6bb906d7cdb0bc9581f392173e394f2c5d4a3a7f28f6d2244276e59bee323c6c","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(sts, rows, w_pre, w_post, h_pre, h_post, target_w, target_h):\n    wpo = Fraction(w_post)\n    hpo = Fraction(h_post)\n    cast = math.floor(target_w * sts / wpo + Fraction(1, 2))\n    rr = target_h * rows / hpo\n    row_count = 2 * math.floor(rr / 2 + Fraction(1, 2))\n    change = (Fraction(w_pre) / wpo - 1) * 100\n    return [cast, row_count, math.floor(change * 10 + Fraction(1, 2)) / 10]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['no change', [20, 28, '10', '10', '10', '10', 50, 45], [100, 126, 0.0]],\n  ['growth', [22, 30, '10', '11', '10', '10.4', 50, 60], [100, 174, 10.0]],\n  ['shrink', [24, 32, '10.5', '9.5', '10.2', '9', 40, 30], [101, 106, -9.5]],\n  ['regression: change percentage', [30, 40, '10.5', '11', '10.2', '10', 50, 30], [136, 120, 4.8]],\n  ['repair check: change percentage', [20, 28, '10.5', '10', '10', '10', 50, 45], [100, 126, -4.8]],\n  ['generated control 1', [20, 32, '10.5', '10.5', '10.2', '10', 50, 45], [95, 144, 0.0]],\n  ['generated control 2', [20, 40, '10', '10.8', '10', '10.4', 50, 60], [93, 230, 8.0]],\n  ['generated control 3', [20, 30, '10', '11', '10.2', '9.5', 40, 45], [73, 142, 10.0]]],\n [['growth', [22, 30, '10', '11', '10', '10.4', 50, 60], [100, 174, 10.0]],\n  ['shrink', [24, 32, '10.5', '9.5', '10.2', '9', 40, 30], [101, 106, -9.5]],\n  ['no change', [20, 28, '10', '10', '10', '10', 50, 45], [100, 126, 0.0]],\n  ['regression: change percentage', [24, 32, '10.5', '11', '10', '10', 50, 45], [109, 144, 4.8]],\n  ['repair check: change percentage', [24, 30, '10', '10.5', '10.2', '9', 55, 45], [126, 150, 5.0]],\n  ['generated control 1', [24, 28, '10', '10.5', '10.2', '9.5', 50, 30], [114, 88, 5.0]],\n  ['generated control 2', [30, 40, '10.5', '9.5', '10', '10', 40, 60], [126, 240, -9.5]],\n  ['generated control 3', [22, 30, '10', '9.5', '10.2', '10', 55, 60], [127, 180, -5.0]]],\n [['shrink', [24, 32, '10.5', '9.5', '10.2', '9', 40, 30], [101, 106, -9.5]],\n  ['no change', [20, 28, '10', '10', '10', '10', 50, 45], [100, 126, 0.0]],\n  ['growth', [22, 30, '10', '11', '10', '10.4', 50, 60], [100, 174, 10.0]],\n  ['regression: change percentage', [24, 30, '10.5', '10', '10', '10', 50, 60], [120, 180, -4.8]],\n  ['repair check: change percentage', [24, 40, '10.5', '10.8', '10', '9', 50, 30], [111, 134, 2.9]],\n  ['generated control 1', [20, 28, '10.5', '10.5', '10', '9', 50, 45], [95, 140, 0.0]],\n  ['generated control 2', [30, 30, '10', '10.5', '10.2', '10', 55, 45], [157, 136, 5.0]],\n  ['generated control 3', [20, 32, '10.5', '10.8', '10', '10', 55, 30], [102, 96, 2.9]]],\n [['no change', [20, 28, '10', '10', '10', '10', 50, 45], [100, 126, 0.0]],\n  ['growth', [22, 30, '10', '11', '10', '10.4', 50, 60], [100, 174, 10.0]],\n  ['shrink', [24, 32, '10.5', '9.5', '10.2', '9', 40, 30], [101, 106, -9.5]],\n  ['regression: change percentage', [24, 30, '10', '11', '10.2', '9', 50, 30], [109, 100, 10.0]],\n  ['repair check: change percentage', [20, 40, '10.5', '10.8', '10', '10', 50, 30], [93, 120, 2.9]],\n  ['generated control 1', [30, 40, '10.5', '9.5', '10.2', '9.5', 40, 45], [126, 190, -9.5]],\n  ['generated control 2', [20, 32, '10.5', '11', '10.2', '9.5', 55, 45], [100, 152, 4.8]],\n  ['generated control 3', [24, 28, '10.5', '9.5', '10', '9', 40, 60], [101, 186, -9.5]]],\n [['growth', [22, 30, '10', '11', '10', '10.4', 50, 60], [100, 174, 10.0]],\n  ['shrink', [24, 32, '10.5', '9.5', '10.2', '9', 40, 30], [101, 106, -9.5]],\n  ['no change', [20, 28, '10', '10', '10', '10', 50, 45], [100, 126, 0.0]],\n  ['regression: change percentage', [22, 28, '10.5', '10', '10.2', '10.4', 55, 60], [121, 162, -4.8]],\n  ['repair check: change percentage', [20, 30, '10.5', '10', '10.2', '9', 55, 60], [110, 200, -4.8]],\n  ['generated control 1', [30, 30, '10', '10', '10', '9', 50, 30], [150, 100, 0.0]],\n  ['generated control 2', [24, 32, '10.5', '10', '10', '10.4', 55, 45], [132, 138, -4.8]],\n  ['generated control 3', [22, 40, '10', '10.5', '10', '10.4', 40, 45], [84, 174, 5.0]]]]\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-post-wash-gauge-change-percentage","generated_at":"2026-09-29T14:52:35.043832+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Knitters block swatches because many fibres grow or shrink after washing.","root_cause":"The ratio is inverted.","sha256":"ff0d9d78266f2f7e5dffcf09d810451b8c92ce42a2d51556128118c772148efc","title":"Post-wash swatch gauge: change percentage · 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.766,"exit_code":1,"observations":[{"actual":[100,126,0.0],"check":"no change","expected":[100,126,0.0],"passed":true},{"actual":[100,174,9.1],"check":"growth","expected":[100,174,10.0],"passed":false},{"actual":[101,106,-10.5],"check":"shrink","expected":[101,106,-9.5],"passed":false},{"actual":[136,120,4.5],"check":"regression: change percentage","expected":[136,120,4.8],"passed":false},{"actual":[100,126,-5.0],"check":"repair check: change percentage","expected":[100,126,-4.8],"passed":false},{"actual":[95,144,0.0],"check":"generated control 1","expected":[95,144,0.0],"passed":true},{"actual":[93,230,7.4],"check":"generated control 2","expected":[93,230,8.0],"passed":false},{"actual":[73,142,9.1],"check":"generated control 3","expected":[73,142,10.0],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"no change\", \"actual\": [100, 126, 0.0], \"expected\": [100, 126, 0.0], \"passed\": true}, {\"check\": \"growth\", \"actual\": [100, 174, 9.1], \"expected\": [100, 174, 10.0], \"passed\": false}, {\"check\": \"shrink\", \"actual\": [101, 106, -10.5], \"expected\": [101, 106, -9.5], \"passed\": false}, {\"check\": \"regression: change percentage\", \"actual\": [136, 120, 4.5], \"expected\": [136, 120, 4.8], \"passed\": false}, {\"check\": \"repair check: change percentage\", \"actual\": [100, 126, -5.0], \"expected\": [100, 126, -4.8], \"passed\": false}, {\"check\": \"generated control 1\", \"actual\": [95, 144, 0.0], \"expected\": [95, 144, 0.0], \"passed\": true}, {\"check\": \"generated control 2\", \"actual\": [93, 230, 7.4], \"expected\": [93, 230, 8.0], \"passed\": false}, {\"check\": \"generated control 3\", \"actual\": [73, 142, 9.1], \"expected\": [73, 142, 10.0], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":46.589,"exit_code":1,"observations":[{"actual":[100,126,0.0],"check":"no change","expected":[100,126,0.0],"passed":true},{"actual":[100,174,-9.1],"check":"growth","expected":[100,174,10.0],"passed":false},{"actual":[101,106,10.5],"check":"shrink","expected":[101,106,-9.5],"passed":false},{"actual":[136,120,-4.5],"check":"regression: change percentage","expected":[136,120,4.8],"passed":false},{"actual":[100,126,5.0],"check":"repair check: change percentage","expected":[100,126,-4.8],"passed":false},{"actual":[95,144,0.0],"check":"generated control 1","expected":[95,144,0.0],"passed":true},{"actual":[93,230,-7.4],"check":"generated control 2","expected":[93,230,8.0],"passed":false},{"actual":[73,142,-9.1],"check":"generated control 3","expected":[73,142,10.0],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"no change\", \"actual\": [100, 126, 0.0], \"expected\": [100, 126, 0.0], \"passed\": true}, {\"check\": \"growth\", \"actual\": [100, 174, -9.1], \"expected\": [100, 174, 10.0], \"passed\": false}, {\"check\": \"shrink\", \"actual\": [101, 106, 10.5], \"expected\": [101, 106, -9.5], \"passed\": false}, {\"check\": \"regression: change percentage\", \"actual\": [136, 120, -4.5], \"expected\": [136, 120, 4.8], \"passed\": false}, {\"check\": \"repair check: change percentage\", \"actual\": [100, 126, 5.0], \"expected\": [100, 126, -4.8], \"passed\": false}, {\"check\": \"generated control 1\", \"actual\": [95, 144, 0.0], \"expected\": [95, 144, 0.0], \"passed\": true}, {\"check\": \"generated control 2\", \"actual\": [93, 230, -7.4], \"expected\": [93, 230, 8.0], \"passed\": false}, {\"check\": \"generated control 3\", \"actual\": [73, 142, -9.1], \"expected\": [73, 142, 10.0], \"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."}}