{"abstract":"The binding exactly matches the perimeter, leaving nothing to join the ends.","category":"Knitting and sewing pattern grading","checks":8,"contract":"Usable strip length = fabric_width - 2*selvage. Joining n strips with diagonal seams loses strip_width per join (n-1 joins). Need perimeter + tail. n is the smallest count with n*usable - (n-1)*strip_width >= need. Return [n, fabric cut length n*strip_width, surplus]; usable <= strip_width -> \"error: fabric too narrow\".","evaluation_group":"w2-knitting_and_sewing_pattern_grading-binding-strips","failed_approach":"Half the tail is not enough to join the ends.","family":"w2-knitting_and_sewing_pattern_grading-binding-strips-finishing-tail","id":"FA-97606","implementations":{"attempt":{"sha256":"c05e0b56fa08a90f5b03bb162e3bff875b62e8ed827dff8317033123cb98ca13","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(perimeter, strip_width, fabric_width, selvage, tail):\n    usable = fabric_width - 2 * selvage\n    if usable <= strip_width:\n        return 'error: fabric too narrow'\n    need = perimeter + tail // 2\n    def length(n):\n        return n * usable - (n - 1) * strip_width\n    n = 1\n    while length(n) < need:\n        n += 1\n    return [n, n * strip_width, length(n) - need]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['baby quilt', [280, 6, 110, 1, 25], [3, 18, 7]], ['two strips', [196, 6, 110, 2, 0], [2, 12, 10]],\n  ['narrow fabric', [100, 6, 6, 0, 0], 'error: fabric too narrow'],\n  ['regression: finishing tail', [150, 5, 107, 2, 20], [2, 10, 31]],\n  ['repair check: finishing tail', [420, 4, 110, 2, 20], [5, 20, 74]],\n  ['generated control 1', [150, 6, 150, 1, 30], [2, 12, 110]],\n  ['generated control 2', [150, 6.5, 150, 0, 0], [1, 6.5, 0.0]],\n  ['generated control 3', [150, 4, 107, 2, 0], [2, 8, 52]]],\n [['two strips', [196, 6, 110, 2, 0], [2, 12, 10]],\n  ['narrow fabric', [100, 6, 6, 0, 0], 'error: fabric too narrow'],\n  ['baby quilt', [280, 6, 110, 1, 25], [3, 18, 7]],\n  ['regression: finishing tail', [420, 4, 150, 1, 30], [4, 16, 130]],\n  ['repair check: finishing tail', [420, 5, 140, 2, 30], [4, 20, 79]],\n  ['generated control 1', [350, 4, 110, 1, 20], [4, 16, 50]],\n  ['generated control 2', [350, 5, 107, 1, 25], [4, 20, 30]],\n  ['generated control 3', [280, 6, 110, 1, 20], [3, 18, 12]]],\n [['narrow fabric', [100, 6, 6, 0, 0], 'error: fabric too narrow'],\n  ['baby quilt', [280, 6, 110, 1, 25], [3, 18, 7]], ['two strips', [196, 6, 110, 2, 0], [2, 12, 10]],\n  ['regression: finishing tail', [150, 6, 107, 0, 20], [2, 12, 38]],\n  ['repair check: finishing tail', [350, 6.5, 140, 1, 20], [3, 19.5, 31.0]],\n  ['generated control 1', [600, 6, 110, 1, 25], [7, 42, 95]],\n  ['generated control 2', [150, 6.5, 110, 2, 0], [2, 13.0, 55.5]],\n  ['generated control 3', [600, 4, 150, 0, 30], [5, 20, 104]]],\n [['baby quilt', [280, 6, 110, 1, 25], [3, 18, 7]], ['two strips', [196, 6, 110, 2, 0], [2, 12, 10]],\n  ['narrow fabric', [100, 6, 6, 0, 0], 'error: fabric too narrow'],\n  ['regression: finishing tail', [280, 4, 150, 2, 20], [3, 12, 130]],\n  ['repair check: finishing tail', [420, 6.5, 107, 2, 25], [5, 32.5, 44.0]],\n  ['generated control 1', [200, 6.5, 150, 2, 0], [2, 13.0, 85.5]],\n  ['generated control 2', [420, 5, 150, 1, 0], [3, 15, 14]],\n  ['generated control 3', [200, 6.5, 107, 2, 30], [3, 19.5, 66.0]]],\n [['two strips', [196, 6, 110, 2, 0], [2, 12, 10]],\n  ['narrow fabric', [100, 6, 6, 0, 0], 'error: fabric too narrow'],\n  ['baby quilt', [280, 6, 110, 1, 25], [3, 18, 7]],\n  ['regression: finishing tail', [350, 4, 107, 2, 20], [4, 16, 30]],\n  ['repair check: finishing tail', [420, 6.5, 140, 0, 25], [4, 26.0, 95.5]],\n  ['generated control 1', [350, 5, 140, 1, 0], [3, 15, 54]],\n  ['generated control 2', [600, 6.5, 110, 2, 20], [7, 45.5, 83.0]],\n  ['generated control 3', [150, 5, 140, 1, 20], [2, 10, 101]]]]\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":"92f665cb6d7bcbf574d7918e0a6a7b309d384b35eb821d3add709c73aea8ba53","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(perimeter, strip_width, fabric_width, selvage, tail):\n    usable = fabric_width - 2 * selvage\n    if usable <= strip_width:\n        return 'error: fabric too narrow'\n    need = perimeter\n    def length(n):\n        return n * usable - (n - 1) * strip_width\n    n = 1\n    while length(n) < need:\n        n += 1\n    return [n, n * strip_width, length(n) - need]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['baby quilt', [280, 6, 110, 1, 25], [3, 18, 7]], ['two strips', [196, 6, 110, 2, 0], [2, 12, 10]],\n  ['narrow fabric', [100, 6, 6, 0, 0], 'error: fabric too narrow'],\n  ['regression: finishing tail', [150, 5, 107, 2, 20], [2, 10, 31]],\n  ['repair check: finishing tail', [420, 4, 110, 2, 20], [5, 20, 74]],\n  ['generated control 1', [150, 6, 150, 1, 30], [2, 12, 110]],\n  ['generated control 2', [150, 6.5, 150, 0, 0], [1, 6.5, 0.0]],\n  ['generated control 3', [150, 4, 107, 2, 0], [2, 8, 52]]],\n [['two strips', [196, 6, 110, 2, 0], [2, 12, 10]],\n  ['narrow fabric', [100, 6, 6, 0, 0], 'error: fabric too narrow'],\n  ['baby quilt', [280, 6, 110, 1, 25], [3, 18, 7]],\n  ['regression: finishing tail', [420, 4, 150, 1, 30], [4, 16, 130]],\n  ['repair check: finishing tail', [420, 5, 140, 2, 30], [4, 20, 79]],\n  ['generated control 1', [350, 4, 110, 1, 20], [4, 16, 50]],\n  ['generated control 2', [350, 5, 107, 1, 25], [4, 20, 30]],\n  ['generated control 3', [280, 6, 110, 1, 20], [3, 18, 12]]],\n [['narrow fabric', [100, 6, 6, 0, 0], 'error: fabric too narrow'],\n  ['baby quilt', [280, 6, 110, 1, 25], [3, 18, 7]], ['two strips', [196, 6, 110, 2, 0], [2, 12, 10]],\n  ['regression: finishing tail', [150, 6, 107, 0, 20], [2, 12, 38]],\n  ['repair check: finishing tail', [350, 6.5, 140, 1, 20], [3, 19.5, 31.0]],\n  ['generated control 1', [600, 6, 110, 1, 25], [7, 42, 95]],\n  ['generated control 2', [150, 6.5, 110, 2, 0], [2, 13.0, 55.5]],\n  ['generated control 3', [600, 4, 150, 0, 30], [5, 20, 104]]],\n [['baby quilt', [280, 6, 110, 1, 25], [3, 18, 7]], ['two strips', [196, 6, 110, 2, 0], [2, 12, 10]],\n  ['narrow fabric', [100, 6, 6, 0, 0], 'error: fabric too narrow'],\n  ['regression: finishing tail', [280, 4, 150, 2, 20], [3, 12, 130]],\n  ['repair check: finishing tail', [420, 6.5, 107, 2, 25], [5, 32.5, 44.0]],\n  ['generated control 1', [200, 6.5, 150, 2, 0], [2, 13.0, 85.5]],\n  ['generated control 2', [420, 5, 150, 1, 0], [3, 15, 14]],\n  ['generated control 3', [200, 6.5, 107, 2, 30], [3, 19.5, 66.0]]],\n [['two strips', [196, 6, 110, 2, 0], [2, 12, 10]],\n  ['narrow fabric', [100, 6, 6, 0, 0], 'error: fabric too narrow'],\n  ['baby quilt', [280, 6, 110, 1, 25], [3, 18, 7]],\n  ['regression: finishing tail', [350, 4, 107, 2, 20], [4, 16, 30]],\n  ['repair check: finishing tail', [420, 6.5, 140, 0, 25], [4, 26.0, 95.5]],\n  ['generated control 1', [350, 5, 140, 1, 0], [3, 15, 54]],\n  ['generated control 2', [600, 6.5, 110, 2, 20], [7, 45.5, 83.0]],\n  ['generated control 3', [150, 5, 140, 1, 20], [2, 10, 101]]]]\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"},"fixed":{"sha256":"7a6a91adef7246afb18141e380f277a333f2403e5a2ac3117d01d45922d9460d","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(perimeter, strip_width, fabric_width, selvage, tail):\n    usable = fabric_width - 2 * selvage\n    if usable <= strip_width:\n        return 'error: fabric too narrow'\n    need = perimeter + tail\n    def length(n):\n        return n * usable - (n - 1) * strip_width\n    n = 1\n    while length(n) < need:\n        n += 1\n    return [n, n * strip_width, length(n) - need]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['baby quilt', [280, 6, 110, 1, 25], [3, 18, 7]], ['two strips', [196, 6, 110, 2, 0], [2, 12, 10]],\n  ['narrow fabric', [100, 6, 6, 0, 0], 'error: fabric too narrow'],\n  ['regression: finishing tail', [150, 5, 107, 2, 20], [2, 10, 31]],\n  ['repair check: finishing tail', [420, 4, 110, 2, 20], [5, 20, 74]],\n  ['generated control 1', [150, 6, 150, 1, 30], [2, 12, 110]],\n  ['generated control 2', [150, 6.5, 150, 0, 0], [1, 6.5, 0.0]],\n  ['generated control 3', [150, 4, 107, 2, 0], [2, 8, 52]]],\n [['two strips', [196, 6, 110, 2, 0], [2, 12, 10]],\n  ['narrow fabric', [100, 6, 6, 0, 0], 'error: fabric too narrow'],\n  ['baby quilt', [280, 6, 110, 1, 25], [3, 18, 7]],\n  ['regression: finishing tail', [420, 4, 150, 1, 30], [4, 16, 130]],\n  ['repair check: finishing tail', [420, 5, 140, 2, 30], [4, 20, 79]],\n  ['generated control 1', [350, 4, 110, 1, 20], [4, 16, 50]],\n  ['generated control 2', [350, 5, 107, 1, 25], [4, 20, 30]],\n  ['generated control 3', [280, 6, 110, 1, 20], [3, 18, 12]]],\n [['narrow fabric', [100, 6, 6, 0, 0], 'error: fabric too narrow'],\n  ['baby quilt', [280, 6, 110, 1, 25], [3, 18, 7]], ['two strips', [196, 6, 110, 2, 0], [2, 12, 10]],\n  ['regression: finishing tail', [150, 6, 107, 0, 20], [2, 12, 38]],\n  ['repair check: finishing tail', [350, 6.5, 140, 1, 20], [3, 19.5, 31.0]],\n  ['generated control 1', [600, 6, 110, 1, 25], [7, 42, 95]],\n  ['generated control 2', [150, 6.5, 110, 2, 0], [2, 13.0, 55.5]],\n  ['generated control 3', [600, 4, 150, 0, 30], [5, 20, 104]]],\n [['baby quilt', [280, 6, 110, 1, 25], [3, 18, 7]], ['two strips', [196, 6, 110, 2, 0], [2, 12, 10]],\n  ['narrow fabric', [100, 6, 6, 0, 0], 'error: fabric too narrow'],\n  ['regression: finishing tail', [280, 4, 150, 2, 20], [3, 12, 130]],\n  ['repair check: finishing tail', [420, 6.5, 107, 2, 25], [5, 32.5, 44.0]],\n  ['generated control 1', [200, 6.5, 150, 2, 0], [2, 13.0, 85.5]],\n  ['generated control 2', [420, 5, 150, 1, 0], [3, 15, 14]],\n  ['generated control 3', [200, 6.5, 107, 2, 30], [3, 19.5, 66.0]]],\n [['two strips', [196, 6, 110, 2, 0], [2, 12, 10]],\n  ['narrow fabric', [100, 6, 6, 0, 0], 'error: fabric too narrow'],\n  ['baby quilt', [280, 6, 110, 1, 25], [3, 18, 7]],\n  ['regression: finishing tail', [350, 4, 107, 2, 20], [4, 16, 30]],\n  ['repair check: finishing tail', [420, 6.5, 140, 0, 25], [4, 26.0, 95.5]],\n  ['generated control 1', [350, 5, 140, 1, 0], [3, 15, 54]],\n  ['generated control 2', [600, 6.5, 110, 2, 20], [7, 45.5, 83.0]],\n  ['generated control 3', [150, 5, 140, 1, 20], [2, 10, 101]]]]\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-binding-strips-finishing-tail","generated_at":"2026-09-29T14:52:33.777692+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Quilters cut width-of-fabric strips and join them diagonally to bind the quilt edge.","repair":"Need perimeter plus tail.","root_cause":"The tail allowance for joining the ends is not added.","sha256":"80f7039b875616cca411b9c34d552459a2bbdab13a9913acca6f2912571936a8","title":"Quilt binding strip planner: finishing tail · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":44.428,"exit_code":1,"observations":[{"actual":[3,18,20],"check":"baby quilt","expected":[3,18,7],"passed":false},{"actual":[2,12,10],"check":"two strips","expected":[2,12,10],"passed":true},{"actual":"error: fabric too narrow","check":"narrow fabric","expected":"error: fabric too narrow","passed":true},{"actual":[2,10,41],"check":"regression: finishing tail","expected":[2,10,31],"passed":false},{"actual":[5,20,84],"check":"repair check: finishing tail","expected":[5,20,74],"passed":false},{"actual":[2,12,125],"check":"generated control 1","expected":[2,12,110],"passed":false},{"actual":[1,6.5,0.0],"check":"generated control 2","expected":[1,6.5,0.0],"passed":true},{"actual":[2,8,52],"check":"generated control 3","expected":[2,8,52],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"baby quilt\", \"actual\": [3, 18, 20], \"expected\": [3, 18, 7], \"passed\": false}, {\"check\": \"two strips\", \"actual\": [2, 12, 10], \"expected\": [2, 12, 10], \"passed\": true}, {\"check\": \"narrow fabric\", \"actual\": \"error: fabric too narrow\", \"expected\": \"error: fabric too narrow\", \"passed\": true}, {\"check\": \"regression: finishing tail\", \"actual\": [2, 10, 41], \"expected\": [2, 10, 31], \"passed\": false}, {\"check\": \"repair check: finishing tail\", \"actual\": [5, 20, 84], \"expected\": [5, 20, 74], \"passed\": false}, {\"check\": \"generated control 1\", \"actual\": [2, 12, 125], \"expected\": [2, 12, 110], \"passed\": false}, {\"check\": \"generated control 2\", \"actual\": [1, 6.5, 0.0], \"expected\": [1, 6.5, 0.0], \"passed\": true}, {\"check\": \"generated control 3\", \"actual\": [2, 8, 52], \"expected\": [2, 8, 52], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":45.099,"exit_code":1,"observations":[{"actual":[3,18,32],"check":"baby quilt","expected":[3,18,7],"passed":false},{"actual":[2,12,10],"check":"two strips","expected":[2,12,10],"passed":true},{"actual":"error: fabric too narrow","check":"narrow fabric","expected":"error: fabric too narrow","passed":true},{"actual":[2,10,51],"check":"regression: finishing tail","expected":[2,10,31],"passed":false},{"actual":[5,20,94],"check":"repair check: finishing tail","expected":[5,20,74],"passed":false},{"actual":[2,12,140],"check":"generated control 1","expected":[2,12,110],"passed":false},{"actual":[1,6.5,0.0],"check":"generated control 2","expected":[1,6.5,0.0],"passed":true},{"actual":[2,8,52],"check":"generated control 3","expected":[2,8,52],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"baby quilt\", \"actual\": [3, 18, 32], \"expected\": [3, 18, 7], \"passed\": false}, {\"check\": \"two strips\", \"actual\": [2, 12, 10], \"expected\": [2, 12, 10], \"passed\": true}, {\"check\": \"narrow fabric\", \"actual\": \"error: fabric too narrow\", \"expected\": \"error: fabric too narrow\", \"passed\": true}, {\"check\": \"regression: finishing tail\", \"actual\": [2, 10, 51], \"expected\": [2, 10, 31], \"passed\": false}, {\"check\": \"repair check: finishing tail\", \"actual\": [5, 20, 94], \"expected\": [5, 20, 74], \"passed\": false}, {\"check\": \"generated control 1\", \"actual\": [2, 12, 140], \"expected\": [2, 12, 110], \"passed\": false}, {\"check\": \"generated control 2\", \"actual\": [1, 6.5, 0.0], \"expected\": [1, 6.5, 0.0], \"passed\": true}, {\"check\": \"generated control 3\", \"actual\": [2, 8, 52], \"expected\": [2, 8, 52], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":41.285,"exit_code":0,"observations":[{"actual":[3,18,7],"check":"baby quilt","expected":[3,18,7],"passed":true},{"actual":[2,12,10],"check":"two strips","expected":[2,12,10],"passed":true},{"actual":"error: fabric too narrow","check":"narrow fabric","expected":"error: fabric too narrow","passed":true},{"actual":[2,10,31],"check":"regression: finishing tail","expected":[2,10,31],"passed":true},{"actual":[5,20,74],"check":"repair check: finishing tail","expected":[5,20,74],"passed":true},{"actual":[2,12,110],"check":"generated control 1","expected":[2,12,110],"passed":true},{"actual":[1,6.5,0.0],"check":"generated control 2","expected":[1,6.5,0.0],"passed":true},{"actual":[2,8,52],"check":"generated control 3","expected":[2,8,52],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"baby quilt\", \"actual\": [3, 18, 7], \"expected\": [3, 18, 7], \"passed\": true}, {\"check\": \"two strips\", \"actual\": [2, 12, 10], \"expected\": [2, 12, 10], \"passed\": true}, {\"check\": \"narrow fabric\", \"actual\": \"error: fabric too narrow\", \"expected\": \"error: fabric too narrow\", \"passed\": true}, {\"check\": \"regression: finishing tail\", \"actual\": [2, 10, 31], \"expected\": [2, 10, 31], \"passed\": true}, {\"check\": \"repair check: finishing tail\", \"actual\": [5, 20, 74], \"expected\": [5, 20, 74], \"passed\": true}, {\"check\": \"generated control 1\", \"actual\": [2, 12, 110], \"expected\": [2, 12, 110], \"passed\": true}, {\"check\": \"generated control 2\", \"actual\": [1, 6.5, 0.0], \"expected\": [1, 6.5, 0.0], \"passed\": true}, {\"check\": \"generated control 3\", \"actual\": [2, 8, 52], \"expected\": [2, 8, 52], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}