{"abstract":"Buttonhole rows land ten times too high.","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":"Inverting the gauge gives centimetres per row.","family":"w2-knitting_and_sewing_pattern_grading-buttonhole-rows-row-gauge-conversion","id":"FA-97631","implementations":{"attempt":{"sha256":"7945cb9b878a923bdd9fef84e336ff1fc1e11afac583bb0b5d35e5f5b4ebf97a","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 = 10 / Fraction(str(rows_per_10cm))\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: row gauge conversion', [60, 7, 1, 1, '28'], [4, 31, 58, 85, 112, 139, 166]],\n  ['repair check: row gauge conversion', [55.5, 7, 3, 4, '30'], [13, 37, 62, 86, 110, 134, 159]],\n  ['generated control 1', [55.5, 0, 3, 4, '32'], 'error: count'],\n  ['generated control 2', [60, 0, 1, 2, '30'], 'error: count'],\n  ['generated control 3', [60, 7, 3, 4, '32'], [14, 42, 70, 99, 127, 155, 183]]],\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: row gauge conversion', [60, 6, 2, 2.5, '36.5'], [10, 51, 91, 132, 172, 213]],\n  ['repair check: row gauge conversion', [55.5, 6, 2, 2.5, '32'], [9, 42, 74, 107, 140, 172]],\n  ['generated control 1', [40, 6, 3, 2, '30'], [7, 28, 49, 70, 91, 112]],\n  ['generated control 2', [40, 6, 3, 4, '28'], [12, 31, 49, 68, 86, 105]],\n  ['generated control 3', [60, 4, 1.5, 1, '30'], [4, 62, 119, 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: row gauge conversion', [60, 1, 1.5, 2, '32'], [188]],\n  ['repair check: row gauge conversion', [55.5, 5, 2, 4, '28'], [12, 47, 82, 116, 151]],\n  ['generated control 1', [62, 0, 3, 1, '32'], 'error: count'],\n  ['generated control 2', [62, 1, 3, 2, '28'], [166]],\n  ['generated control 3', [50, 6, 3, 4, '30'], [13, 39, 65, 90, 116, 142]]],\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: row gauge conversion', [50, 1, 1.5, 4, '28'], [137]],\n  ['repair check: row gauge conversion', [50, 4, 3, 1, '30'], [4, 50, 96, 142]],\n  ['generated control 1', [62, 1, 2, 2, '32'], [193]],\n  ['generated control 2', [62, 6, 2, 1, '32'], [4, 42, 80, 117, 155, 193]],\n  ['generated control 3', [55.5, 5, 1.5, 2, '36.5'], [8, 56, 103, 151, 198]]],\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: row gauge conversion', [40, 7, 1.5, 2.5, '36.5'], [10, 32, 54, 76, 98, 120, 142]],\n  ['repair check: row gauge conversion', [50, 7, 1.5, 2.5, '36.5'], [10, 38, 66, 94, 122, 150, 178]],\n  ['generated control 1', [62, 1, 2, 2, '28'], [169]],\n  ['generated control 2', [62, 7, 1, 1, '30'], [4, 34, 64, 94, 124, 154, 184]],\n  ['generated control 3', [60, 2, 1, 1, '30'], [4, 178]]]]\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":"901b5a351f6741f78c444d8f66feb8a60357f1c8ec75b5c376efbe114b32c668","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))\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: row gauge conversion', [60, 7, 1, 1, '28'], [4, 31, 58, 85, 112, 139, 166]],\n  ['repair check: row gauge conversion', [55.5, 7, 3, 4, '30'], [13, 37, 62, 86, 110, 134, 159]],\n  ['generated control 1', [55.5, 0, 3, 4, '32'], 'error: count'],\n  ['generated control 2', [60, 0, 1, 2, '30'], 'error: count'],\n  ['generated control 3', [60, 7, 3, 4, '32'], [14, 42, 70, 99, 127, 155, 183]]],\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: row gauge conversion', [60, 6, 2, 2.5, '36.5'], [10, 51, 91, 132, 172, 213]],\n  ['repair check: row gauge conversion', [55.5, 6, 2, 2.5, '32'], [9, 42, 74, 107, 140, 172]],\n  ['generated control 1', [40, 6, 3, 2, '30'], [7, 28, 49, 70, 91, 112]],\n  ['generated control 2', [40, 6, 3, 4, '28'], [12, 31, 49, 68, 86, 105]],\n  ['generated control 3', [60, 4, 1.5, 1, '30'], [4, 62, 119, 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: row gauge conversion', [60, 1, 1.5, 2, '32'], [188]],\n  ['repair check: row gauge conversion', [55.5, 5, 2, 4, '28'], [12, 47, 82, 116, 151]],\n  ['generated control 1', [62, 0, 3, 1, '32'], 'error: count'],\n  ['generated control 2', [62, 1, 3, 2, '28'], [166]],\n  ['generated control 3', [50, 6, 3, 4, '30'], [13, 39, 65, 90, 116, 142]]],\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: row gauge conversion', [50, 1, 1.5, 4, '28'], [137]],\n  ['repair check: row gauge conversion', [50, 4, 3, 1, '30'], [4, 50, 96, 142]],\n  ['generated control 1', [62, 1, 2, 2, '32'], [193]],\n  ['generated control 2', [62, 6, 2, 1, '32'], [4, 42, 80, 117, 155, 193]],\n  ['generated control 3', [55.5, 5, 1.5, 2, '36.5'], [8, 56, 103, 151, 198]]],\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: row gauge conversion', [40, 7, 1.5, 2.5, '36.5'], [10, 32, 54, 76, 98, 120, 142]],\n  ['repair check: row gauge conversion', [50, 7, 1.5, 2.5, '36.5'], [10, 38, 66, 94, 122, 150, 178]],\n  ['generated control 1', [62, 1, 2, 2, '28'], [169]],\n  ['generated control 2', [62, 7, 1, 1, '30'], [4, 34, 64, 94, 124, 154, 184]],\n  ['generated control 3', [60, 2, 1, 1, '30'], [4, 178]]]]\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-row-gauge-conversion","generated_at":"2026-09-29T14:52:34.092948+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":"The per-10 cm row gauge is used per centimetre.","sha256":"87284e4ae4a4032696b0644c14b1892cd6713a7f1c24135c3830e2ef48de6ffb","title":"Buttonhole row planner: row gauge conversion · 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.063,"exit_code":1,"observations":[{"actual":[2,6,9,13,17],"check":"five buttons","expected":[7,42,77,112,147],"passed":false},{"actual":[15],"check":"single button","expected":[107],"passed":false},{"actual":"error: count","check":"no buttons","expected":"error: count","passed":true},{"actual":[1,5,8,12,15,19,22],"check":"regression: row gauge conversion","expected":[4,31,58,85,112,139,166],"passed":false},{"actual":[2,5,8,10,13,16,19],"check":"repair check: row gauge conversion","expected":[13,37,62,86,110,134,159],"passed":false},{"actual":"error: count","check":"generated control 1","expected":"error: count","passed":true},{"actual":"error: count","check":"generated control 2","expected":"error: count","passed":true},{"actual":[2,5,8,11,13,16,19],"check":"generated control 3","expected":[14,42,70,99,127,155,183],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"five buttons\", \"actual\": [2, 6, 9, 13, 17], \"expected\": [7, 42, 77, 112, 147], \"passed\": false}, {\"check\": \"single button\", \"actual\": [15], \"expected\": [107], \"passed\": false}, {\"check\": \"no buttons\", \"actual\": \"error: count\", \"expected\": \"error: count\", \"passed\": true}, {\"check\": \"regression: row gauge conversion\", \"actual\": [1, 5, 8, 12, 15, 19, 22], \"expected\": [4, 31, 58, 85, 112, 139, 166], \"passed\": false}, {\"check\": \"repair check: row gauge conversion\", \"actual\": [2, 5, 8, 10, 13, 16, 19], \"expected\": [13, 37, 62, 86, 110, 134, 159], \"passed\": false}, {\"check\": \"generated control 1\", \"actual\": \"error: count\", \"expected\": \"error: count\", \"passed\": true}, {\"check\": \"generated control 2\", \"actual\": \"error: count\", \"expected\": \"error: count\", \"passed\": true}, {\"check\": \"generated control 3\", \"actual\": [2, 5, 8, 11, 13, 16, 19], \"expected\": [14, 42, 70, 99, 127, 155, 183], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.063,"exit_code":1,"observations":[{"actual":[61,410,759,1107,1456],"check":"five buttons","expected":[7,42,77,112,147],"passed":false},{"actual":[1065],"check":"single button","expected":[107],"passed":false},{"actual":"error: count","check":"no buttons","expected":"error: count","passed":true},{"actual":[29,300,570,841,1112,1382,1653],"check":"regression: row gauge conversion","expected":[4,31,58,85,112,139,166],"passed":false},{"actual":[121,364,606,849,1091,1334,1576],"check":"repair check: row gauge conversion","expected":[13,37,62,86,110,134,159],"passed":false},{"actual":"error: count","check":"generated control 1","expected":"error: count","passed":true},{"actual":"error: count","check":"generated control 2","expected":"error: count","passed":true},{"actual":[129,412,694,977,1260,1542,1825],"check":"generated control 3","expected":[14,42,70,99,127,155,183],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"five buttons\", \"actual\": [61, 410, 759, 1107, 1456], \"expected\": [7, 42, 77, 112, 147], \"passed\": false}, {\"check\": \"single button\", \"actual\": [1065], \"expected\": [107], \"passed\": false}, {\"check\": \"no buttons\", \"actual\": \"error: count\", \"expected\": \"error: count\", \"passed\": true}, {\"check\": \"regression: row gauge conversion\", \"actual\": [29, 300, 570, 841, 1112, 1382, 1653], \"expected\": [4, 31, 58, 85, 112, 139, 166], \"passed\": false}, {\"check\": \"repair check: row gauge conversion\", \"actual\": [121, 364, 606, 849, 1091, 1334, 1576], \"expected\": [13, 37, 62, 86, 110, 134, 159], \"passed\": false}, {\"check\": \"generated control 1\", \"actual\": \"error: count\", \"expected\": \"error: count\", \"passed\": true}, {\"check\": \"generated control 2\", \"actual\": \"error: count\", \"expected\": \"error: count\", \"passed\": true}, {\"check\": \"generated control 3\", \"actual\": [129, 412, 694, 977, 1260, 1542, 1825], \"expected\": [14, 42, 70, 99, 127, 155, 183], \"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."}}