{"abstract":"The top buttonhole falls well below the neck.","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":"n+1 gaps treat the offsets as extra buttons.","family":"w2-knitting_and_sewing_pattern_grading-buttonhole-rows-spacing-divisor","id":"FA-97616","implementations":{"attempt":{"sha256":"e55456f579b51410a19ea889d34554f838be298f7f86d9648229f0a9a136b273","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 = [hi]\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: spacing divisor', [55.5, 5, 2, 2.5, '36.5'], [10, 57, 103, 150, 196]],\n  ['repair check: spacing divisor', [60, 6, 2, 1, '32'], [4, 41, 77, 114, 150, 187]],\n  ['generated control 1', [60, 1, 2, 1, '28'], [163]],\n  ['generated control 2', [50, 6, 1, 1, '36.5'], [5, 40, 75, 110, 145, 180]],\n  ['generated control 3', [50, 1, 1.5, 2.5, '28'], [137]]],\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: spacing divisor', [55.5, 2, 2, 4, '32'], [14, 172]],\n  ['repair check: spacing divisor', [60, 4, 1, 4, '32'], [14, 72, 131, 190]],\n  ['generated control 1', [50, 1, 1.5, 1, '36.5'], [178]],\n  ['generated control 2', [40, 0, 3, 4, '28'], 'error: count'],\n  ['generated control 3', [60, 1, 1.5, 4, '30'], [177]]],\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: spacing divisor', [60, 2, 1, 1, '30'], [4, 178]],\n  ['repair check: spacing divisor', [50, 7, 1, 4, '30'], [13, 36, 58, 81, 103, 126, 148]],\n  ['generated control 1', [62, 0, 1, 4, '30'], 'error: count'],\n  ['generated control 2', [60, 1, 3, 2, '32'], [183]],\n  ['generated control 3', [62, 4, 1.5, 2, '30'], [7, 66, 124, 183]]],\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: spacing divisor', [40, 4, 1, 4, '28'], [12, 45, 78, 110]],\n  ['repair check: spacing divisor', [40, 7, 3, 4, '30'], [13, 30, 46, 63, 79, 96, 112]],\n  ['generated control 1', [40, 1, 3, 4, '30'], [112]],\n  ['generated control 2', [55.5, 0, 1.5, 4, '28'], 'error: count'],\n  ['generated control 3', [40, 6, 1, 1, '32'], [4, 29, 53, 77, 101, 126]]],\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: spacing divisor', [40, 6, 1.5, 2, '36.5'], [8, 35, 62, 88, 115, 142]],\n  ['repair check: spacing divisor', [40, 2, 2, 1, '30'], [4, 115]],\n  ['generated control 1', [55.5, 5, 3, 4, '32'], [14, 53, 91, 130, 169]],\n  ['generated control 2', [55.5, 7, 1, 2.5, '36.5'], [10, 42, 73, 105, 137, 168, 200]],\n  ['generated control 3', [40, 5, 2, 2, '36.5'], [8, 41, 74, 107, 140]]]]\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":"350899820294251c2b711aee2ac4b291385964cbb479c835fcce1796f524771c","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 = [hi]\n    else:\n        gap = (hi - lo) / n\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: spacing divisor', [55.5, 5, 2, 2.5, '36.5'], [10, 57, 103, 150, 196]],\n  ['repair check: spacing divisor', [60, 6, 2, 1, '32'], [4, 41, 77, 114, 150, 187]],\n  ['generated control 1', [60, 1, 2, 1, '28'], [163]],\n  ['generated control 2', [50, 6, 1, 1, '36.5'], [5, 40, 75, 110, 145, 180]],\n  ['generated control 3', [50, 1, 1.5, 2.5, '28'], [137]]],\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: spacing divisor', [55.5, 2, 2, 4, '32'], [14, 172]],\n  ['repair check: spacing divisor', [60, 4, 1, 4, '32'], [14, 72, 131, 190]],\n  ['generated control 1', [50, 1, 1.5, 1, '36.5'], [178]],\n  ['generated control 2', [40, 0, 3, 4, '28'], 'error: count'],\n  ['generated control 3', [60, 1, 1.5, 4, '30'], [177]]],\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: spacing divisor', [60, 2, 1, 1, '30'], [4, 178]],\n  ['repair check: spacing divisor', [50, 7, 1, 4, '30'], [13, 36, 58, 81, 103, 126, 148]],\n  ['generated control 1', [62, 0, 1, 4, '30'], 'error: count'],\n  ['generated control 2', [60, 1, 3, 2, '32'], [183]],\n  ['generated control 3', [62, 4, 1.5, 2, '30'], [7, 66, 124, 183]]],\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: spacing divisor', [40, 4, 1, 4, '28'], [12, 45, 78, 110]],\n  ['repair check: spacing divisor', [40, 7, 3, 4, '30'], [13, 30, 46, 63, 79, 96, 112]],\n  ['generated control 1', [40, 1, 3, 4, '30'], [112]],\n  ['generated control 2', [55.5, 0, 1.5, 4, '28'], 'error: count'],\n  ['generated control 3', [40, 6, 1, 1, '32'], [4, 29, 53, 77, 101, 126]]],\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: spacing divisor', [40, 6, 1.5, 2, '36.5'], [8, 35, 62, 88, 115, 142]],\n  ['repair check: spacing divisor', [40, 2, 2, 1, '30'], [4, 115]],\n  ['generated control 1', [55.5, 5, 3, 4, '32'], [14, 53, 91, 130, 169]],\n  ['generated control 2', [55.5, 7, 1, 2.5, '36.5'], [10, 42, 73, 105, 137, 168, 200]],\n  ['generated control 3', [40, 5, 2, 2, '36.5'], [8, 41, 74, 107, 140]]]]\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-spacing-divisor","generated_at":"2026-09-29T14:52:33.910608+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":"Spacing divides by the number of buttons instead of the number of gaps.","sha256":"b09d2e2030ceb3b397fc87f4c416c40f1d363115fca98aa5b043d4423122b966","title":"Buttonhole row planner: spacing divisor · 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":41.0,"exit_code":1,"observations":[{"actual":[7,30,54,77,100],"check":"five buttons","expected":[7,42,77,112,147],"passed":false},{"actual":[107],"check":"single button","expected":[107],"passed":true},{"actual":"error: count","check":"no buttons","expected":"error: count","passed":true},{"actual":[10,41,72,103,134],"check":"regression: spacing divisor","expected":[10,57,103,150,196],"passed":false},{"actual":[4,30,56,82,108,134],"check":"repair check: spacing divisor","expected":[4,41,77,114,150,187],"passed":false},{"actual":[163],"check":"generated control 1","expected":[163],"passed":true},{"actual":[5,30,55,80,105,130],"check":"generated control 2","expected":[5,40,75,110,145,180],"passed":false},{"actual":[137],"check":"generated control 3","expected":[137],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"five buttons\", \"actual\": [7, 30, 54, 77, 100], \"expected\": [7, 42, 77, 112, 147], \"passed\": false}, {\"check\": \"single button\", \"actual\": [107], \"expected\": [107], \"passed\": true}, {\"check\": \"no buttons\", \"actual\": \"error: count\", \"expected\": \"error: count\", \"passed\": true}, {\"check\": \"regression: spacing divisor\", \"actual\": [10, 41, 72, 103, 134], \"expected\": [10, 57, 103, 150, 196], \"passed\": false}, {\"check\": \"repair check: spacing divisor\", \"actual\": [4, 30, 56, 82, 108, 134], \"expected\": [4, 41, 77, 114, 150, 187], \"passed\": false}, {\"check\": \"generated control 1\", \"actual\": [163], \"expected\": [163], \"passed\": true}, {\"check\": \"generated control 2\", \"actual\": [5, 30, 55, 80, 105, 130], \"expected\": [5, 40, 75, 110, 145, 180], \"passed\": false}, {\"check\": \"generated control 3\", \"actual\": [137], \"expected\": [137], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.762,"exit_code":1,"observations":[{"actual":[7,35,63,91,119],"check":"five buttons","expected":[7,42,77,112,147],"passed":false},{"actual":[107],"check":"single button","expected":[107],"passed":true},{"actual":"error: count","check":"no buttons","expected":"error: count","passed":true},{"actual":[10,47,85,122,159],"check":"regression: spacing divisor","expected":[10,57,103,150,196],"passed":false},{"actual":[4,35,65,95,126,156],"check":"repair check: spacing divisor","expected":[4,41,77,114,150,187],"passed":false},{"actual":[163],"check":"generated control 1","expected":[163],"passed":true},{"actual":[5,34,63,92,121,151],"check":"generated control 2","expected":[5,40,75,110,145,180],"passed":false},{"actual":[137],"check":"generated control 3","expected":[137],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"five buttons\", \"actual\": [7, 35, 63, 91, 119], \"expected\": [7, 42, 77, 112, 147], \"passed\": false}, {\"check\": \"single button\", \"actual\": [107], \"expected\": [107], \"passed\": true}, {\"check\": \"no buttons\", \"actual\": \"error: count\", \"expected\": \"error: count\", \"passed\": true}, {\"check\": \"regression: spacing divisor\", \"actual\": [10, 47, 85, 122, 159], \"expected\": [10, 57, 103, 150, 196], \"passed\": false}, {\"check\": \"repair check: spacing divisor\", \"actual\": [4, 35, 65, 95, 126, 156], \"expected\": [4, 41, 77, 114, 150, 187], \"passed\": false}, {\"check\": \"generated control 1\", \"actual\": [163], \"expected\": [163], \"passed\": true}, {\"check\": \"generated control 2\", \"actual\": [5, 34, 63, 92, 121, 151], \"expected\": [5, 40, 75, 110, 145, 180], \"passed\": false}, {\"check\": \"generated control 3\", \"actual\": [137], \"expected\": [137], \"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."}}