{"abstract":"The first buttonhole is placed one row too low.","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":"Ceiling the offset is not the same as adding one row.","family":"w2-knitting_and_sewing_pattern_grading-buttonhole-rows-one-based-rows","id":"FA-97636","implementations":{"attempt":{"sha256":"6693349ea8c677c3c7b712624c00bd00f35d86977695a39a8d8f0b64ed24d907","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.ceil(p * g) 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: one-based rows', [60, 2, 2, 4, '32'], [14, 187]],\n  ['repair check: one-based rows', [40, 5, 2, 4, '36.5'], [16, 47, 78, 109, 140]],\n  ['generated control 1', [40, 4, 1.5, 1, '32'], [4, 44, 84, 124]],\n  ['generated control 2', [55.5, 2, 3, 2, '28'], [7, 148]],\n  ['generated control 3', [50, 6, 2, 2.5, '28'], [8, 33, 59, 84, 110, 135]]],\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: one-based rows', [40, 2, 2, 2.5, '32'], [9, 123]],\n  ['repair check: one-based rows', [60, 6, 1.5, 2.5, '30'], [9, 42, 76, 109, 143, 177]],\n  ['generated control 1', [40, 0, 3, 2, '28'], 'error: count'],\n  ['generated control 2', [62, 4, 1, 1, '36.5'], [5, 78, 151, 224]],\n  ['generated control 3', [62, 5, 1, 4, '28'], [12, 52, 92, 132, 172]]],\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: one-based rows', [40, 5, 1, 2, '36.5'], [8, 42, 76, 110, 143]],\n  ['repair check: one-based rows', [60, 7, 1, 4, '32'], [14, 43, 72, 102, 131, 160, 190]],\n  ['generated control 1', [62, 5, 3, 2.5, '36.5'], [10, 62, 113, 165, 216]],\n  ['generated control 2', [62, 1, 1, 2, '30'], [184]],\n  ['generated control 3', [40, 7, 2, 4, '28'], [12, 28, 44, 60, 76, 92, 107]]],\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: one-based rows', [50, 6, 1, 4, '32'], [14, 43, 71, 100, 129, 158]],\n  ['repair check: one-based rows', [62, 5, 3, 2.5, '36.5'], [10, 62, 113, 165, 216]],\n  ['generated control 1', [40, 6, 3, 2, '36.5'], [8, 34, 59, 85, 111, 136]],\n  ['generated control 2', [40, 0, 3, 1, '36.5'], 'error: count'],\n  ['generated control 3', [55.5, 7, 1, 4, '32'], [14, 41, 68, 95, 122, 148, 175]]],\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: one-based rows', [55.5, 7, 3, 2.5, '30'], [9, 34, 59, 84, 109, 134, 159]],\n  ['repair check: one-based rows', [60, 6, 1, 2.5, '32'], [9, 45, 81, 117, 154, 190]],\n  ['generated control 1', [62, 1, 1.5, 4, '32'], [195]],\n  ['generated control 2', [60, 7, 3, 4, '36.5'], [16, 48, 80, 112, 145, 177, 209]],\n  ['generated control 3', [40, 5, 1, 1, '28'], [4, 30, 57, 84, 110]]]]\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":"07e8a9cb2e333144a81ebf2cf8d320a002c1e4f509a72b9ea7c51327f052feea","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)) 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: one-based rows', [60, 2, 2, 4, '32'], [14, 187]],\n  ['repair check: one-based rows', [40, 5, 2, 4, '36.5'], [16, 47, 78, 109, 140]],\n  ['generated control 1', [40, 4, 1.5, 1, '32'], [4, 44, 84, 124]],\n  ['generated control 2', [55.5, 2, 3, 2, '28'], [7, 148]],\n  ['generated control 3', [50, 6, 2, 2.5, '28'], [8, 33, 59, 84, 110, 135]]],\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: one-based rows', [40, 2, 2, 2.5, '32'], [9, 123]],\n  ['repair check: one-based rows', [60, 6, 1.5, 2.5, '30'], [9, 42, 76, 109, 143, 177]],\n  ['generated control 1', [40, 0, 3, 2, '28'], 'error: count'],\n  ['generated control 2', [62, 4, 1, 1, '36.5'], [5, 78, 151, 224]],\n  ['generated control 3', [62, 5, 1, 4, '28'], [12, 52, 92, 132, 172]]],\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: one-based rows', [40, 5, 1, 2, '36.5'], [8, 42, 76, 110, 143]],\n  ['repair check: one-based rows', [60, 7, 1, 4, '32'], [14, 43, 72, 102, 131, 160, 190]],\n  ['generated control 1', [62, 5, 3, 2.5, '36.5'], [10, 62, 113, 165, 216]],\n  ['generated control 2', [62, 1, 1, 2, '30'], [184]],\n  ['generated control 3', [40, 7, 2, 4, '28'], [12, 28, 44, 60, 76, 92, 107]]],\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: one-based rows', [50, 6, 1, 4, '32'], [14, 43, 71, 100, 129, 158]],\n  ['repair check: one-based rows', [62, 5, 3, 2.5, '36.5'], [10, 62, 113, 165, 216]],\n  ['generated control 1', [40, 6, 3, 2, '36.5'], [8, 34, 59, 85, 111, 136]],\n  ['generated control 2', [40, 0, 3, 1, '36.5'], 'error: count'],\n  ['generated control 3', [55.5, 7, 1, 4, '32'], [14, 41, 68, 95, 122, 148, 175]]],\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: one-based rows', [55.5, 7, 3, 2.5, '30'], [9, 34, 59, 84, 109, 134, 159]],\n  ['repair check: one-based rows', [60, 6, 1, 2.5, '32'], [9, 45, 81, 117, 154, 190]],\n  ['generated control 1', [62, 1, 1.5, 4, '32'], [195]],\n  ['generated control 2', [60, 7, 3, 4, '36.5'], [16, 48, 80, 112, 145, 177, 209]],\n  ['generated control 3', [40, 5, 1, 1, '28'], [4, 30, 57, 84, 110]]]]\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-one-based-rows","generated_at":"2026-09-29T14:52:34.138761+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":"Row numbers are 0-based.","sha256":"537372f947ddd056aa48bd31235999c862359b2c1286b0c89c41be488678da27","title":"Buttonhole row planner: one-based rows · 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.313,"exit_code":1,"observations":[{"actual":[6,41,76,111,146],"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":[13,186],"check":"regression: one-based rows","expected":[14,187],"passed":false},{"actual":[15,46,77,108,139],"check":"repair check: one-based rows","expected":[16,47,78,109,140],"passed":false},{"actual":[4,44,84,124],"check":"generated control 1","expected":[4,44,84,124],"passed":true},{"actual":[6,147],"check":"generated control 2","expected":[7,148],"passed":false},{"actual":[7,33,58,84,109,135],"check":"generated control 3","expected":[8,33,59,84,110,135],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"five buttons\", \"actual\": [6, 41, 76, 111, 146], \"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: one-based rows\", \"actual\": [13, 186], \"expected\": [14, 187], \"passed\": false}, {\"check\": \"repair check: one-based rows\", \"actual\": [15, 46, 77, 108, 139], \"expected\": [16, 47, 78, 109, 140], \"passed\": false}, {\"check\": \"generated control 1\", \"actual\": [4, 44, 84, 124], \"expected\": [4, 44, 84, 124], \"passed\": true}, {\"check\": \"generated control 2\", \"actual\": [6, 147], \"expected\": [7, 148], \"passed\": false}, {\"check\": \"generated control 3\", \"actual\": [7, 33, 58, 84, 109, 135], \"expected\": [8, 33, 59, 84, 110, 135], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.354,"exit_code":1,"observations":[{"actual":[6,41,76,111,146],"check":"five buttons","expected":[7,42,77,112,147],"passed":false},{"actual":[106],"check":"single button","expected":[107],"passed":false},{"actual":"error: count","check":"no buttons","expected":"error: count","passed":true},{"actual":[13,186],"check":"regression: one-based rows","expected":[14,187],"passed":false},{"actual":[15,46,77,108,139],"check":"repair check: one-based rows","expected":[16,47,78,109,140],"passed":false},{"actual":[3,43,83,123],"check":"generated control 1","expected":[4,44,84,124],"passed":false},{"actual":[6,147],"check":"generated control 2","expected":[7,148],"passed":false},{"actual":[7,32,58,83,109,134],"check":"generated control 3","expected":[8,33,59,84,110,135],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"five buttons\", \"actual\": [6, 41, 76, 111, 146], \"expected\": [7, 42, 77, 112, 147], \"passed\": false}, {\"check\": \"single button\", \"actual\": [106], \"expected\": [107], \"passed\": false}, {\"check\": \"no buttons\", \"actual\": \"error: count\", \"expected\": \"error: count\", \"passed\": true}, {\"check\": \"regression: one-based rows\", \"actual\": [13, 186], \"expected\": [14, 187], \"passed\": false}, {\"check\": \"repair check: one-based rows\", \"actual\": [15, 46, 77, 108, 139], \"expected\": [16, 47, 78, 109, 140], \"passed\": false}, {\"check\": \"generated control 1\", \"actual\": [3, 43, 83, 123], \"expected\": [4, 44, 84, 124], \"passed\": false}, {\"check\": \"generated control 2\", \"actual\": [6, 147], \"expected\": [7, 148], \"passed\": false}, {\"check\": \"generated control 3\", \"actual\": [7, 32, 58, 83, 109, 134], \"expected\": [8, 33, 59, 84, 110, 135], \"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."}}