{"abstract":"Binding comes up short because only one selvage was trimmed in the plan.","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\".","contract_signature":"perimeter, strip_width, fabric_width, selvage, tail","evaluation_group":"w2-knitting_and_sewing_pattern_grading-binding-strips","failed_approach":"An extra centimetre of trim is not in the contract and over-cuts.","family":"w2-knitting_and_sewing_pattern_grading-binding-strips-selvage-trim-both-edges","id":"FA-97596","implementations":{"attempt":{"sha256":"392ecac85b7f339e93457f06f6f0c19f805da8a2698289da89a23391fb91301d","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 - 1\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: selvage trim both edges', [420, 5, 107, 1, 0], [5, 25, 85]],\n  ['repair check: selvage trim both edges', [420, 6, 150, 2, 30], [4, 24, 116]],\n  ['generated control 1', [600, 5, 140, 2, 0], [5, 25, 60]],\n  ['generated control 2', [200, 6.5, 110, 0, 20], [3, 19.5, 97.0]],\n  ['generated control 3', [420, 6, 150, 1, 30], [4, 24, 124]]],\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: selvage trim both edges', [420, 5, 107, 2, 20], [5, 25, 55]],\n  ['repair check: selvage trim both edges', [200, 5, 107, 0, 0], [2, 10, 9]],\n  ['generated control 1', [600, 6, 110, 1, 25], [7, 42, 95]],\n  ['generated control 2', [420, 6, 110, 1, 30], [5, 30, 66]],\n  ['generated control 3', [350, 6.5, 150, 2, 20], [3, 19.5, 55.0]]],\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: selvage trim both edges', [150, 4, 110, 1, 20], [2, 8, 42]],\n  ['repair check: selvage trim both edges', [200, 4, 150, 1, 25], [2, 8, 67]],\n  ['generated control 1', [150, 6, 110, 1, 25], [2, 12, 35]],\n  ['generated control 2', [600, 5, 107, 0, 25], [7, 35, 94]],\n  ['generated control 3', [150, 6.5, 107, 2, 0], [2, 13.0, 49.5]]],\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: selvage trim both edges', [150, 6, 107, 2, 25], [2, 12, 25]],\n  ['repair check: selvage trim both edges', [420, 5, 110, 1, 25], [5, 25, 75]],\n  ['generated control 1', [420, 6.5, 110, 2, 25], [5, 32.5, 59.0]],\n  ['generated control 2', [200, 5, 140, 1, 30], [2, 10, 41]],\n  ['generated control 3', [600, 6.5, 140, 1, 20], [5, 32.5, 44.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: selvage trim both edges', [150, 6, 150, 1, 25], [2, 12, 115]],\n  ['repair check: selvage trim both edges', [420, 4, 107, 1, 0], [5, 20, 89]],\n  ['generated control 1', [280, 6.5, 150, 0, 30], [3, 19.5, 127.0]],\n  ['generated control 2', [600, 4, 107, 2, 25], [7, 28, 72]],\n  ['generated control 3', [350, 5, 107, 0, 30], [4, 20, 33]]]]\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":"81ecb06c22b095ac38e322a471fa36bc170257d45a41f69d6aef0c44564a0887","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 - 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: selvage trim both edges', [420, 5, 107, 1, 0], [5, 25, 85]],\n  ['repair check: selvage trim both edges', [420, 6, 150, 2, 30], [4, 24, 116]],\n  ['generated control 1', [600, 5, 140, 2, 0], [5, 25, 60]],\n  ['generated control 2', [200, 6.5, 110, 0, 20], [3, 19.5, 97.0]],\n  ['generated control 3', [420, 6, 150, 1, 30], [4, 24, 124]]],\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: selvage trim both edges', [420, 5, 107, 2, 20], [5, 25, 55]],\n  ['repair check: selvage trim both edges', [200, 5, 107, 0, 0], [2, 10, 9]],\n  ['generated control 1', [600, 6, 110, 1, 25], [7, 42, 95]],\n  ['generated control 2', [420, 6, 110, 1, 30], [5, 30, 66]],\n  ['generated control 3', [350, 6.5, 150, 2, 20], [3, 19.5, 55.0]]],\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: selvage trim both edges', [150, 4, 110, 1, 20], [2, 8, 42]],\n  ['repair check: selvage trim both edges', [200, 4, 150, 1, 25], [2, 8, 67]],\n  ['generated control 1', [150, 6, 110, 1, 25], [2, 12, 35]],\n  ['generated control 2', [600, 5, 107, 0, 25], [7, 35, 94]],\n  ['generated control 3', [150, 6.5, 107, 2, 0], [2, 13.0, 49.5]]],\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: selvage trim both edges', [150, 6, 107, 2, 25], [2, 12, 25]],\n  ['repair check: selvage trim both edges', [420, 5, 110, 1, 25], [5, 25, 75]],\n  ['generated control 1', [420, 6.5, 110, 2, 25], [5, 32.5, 59.0]],\n  ['generated control 2', [200, 5, 140, 1, 30], [2, 10, 41]],\n  ['generated control 3', [600, 6.5, 140, 1, 20], [5, 32.5, 44.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: selvage trim both edges', [150, 6, 150, 1, 25], [2, 12, 115]],\n  ['repair check: selvage trim both edges', [420, 4, 107, 1, 0], [5, 20, 89]],\n  ['generated control 1', [280, 6.5, 150, 0, 30], [3, 19.5, 127.0]],\n  ['generated control 2', [600, 4, 107, 2, 25], [7, 28, 72]],\n  ['generated control 3', [350, 5, 107, 0, 30], [4, 20, 33]]]]\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-selvage-trim-both-edges","generated_at":"2026-09-29T14:52:33.709188+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.","root_cause":"Only one selvage is removed from the strip length.","sha256":"3dbae98406c4fa2deaeac726cc476910584fbf8c7ddaa6eec064328412702829","title":"Quilt binding strip planner: selvage trim both edges · 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.406,"exit_code":1,"observations":[{"actual":[3,18,4],"check":"baby quilt","expected":[3,18,7],"passed":false},{"actual":[2,12,8],"check":"two strips","expected":[2,12,10],"passed":false},{"actual":"error: fabric too narrow","check":"narrow fabric","expected":"error: fabric too narrow","passed":true},{"actual":[5,25,80],"check":"regression: selvage trim both edges","expected":[5,25,85],"passed":false},{"actual":[4,24,112],"check":"repair check: selvage trim both edges","expected":[4,24,116],"passed":false},{"actual":[5,25,55],"check":"generated control 1","expected":[5,25,60],"passed":false},{"actual":[3,19.5,94.0],"check":"generated control 2","expected":[3,19.5,97.0],"passed":false},{"actual":[4,24,120],"check":"generated control 3","expected":[4,24,124],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"baby quilt\", \"actual\": [3, 18, 4], \"expected\": [3, 18, 7], \"passed\": false}, {\"check\": \"two strips\", \"actual\": [2, 12, 8], \"expected\": [2, 12, 10], \"passed\": false}, {\"check\": \"narrow fabric\", \"actual\": \"error: fabric too narrow\", \"expected\": \"error: fabric too narrow\", \"passed\": true}, {\"check\": \"regression: selvage trim both edges\", \"actual\": [5, 25, 80], \"expected\": [5, 25, 85], \"passed\": false}, {\"check\": \"repair check: selvage trim both edges\", \"actual\": [4, 24, 112], \"expected\": [4, 24, 116], \"passed\": false}, {\"check\": \"generated control 1\", \"actual\": [5, 25, 55], \"expected\": [5, 25, 60], \"passed\": false}, {\"check\": \"generated control 2\", \"actual\": [3, 19.5, 94.0], \"expected\": [3, 19.5, 97.0], \"passed\": false}, {\"check\": \"generated control 3\", \"actual\": [4, 24, 120], \"expected\": [4, 24, 124], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.159,"exit_code":1,"observations":[{"actual":[3,18,10],"check":"baby quilt","expected":[3,18,7],"passed":false},{"actual":[2,12,14],"check":"two strips","expected":[2,12,10],"passed":false},{"actual":"error: fabric too narrow","check":"narrow fabric","expected":"error: fabric too narrow","passed":true},{"actual":[5,25,90],"check":"regression: selvage trim both edges","expected":[5,25,85],"passed":false},{"actual":[4,24,124],"check":"repair check: selvage trim both edges","expected":[4,24,116],"passed":false},{"actual":[5,25,70],"check":"generated control 1","expected":[5,25,60],"passed":false},{"actual":[3,19.5,97.0],"check":"generated control 2","expected":[3,19.5,97.0],"passed":true},{"actual":[4,24,128],"check":"generated control 3","expected":[4,24,124],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"baby quilt\", \"actual\": [3, 18, 10], \"expected\": [3, 18, 7], \"passed\": false}, {\"check\": \"two strips\", \"actual\": [2, 12, 14], \"expected\": [2, 12, 10], \"passed\": false}, {\"check\": \"narrow fabric\", \"actual\": \"error: fabric too narrow\", \"expected\": \"error: fabric too narrow\", \"passed\": true}, {\"check\": \"regression: selvage trim both edges\", \"actual\": [5, 25, 90], \"expected\": [5, 25, 85], \"passed\": false}, {\"check\": \"repair check: selvage trim both edges\", \"actual\": [4, 24, 124], \"expected\": [4, 24, 116], \"passed\": false}, {\"check\": \"generated control 1\", \"actual\": [5, 25, 70], \"expected\": [5, 25, 60], \"passed\": false}, {\"check\": \"generated control 2\", \"actual\": [3, 19.5, 97.0], \"expected\": [3, 19.5, 97.0], \"passed\": true}, {\"check\": \"generated control 3\", \"actual\": [4, 24, 128], \"expected\": [4, 24, 124], \"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."}}