{"abstract":"A one-button cropped cardigan puts its button at the hem.","category":"Knitting and sewing pattern grading","checks":8,"contract":"Buttonholes run from bottom_offset to band_len - top_offset (cm), evenly spaced; a single buttonhole goes at the top position. Convert each position to a 1-based row: half-up of position*rows_per_10cm/10, plus 1. n < 1 -> \"error: count\"; top position below bottom -> \"error: offsets\".","contract_signature":"band_len, n, top_offset, bottom_offset, rows_per_10cm","evaluation_group":"w2-knitting_and_sewing_pattern_grading-buttonhole-rows","failed_approach":"Centring it contradicts the neck-closure contract.","family":"w2-knitting_and_sewing_pattern_grading-buttonhole-rows-single-button-placement","id":"FA-97621","implementations":{"attempt":{"sha256":"cafe3216d2d6fb6a60742780ee1341eca887d2dd8d5397f814b7d38b0b17d467","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(band_len, n, top_offset, bottom_offset, rows_per_10cm):\n    if n < 1:\n        return 'error: count'\n    lo = Fraction(str(bottom_offset))\n    hi = Fraction(str(band_len)) - Fraction(str(top_offset))\n    if hi < lo:\n        return 'error: offsets'\n    g = Fraction(str(rows_per_10cm)) / 10\n    if n == 1:\n        pos = [(lo + hi) / 2]\n    else:\n        gap = (hi - lo) / (n - 1)\n        pos = [lo + i * gap for i in range(n)]\n    return [math.floor(p * g + Fraction(1, 2)) + 1 for p in pos]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['five buttons', [50, 5, 1.5, 2, '30'], [7, 42, 77, 112, 147]],\n  ['single button', [40, 1, 2, 2, '28'], [107]], ['no buttons', [40, 0, 2, 2, '28'], 'error: count'],\n  ['regression: single button placement', [50, 1, 3, 1, '30'], [142]],\n  ['repair check: single button placement', [50, 1, 1.5, 4, '32'], [156]],\n  ['generated control 1', [50, 6, 1, 2, '36.5'], [8, 43, 77, 111, 146, 180]],\n  ['generated control 2', [62, 0, 2, 2, '36.5'], 'error: count'],\n  ['generated control 3', [62, 5, 2, 2.5, '32'], [9, 55, 101, 147, 193]]],\n [['single button', [40, 1, 2, 2, '28'], [107]], ['no buttons', [40, 0, 2, 2, '28'], 'error: count'],\n  ['five buttons', [50, 5, 1.5, 2, '30'], [7, 42, 77, 112, 147]],\n  ['regression: single button placement', [60, 1, 3, 1, '30'], [172]],\n  ['repair check: single button placement', [40, 1, 1, 1, '32'], [126]],\n  ['generated control 1', [60, 2, 1.5, 2, '32'], [7, 188]],\n  ['generated control 2', [50, 7, 2, 2, '36.5'], [8, 36, 64, 92, 120, 148, 176]],\n  ['generated control 3', [40, 4, 1, 1, '30'], [4, 42, 80, 118]]],\n [['no buttons', [40, 0, 2, 2, '28'], 'error: count'],\n  ['five buttons', [50, 5, 1.5, 2, '30'], [7, 42, 77, 112, 147]],\n  ['single button', [40, 1, 2, 2, '28'], [107]],\n  ['regression: single button placement', [60, 1, 2, 2, '36.5'], [213]],\n  ['repair check: single button placement', [50, 1, 3, 2, '32'], [151]],\n  ['generated control 1', [62, 2, 3, 2.5, '32'], [9, 190]],\n  ['generated control 2', [55.5, 6, 2, 2.5, '30'], [9, 39, 70, 100, 131, 162]],\n  ['generated control 3', [60, 0, 1, 1, '28'], 'error: count']],\n [['five buttons', [50, 5, 1.5, 2, '30'], [7, 42, 77, 112, 147]],\n  ['single button', [40, 1, 2, 2, '28'], [107]], ['no buttons', [40, 0, 2, 2, '28'], 'error: count'],\n  ['regression: single button placement', [62, 1, 3, 2.5, '28'], [166]],\n  ['repair check: single button placement', [62, 1, 3, 2, '30'], [178]],\n  ['generated control 1', [40, 6, 1, 1, '32'], [4, 29, 53, 77, 101, 126]],\n  ['generated control 2', [60, 2, 3, 2.5, '32'], [9, 183]],\n  ['generated control 3', [55.5, 2, 1, 1, '28'], [4, 154]]],\n [['single button', [40, 1, 2, 2, '28'], [107]], ['no buttons', [40, 0, 2, 2, '28'], 'error: count'],\n  ['five buttons', [50, 5, 1.5, 2, '30'], [7, 42, 77, 112, 147]],\n  ['regression: single button placement', [50, 1, 2, 1, '32'], [155]],\n  ['repair check: single button placement', [62, 1, 1.5, 1, '28'], [170]],\n  ['generated control 1', [50, 4, 3, 1, '30'], [4, 50, 96, 142]],\n  ['generated control 2', [60, 6, 2, 2, '36.5'], [8, 49, 90, 131, 172, 213]],\n  ['generated control 3', [55.5, 6, 1, 4, '32'], [14, 46, 78, 111, 143, 175]]]]\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":"25c1fce5f61bc4b6c70e88805fdcbf27ade9c280d43d37d08d366a2fdd4dedd1","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(band_len, n, top_offset, bottom_offset, rows_per_10cm):\n    if n < 1:\n        return 'error: count'\n    lo = Fraction(str(bottom_offset))\n    hi = Fraction(str(band_len)) - Fraction(str(top_offset))\n    if hi < lo:\n        return 'error: offsets'\n    g = Fraction(str(rows_per_10cm)) / 10\n    if n == 1:\n        pos = [lo]\n    else:\n        gap = (hi - lo) / (n - 1)\n        pos = [lo + i * gap for i in range(n)]\n    return [math.floor(p * g + Fraction(1, 2)) + 1 for p in pos]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['five buttons', [50, 5, 1.5, 2, '30'], [7, 42, 77, 112, 147]],\n  ['single button', [40, 1, 2, 2, '28'], [107]], ['no buttons', [40, 0, 2, 2, '28'], 'error: count'],\n  ['regression: single button placement', [50, 1, 3, 1, '30'], [142]],\n  ['repair check: single button placement', [50, 1, 1.5, 4, '32'], [156]],\n  ['generated control 1', [50, 6, 1, 2, '36.5'], [8, 43, 77, 111, 146, 180]],\n  ['generated control 2', [62, 0, 2, 2, '36.5'], 'error: count'],\n  ['generated control 3', [62, 5, 2, 2.5, '32'], [9, 55, 101, 147, 193]]],\n [['single button', [40, 1, 2, 2, '28'], [107]], ['no buttons', [40, 0, 2, 2, '28'], 'error: count'],\n  ['five buttons', [50, 5, 1.5, 2, '30'], [7, 42, 77, 112, 147]],\n  ['regression: single button placement', [60, 1, 3, 1, '30'], [172]],\n  ['repair check: single button placement', [40, 1, 1, 1, '32'], [126]],\n  ['generated control 1', [60, 2, 1.5, 2, '32'], [7, 188]],\n  ['generated control 2', [50, 7, 2, 2, '36.5'], [8, 36, 64, 92, 120, 148, 176]],\n  ['generated control 3', [40, 4, 1, 1, '30'], [4, 42, 80, 118]]],\n [['no buttons', [40, 0, 2, 2, '28'], 'error: count'],\n  ['five buttons', [50, 5, 1.5, 2, '30'], [7, 42, 77, 112, 147]],\n  ['single button', [40, 1, 2, 2, '28'], [107]],\n  ['regression: single button placement', [60, 1, 2, 2, '36.5'], [213]],\n  ['repair check: single button placement', [50, 1, 3, 2, '32'], [151]],\n  ['generated control 1', [62, 2, 3, 2.5, '32'], [9, 190]],\n  ['generated control 2', [55.5, 6, 2, 2.5, '30'], [9, 39, 70, 100, 131, 162]],\n  ['generated control 3', [60, 0, 1, 1, '28'], 'error: count']],\n [['five buttons', [50, 5, 1.5, 2, '30'], [7, 42, 77, 112, 147]],\n  ['single button', [40, 1, 2, 2, '28'], [107]], ['no buttons', [40, 0, 2, 2, '28'], 'error: count'],\n  ['regression: single button placement', [62, 1, 3, 2.5, '28'], [166]],\n  ['repair check: single button placement', [62, 1, 3, 2, '30'], [178]],\n  ['generated control 1', [40, 6, 1, 1, '32'], [4, 29, 53, 77, 101, 126]],\n  ['generated control 2', [60, 2, 3, 2.5, '32'], [9, 183]],\n  ['generated control 3', [55.5, 2, 1, 1, '28'], [4, 154]]],\n [['single button', [40, 1, 2, 2, '28'], [107]], ['no buttons', [40, 0, 2, 2, '28'], 'error: count'],\n  ['five buttons', [50, 5, 1.5, 2, '30'], [7, 42, 77, 112, 147]],\n  ['regression: single button placement', [50, 1, 2, 1, '32'], [155]],\n  ['repair check: single button placement', [62, 1, 1.5, 1, '28'], [170]],\n  ['generated control 1', [50, 4, 3, 1, '30'], [4, 50, 96, 142]],\n  ['generated control 2', [60, 6, 2, 2, '36.5'], [8, 49, 90, 131, 172, 213]],\n  ['generated control 3', [55.5, 6, 1, 4, '32'], [14, 46, 78, 111, 143, 175]]]]\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-buttonhole-rows-single-button-placement","generated_at":"2026-09-29T14:52:33.957906+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Cardigan button bands place buttonholes evenly between neck and hem offsets.","root_cause":"A lone buttonhole is placed at the bottom offset.","sha256":"c838488b4dcdb45f6c827a8027b980a5b674387068ca7a170d49b22d4373d296","title":"Buttonhole row planner: single button placement · 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":42.073,"exit_code":1,"observations":[{"actual":[7,42,77,112,147],"check":"five buttons","expected":[7,42,77,112,147],"passed":true},{"actual":[57],"check":"single button","expected":[107],"passed":false},{"actual":"error: count","check":"no buttons","expected":"error: count","passed":true},{"actual":[73],"check":"regression: single button placement","expected":[142],"passed":false},{"actual":[85],"check":"repair check: single button placement","expected":[156],"passed":false},{"actual":[8,43,77,111,146,180],"check":"generated control 1","expected":[8,43,77,111,146,180],"passed":true},{"actual":"error: count","check":"generated control 2","expected":"error: count","passed":true},{"actual":[9,55,101,147,193],"check":"generated control 3","expected":[9,55,101,147,193],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"five buttons\", \"actual\": [7, 42, 77, 112, 147], \"expected\": [7, 42, 77, 112, 147], \"passed\": true}, {\"check\": \"single button\", \"actual\": [57], \"expected\": [107], \"passed\": false}, {\"check\": \"no buttons\", \"actual\": \"error: count\", \"expected\": \"error: count\", \"passed\": true}, {\"check\": \"regression: single button placement\", \"actual\": [73], \"expected\": [142], \"passed\": false}, {\"check\": \"repair check: single button placement\", \"actual\": [85], \"expected\": [156], \"passed\": false}, {\"check\": \"generated control 1\", \"actual\": [8, 43, 77, 111, 146, 180], \"expected\": [8, 43, 77, 111, 146, 180], \"passed\": true}, {\"check\": \"generated control 2\", \"actual\": \"error: count\", \"expected\": \"error: count\", \"passed\": true}, {\"check\": \"generated control 3\", \"actual\": [9, 55, 101, 147, 193], \"expected\": [9, 55, 101, 147, 193], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.079,"exit_code":1,"observations":[{"actual":[7,42,77,112,147],"check":"five buttons","expected":[7,42,77,112,147],"passed":true},{"actual":[7],"check":"single button","expected":[107],"passed":false},{"actual":"error: count","check":"no buttons","expected":"error: count","passed":true},{"actual":[4],"check":"regression: single button placement","expected":[142],"passed":false},{"actual":[14],"check":"repair check: single button placement","expected":[156],"passed":false},{"actual":[8,43,77,111,146,180],"check":"generated control 1","expected":[8,43,77,111,146,180],"passed":true},{"actual":"error: count","check":"generated control 2","expected":"error: count","passed":true},{"actual":[9,55,101,147,193],"check":"generated control 3","expected":[9,55,101,147,193],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"five buttons\", \"actual\": [7, 42, 77, 112, 147], \"expected\": [7, 42, 77, 112, 147], \"passed\": true}, {\"check\": \"single button\", \"actual\": [7], \"expected\": [107], \"passed\": false}, {\"check\": \"no buttons\", \"actual\": \"error: count\", \"expected\": \"error: count\", \"passed\": true}, {\"check\": \"regression: single button placement\", \"actual\": [4], \"expected\": [142], \"passed\": false}, {\"check\": \"repair check: single button placement\", \"actual\": [14], \"expected\": [156], \"passed\": false}, {\"check\": \"generated control 1\", \"actual\": [8, 43, 77, 111, 146, 180], \"expected\": [8, 43, 77, 111, 146, 180], \"passed\": true}, {\"check\": \"generated control 2\", \"actual\": \"error: count\", \"expected\": \"error: count\", \"passed\": true}, {\"check\": \"generated control 3\", \"actual\": [9, 55, 101, 147, 193], \"expected\": [9, 55, 101, 147, 193], \"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."}}