{"abstract":"The planner cuts an extra strip because it counts a join on the last strip.","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":"Doubling the loss per join over-buys.","family":"w2-knitting_and_sewing_pattern_grading-binding-strips-diagonal-join-loss","id":"FA-97601","implementations":{"attempt":{"sha256":"c88526c02349d0fefaa4a07e4f91b683b035359f10b3b073f673abf985731d46","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) * 2 * 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: diagonal join loss', [600, 5, 140, 1, 30], [5, 25, 40]],\n  ['repair check: diagonal join loss', [600, 6.5, 140, 1, 25], [5, 32.5, 39.0]],\n  ['generated control 1', [200, 6, 140, 0, 25], [2, 12, 49]],\n  ['generated control 2', [350, 5, 150, 0, 25], [3, 15, 65]],\n  ['generated control 3', [200, 4, 107, 0, 25], [3, 12, 88]]],\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: diagonal join loss', [420, 6, 150, 0, 30], [4, 24, 132]],\n  ['repair check: diagonal join loss', [350, 6, 150, 0, 25], [3, 18, 63]],\n  ['generated control 1', [420, 4, 140, 0, 30], [4, 16, 98]],\n  ['generated control 2', [350, 5, 110, 0, 30], [4, 20, 45]],\n  ['generated control 3', [150, 6, 150, 2, 30], [2, 12, 106]]],\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: diagonal join loss', [600, 6, 150, 0, 20], [5, 30, 106]],\n  ['repair check: diagonal join loss', [420, 6.5, 150, 0, 30], [4, 26.0, 130.5]],\n  ['generated control 1', [150, 6, 150, 0, 25], [2, 12, 119]],\n  ['generated control 2', [280, 5, 140, 2, 30], [3, 15, 88]],\n  ['generated control 3', [150, 5, 107, 0, 0], [2, 10, 59]]],\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: diagonal join loss', [600, 5, 150, 0, 0], [5, 25, 130]],\n  ['repair check: diagonal join loss', [280, 6.5, 107, 0, 30], [4, 26.0, 98.5]],\n  ['generated control 1', [420, 4, 110, 1, 0], [4, 16, 0]],\n  ['generated control 2', [200, 6.5, 150, 0, 25], [2, 13.0, 68.5]],\n  ['generated control 3', [350, 5, 110, 2, 0], [4, 20, 59]]],\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: diagonal join loss', [150, 4, 140, 2, 0], [2, 8, 118]],\n  ['repair check: diagonal join loss', [600, 4, 140, 1, 25], [5, 20, 49]],\n  ['generated control 1', [280, 6, 107, 1, 30], [4, 24, 92]],\n  ['generated control 2', [600, 4, 140, 0, 0], [5, 20, 84]],\n  ['generated control 3', [200, 5, 107, 2, 30], [3, 15, 69]]]]\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":"d4b19e5378a71d51452aa3f3c1902c21e5b9eea213786b2990a798d4b25611d0","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 * 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: diagonal join loss', [600, 5, 140, 1, 30], [5, 25, 40]],\n  ['repair check: diagonal join loss', [600, 6.5, 140, 1, 25], [5, 32.5, 39.0]],\n  ['generated control 1', [200, 6, 140, 0, 25], [2, 12, 49]],\n  ['generated control 2', [350, 5, 150, 0, 25], [3, 15, 65]],\n  ['generated control 3', [200, 4, 107, 0, 25], [3, 12, 88]]],\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: diagonal join loss', [420, 6, 150, 0, 30], [4, 24, 132]],\n  ['repair check: diagonal join loss', [350, 6, 150, 0, 25], [3, 18, 63]],\n  ['generated control 1', [420, 4, 140, 0, 30], [4, 16, 98]],\n  ['generated control 2', [350, 5, 110, 0, 30], [4, 20, 45]],\n  ['generated control 3', [150, 6, 150, 2, 30], [2, 12, 106]]],\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: diagonal join loss', [600, 6, 150, 0, 20], [5, 30, 106]],\n  ['repair check: diagonal join loss', [420, 6.5, 150, 0, 30], [4, 26.0, 130.5]],\n  ['generated control 1', [150, 6, 150, 0, 25], [2, 12, 119]],\n  ['generated control 2', [280, 5, 140, 2, 30], [3, 15, 88]],\n  ['generated control 3', [150, 5, 107, 0, 0], [2, 10, 59]]],\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: diagonal join loss', [600, 5, 150, 0, 0], [5, 25, 130]],\n  ['repair check: diagonal join loss', [280, 6.5, 107, 0, 30], [4, 26.0, 98.5]],\n  ['generated control 1', [420, 4, 110, 1, 0], [4, 16, 0]],\n  ['generated control 2', [200, 6.5, 150, 0, 25], [2, 13.0, 68.5]],\n  ['generated control 3', [350, 5, 110, 2, 0], [4, 20, 59]]],\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: diagonal join loss', [150, 4, 140, 2, 0], [2, 8, 118]],\n  ['repair check: diagonal join loss', [600, 4, 140, 1, 25], [5, 20, 49]],\n  ['generated control 1', [280, 6, 107, 1, 30], [4, 24, 92]],\n  ['generated control 2', [600, 4, 140, 0, 0], [5, 20, 84]],\n  ['generated control 3', [200, 5, 107, 2, 30], [3, 15, 69]]]]\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-diagonal-join-loss","generated_at":"2026-09-29T14:52:33.778154+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":"n strips are charged n joins instead of n-1.","sha256":"65564fa4f9f9d2d88bed30d1a0b2a01c081ed008f08fb5611cde10be2d9b9065","title":"Quilt binding strip planner: diagonal join loss · 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.144,"exit_code":1,"observations":[{"actual":[4,24,91],"check":"baby quilt","expected":[3,18,7],"passed":false},{"actual":[2,12,4],"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,20],"check":"regression: diagonal join loss","expected":[5,25,40],"passed":false},{"actual":[5,32.5,13.0],"check":"repair check: diagonal join loss","expected":[5,32.5,39.0],"passed":false},{"actual":[2,12,43],"check":"generated control 1","expected":[2,12,49],"passed":false},{"actual":[3,15,55],"check":"generated control 2","expected":[3,15,65],"passed":false},{"actual":[3,12,80],"check":"generated control 3","expected":[3,12,88],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"baby quilt\", \"actual\": [4, 24, 91], \"expected\": [3, 18, 7], \"passed\": false}, {\"check\": \"two strips\", \"actual\": [2, 12, 4], \"expected\": [2, 12, 10], \"passed\": false}, {\"check\": \"narrow fabric\", \"actual\": \"error: fabric too narrow\", \"expected\": \"error: fabric too narrow\", \"passed\": true}, {\"check\": \"regression: diagonal join loss\", \"actual\": [5, 25, 20], \"expected\": [5, 25, 40], \"passed\": false}, {\"check\": \"repair check: diagonal join loss\", \"actual\": [5, 32.5, 13.0], \"expected\": [5, 32.5, 39.0], \"passed\": false}, {\"check\": \"generated control 1\", \"actual\": [2, 12, 43], \"expected\": [2, 12, 49], \"passed\": false}, {\"check\": \"generated control 2\", \"actual\": [3, 15, 55], \"expected\": [3, 15, 65], \"passed\": false}, {\"check\": \"generated control 3\", \"actual\": [3, 12, 80], \"expected\": [3, 12, 88], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":46.883,"exit_code":1,"observations":[{"actual":[3,18,1],"check":"baby quilt","expected":[3,18,7],"passed":false},{"actual":[2,12,4],"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,35],"check":"regression: diagonal join loss","expected":[5,25,40],"passed":false},{"actual":[5,32.5,32.5],"check":"repair check: diagonal join loss","expected":[5,32.5,39.0],"passed":false},{"actual":[2,12,43],"check":"generated control 1","expected":[2,12,49],"passed":false},{"actual":[3,15,60],"check":"generated control 2","expected":[3,15,65],"passed":false},{"actual":[3,12,84],"check":"generated control 3","expected":[3,12,88],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"baby quilt\", \"actual\": [3, 18, 1], \"expected\": [3, 18, 7], \"passed\": false}, {\"check\": \"two strips\", \"actual\": [2, 12, 4], \"expected\": [2, 12, 10], \"passed\": false}, {\"check\": \"narrow fabric\", \"actual\": \"error: fabric too narrow\", \"expected\": \"error: fabric too narrow\", \"passed\": true}, {\"check\": \"regression: diagonal join loss\", \"actual\": [5, 25, 35], \"expected\": [5, 25, 40], \"passed\": false}, {\"check\": \"repair check: diagonal join loss\", \"actual\": [5, 32.5, 32.5], \"expected\": [5, 32.5, 39.0], \"passed\": false}, {\"check\": \"generated control 1\", \"actual\": [2, 12, 43], \"expected\": [2, 12, 49], \"passed\": false}, {\"check\": \"generated control 2\", \"actual\": [3, 15, 60], \"expected\": [3, 15, 65], \"passed\": false}, {\"check\": \"generated control 3\", \"actual\": [3, 12, 84], \"expected\": [3, 12, 88], \"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."}}