{"abstract":"A wrapped float is reported starting at stitch 0 instead of where it begins before the round end.","category":"Knitting and sewing pattern grading","checks":8,"contract":"row is a string of color letters. For each color, a float is a maximal run of other colors [start, length]. In the round, a float touching both the end and the start (with at least two runs) wraps and merges into the last run (its start is kept). Report [color, start, length] for floats longer than max_float, sorted by (start, color).","contract_signature":"row, max_float, in_round","evaluation_group":"w2-knitting_and_sewing_pattern_grading-colorwork-floats","failed_approach":"Taking the longer part instead of the sum under-reports the float.","family":"w2-knitting_and_sewing_pattern_grading-colorwork-floats-merged-float-start","id":"FA-97666","implementations":{"attempt":{"sha256":"094eb384cb0285efdf090b522c2564e1448eab849c8ccef5a36adb2a68e9755a","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(row, max_float, in_round):\n    n = len(row)\n    out = []\n    for color in sorted(set(row)):\n        runs = []\n        i = 0\n        while i < n:\n            if row[i] != color:\n                j = i\n                while j < n and row[j] != color:\n                    j += 1\n                runs.append([i, j - i])\n                i = j\n            else:\n                i += 1\n        if in_round and len(runs) >= 2 and runs[0][0] == 0 and runs[-1][0] + runs[-1][1] == n:\n            first = runs.pop(0)\n            runs[-1][1] = max(runs[-1][1], first[1])\n        for start, length in runs:\n            if length > max_float:\n                out.append([color, start, length])\n    return sorted(out, key=lambda x: (x[1], x[0]))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['flat long float', ['BAAAAAABBA', 5, False], [['B', 1, 6]]],\n  ['wrap in round', ['BBAAAAABBB', 4, True], [['B', 2, 5], ['A', 7, 5]]],\n  ['exact limit', ['BAAAAB', 4, False], []],\n  ['regression: merged float start', ['AAABAAABAAA', 4, True], [['B', 8, 6]]],\n  ['repair check: merged float start', ['BAAACCABAB', 3, True], [['B', 1, 6], ['C', 6, 8]]],\n  ['generated control 1', ['AAAAAAAAAAAAAA', 5, True], []],\n  ['generated control 2', ['BAAAABAAAAAAAB', 3, False], [['B', 1, 4], ['B', 6, 7]]],\n  ['generated control 3', ['BAAABBBAAAA', 4, True], []]],\n [['wrap in round', ['BBAAAAABBB', 4, True], [['B', 2, 5], ['A', 7, 5]]],\n  ['exact limit', ['BAAAAB', 4, False], []], ['flat long float', ['BAAAAAABBA', 5, False], [['B', 1, 6]]],\n  ['regression: merged float start', ['ABAABABAAA', 3, True], [['B', 7, 4]]],\n  ['repair check: merged float start', ['AABBAA', 3, True], [['B', 4, 4]]],\n  ['generated control 1', ['AAAAAABAA', 3, False], [['B', 0, 6]]],\n  ['generated control 2', ['BAAAAAAABAAAA', 4, False], [['B', 1, 7]]],\n  ['generated control 3', ['BACABAABAAACABA', 4, False], [['C', 3, 8], ['B', 8, 5]]]],\n [['exact limit', ['BAAAAB', 4, False], []], ['flat long float', ['BAAAAAABBA', 5, False], [['B', 1, 6]]],\n  ['wrap in round', ['BBAAAAABBB', 4, True], [['B', 2, 5], ['A', 7, 5]]],\n  ['regression: merged float start', ['AAAAACBA', 3, True], [['C', 6, 7], ['B', 7, 7]]],\n  ['repair check: merged float start', ['ABAAABBAAACCABA', 3, True], [['B', 7, 6], ['C', 12, 13]]],\n  ['generated control 1', ['AABABAAACAABACAA', 4, False], [['C', 0, 8], ['B', 5, 6]]],\n  ['generated control 2', ['AAAAAA', 3, True], []],\n  ['generated control 3', ['BAAAAABBBAAAA', 4, False], [['B', 1, 5]]]],\n [['flat long float', ['BAAAAAABBA', 5, False], [['B', 1, 6]]],\n  ['wrap in round', ['BBAAAAABBB', 4, True], [['B', 2, 5], ['A', 7, 5]]],\n  ['exact limit', ['BAAAAB', 4, False], []],\n  ['regression: merged float start', ['AAACAAAABACAAAA', 3, True], [['C', 4, 6], ['B', 9, 14], ['C', 11, 7]]],\n  ['repair check: merged float start', ['ABAAACCABA', 4, True], [['B', 2, 6], ['C', 7, 8]]],\n  ['generated control 1', ['BAAABBBAAA', 4, False], []],\n  ['generated control 2', ['BAAAAAAABBBAA', 5, False], [['B', 1, 7]]],\n  ['generated control 3', ['BAAAAAAABAAAA', 5, True], [['B', 1, 7]]]],\n [['wrap in round', ['BBAAAAABBB', 4, True], [['B', 2, 5], ['A', 7, 5]]],\n  ['exact limit', ['BAAAAB', 4, False], []], ['flat long float', ['BAAAAAABBA', 5, False], [['B', 1, 6]]],\n  ['regression: merged float start', ['AAAACCACACA', 3, True], [['C', 10, 5]]],\n  ['repair check: merged float start', ['ABAABAAAAA', 4, True], [['B', 5, 6]]],\n  ['generated control 1', ['BAABBA', 5, True], []], ['generated control 2', ['ABABAA', 4, True], []],\n  ['generated control 3', ['BAAAABBAA', 5, False], []]]]\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":"64c5c5f461d4f573ea570d13bed5d8171dface73c7ad2a3ef1e29319d49b5a04","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(row, max_float, in_round):\n    n = len(row)\n    out = []\n    for color in sorted(set(row)):\n        runs = []\n        i = 0\n        while i < n:\n            if row[i] != color:\n                j = i\n                while j < n and row[j] != color:\n                    j += 1\n                runs.append([i, j - i])\n                i = j\n            else:\n                i += 1\n        if in_round and len(runs) >= 2 and runs[0][0] == 0 and runs[-1][0] + runs[-1][1] == n:\n            last = runs.pop()\n            runs[0][1] += last[1]\n        for start, length in runs:\n            if length > max_float:\n                out.append([color, start, length])\n    return sorted(out, key=lambda x: (x[1], x[0]))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['flat long float', ['BAAAAAABBA', 5, False], [['B', 1, 6]]],\n  ['wrap in round', ['BBAAAAABBB', 4, True], [['B', 2, 5], ['A', 7, 5]]],\n  ['exact limit', ['BAAAAB', 4, False], []],\n  ['regression: merged float start', ['AAABAAABAAA', 4, True], [['B', 8, 6]]],\n  ['repair check: merged float start', ['BAAACCABAB', 3, True], [['B', 1, 6], ['C', 6, 8]]],\n  ['generated control 1', ['AAAAAAAAAAAAAA', 5, True], []],\n  ['generated control 2', ['BAAAABAAAAAAAB', 3, False], [['B', 1, 4], ['B', 6, 7]]],\n  ['generated control 3', ['BAAABBBAAAA', 4, True], []]],\n [['wrap in round', ['BBAAAAABBB', 4, True], [['B', 2, 5], ['A', 7, 5]]],\n  ['exact limit', ['BAAAAB', 4, False], []], ['flat long float', ['BAAAAAABBA', 5, False], [['B', 1, 6]]],\n  ['regression: merged float start', ['ABAABABAAA', 3, True], [['B', 7, 4]]],\n  ['repair check: merged float start', ['AABBAA', 3, True], [['B', 4, 4]]],\n  ['generated control 1', ['AAAAAABAA', 3, False], [['B', 0, 6]]],\n  ['generated control 2', ['BAAAAAAABAAAA', 4, False], [['B', 1, 7]]],\n  ['generated control 3', ['BACABAABAAACABA', 4, False], [['C', 3, 8], ['B', 8, 5]]]],\n [['exact limit', ['BAAAAB', 4, False], []], ['flat long float', ['BAAAAAABBA', 5, False], [['B', 1, 6]]],\n  ['wrap in round', ['BBAAAAABBB', 4, True], [['B', 2, 5], ['A', 7, 5]]],\n  ['regression: merged float start', ['AAAAACBA', 3, True], [['C', 6, 7], ['B', 7, 7]]],\n  ['repair check: merged float start', ['ABAAABBAAACCABA', 3, True], [['B', 7, 6], ['C', 12, 13]]],\n  ['generated control 1', ['AABABAAACAABACAA', 4, False], [['C', 0, 8], ['B', 5, 6]]],\n  ['generated control 2', ['AAAAAA', 3, True], []],\n  ['generated control 3', ['BAAAAABBBAAAA', 4, False], [['B', 1, 5]]]],\n [['flat long float', ['BAAAAAABBA', 5, False], [['B', 1, 6]]],\n  ['wrap in round', ['BBAAAAABBB', 4, True], [['B', 2, 5], ['A', 7, 5]]],\n  ['exact limit', ['BAAAAB', 4, False], []],\n  ['regression: merged float start', ['AAACAAAABACAAAA', 3, True], [['C', 4, 6], ['B', 9, 14], ['C', 11, 7]]],\n  ['repair check: merged float start', ['ABAAACCABA', 4, True], [['B', 2, 6], ['C', 7, 8]]],\n  ['generated control 1', ['BAAABBBAAA', 4, False], []],\n  ['generated control 2', ['BAAAAAAABBBAA', 5, False], [['B', 1, 7]]],\n  ['generated control 3', ['BAAAAAAABAAAA', 5, True], [['B', 1, 7]]]],\n [['wrap in round', ['BBAAAAABBB', 4, True], [['B', 2, 5], ['A', 7, 5]]],\n  ['exact limit', ['BAAAAB', 4, False], []], ['flat long float', ['BAAAAAABBA', 5, False], [['B', 1, 6]]],\n  ['regression: merged float start', ['AAAACCACACA', 3, True], [['C', 10, 5]]],\n  ['repair check: merged float start', ['ABAABAAAAA', 4, True], [['B', 5, 6]]],\n  ['generated control 1', ['BAABBA', 5, True], []], ['generated control 2', ['ABABAA', 4, True], []],\n  ['generated control 3', ['BAAAABBAA', 5, False], []]]]\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-colorwork-floats-merged-float-start","generated_at":"2026-09-29T14:52:34.372844+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Stranded knitting charts are checked for long floats that need catching.","root_cause":"The merged float keeps the start of the first run.","sha256":"846e8da47f770adc3f093e84fd99b95a52d50fe40ebd801bb684738ac6db3e97","title":"Stranded colorwork float checker: merged float start · 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.84,"exit_code":1,"observations":[{"actual":[["B",1,6]],"check":"flat long float","expected":[["B",1,6]],"passed":true},{"actual":[["B",2,5]],"check":"wrap in round","expected":[["B",2,5],["A",7,5]],"passed":false},{"actual":[],"check":"exact limit","expected":[],"passed":true},{"actual":[],"check":"regression: merged float start","expected":[["B",8,6]],"passed":false},{"actual":[["B",1,6],["C",6,4]],"check":"repair check: merged float start","expected":[["B",1,6],["C",6,8]],"passed":false},{"actual":[],"check":"generated control 1","expected":[],"passed":true},{"actual":[["B",1,4],["B",6,7]],"check":"generated control 2","expected":[["B",1,4],["B",6,7]],"passed":true},{"actual":[],"check":"generated control 3","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"flat long float\", \"actual\": [[\"B\", 1, 6]], \"expected\": [[\"B\", 1, 6]], \"passed\": true}, {\"check\": \"wrap in round\", \"actual\": [[\"B\", 2, 5]], \"expected\": [[\"B\", 2, 5], [\"A\", 7, 5]], \"passed\": false}, {\"check\": \"exact limit\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"regression: merged float start\", \"actual\": [], \"expected\": [[\"B\", 8, 6]], \"passed\": false}, {\"check\": \"repair check: merged float start\", \"actual\": [[\"B\", 1, 6], [\"C\", 6, 4]], \"expected\": [[\"B\", 1, 6], [\"C\", 6, 8]], \"passed\": false}, {\"check\": \"generated control 1\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"generated control 2\", \"actual\": [[\"B\", 1, 4], [\"B\", 6, 7]], \"expected\": [[\"B\", 1, 4], [\"B\", 6, 7]], \"passed\": true}, {\"check\": \"generated control 3\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.691,"exit_code":1,"observations":[{"actual":[["B",1,6]],"check":"flat long float","expected":[["B",1,6]],"passed":true},{"actual":[["A",0,5],["B",2,5]],"check":"wrap in round","expected":[["B",2,5],["A",7,5]],"passed":false},{"actual":[],"check":"exact limit","expected":[],"passed":true},{"actual":[["B",0,6]],"check":"regression: merged float start","expected":[["B",8,6]],"passed":false},{"actual":[["C",0,8],["B",1,6]],"check":"repair check: merged float start","expected":[["B",1,6],["C",6,8]],"passed":false},{"actual":[],"check":"generated control 1","expected":[],"passed":true},{"actual":[["B",1,4],["B",6,7]],"check":"generated control 2","expected":[["B",1,4],["B",6,7]],"passed":true},{"actual":[],"check":"generated control 3","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"flat long float\", \"actual\": [[\"B\", 1, 6]], \"expected\": [[\"B\", 1, 6]], \"passed\": true}, {\"check\": \"wrap in round\", \"actual\": [[\"A\", 0, 5], [\"B\", 2, 5]], \"expected\": [[\"B\", 2, 5], [\"A\", 7, 5]], \"passed\": false}, {\"check\": \"exact limit\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"regression: merged float start\", \"actual\": [[\"B\", 0, 6]], \"expected\": [[\"B\", 8, 6]], \"passed\": false}, {\"check\": \"repair check: merged float start\", \"actual\": [[\"C\", 0, 8], [\"B\", 1, 6]], \"expected\": [[\"B\", 1, 6], [\"C\", 6, 8]], \"passed\": false}, {\"check\": \"generated control 1\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"generated control 2\", \"actual\": [[\"B\", 1, 4], [\"B\", 6, 7]], \"expected\": [[\"B\", 1, 4], [\"B\", 6, 7]], \"passed\": true}, {\"check\": \"generated control 3\", \"actual\": [], \"expected\": [], \"passed\": true}], \"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."}}