{"abstract":"Floats are listed grouped by color instead of by position across the row.","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":"Sorting by length loses the position order.","family":"w2-knitting_and_sewing_pattern_grading-colorwork-floats-report-order","id":"FA-97671","implementations":{"attempt":{"sha256":"707e375293c67d8e16e5a2903848d402bdee108f4c9578662e4ad0ad1c49ca9e","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] += 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[2])\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: report order', ['AAAAAACBCCBAACAA', 4, False],\n   [['B', 0, 7], ['C', 0, 6], ['A', 6, 5], ['B', 11, 5]]],\n  ['repair check: report order', ['BAAAABAABAAAAAAA', 3, True], [['B', 1, 4], ['B', 9, 7]]],\n  ['generated control 1', ['ABBBABAAABA', 4, True], []],\n  ['generated control 2', ['AABABAAAABAA', 4, False], []],\n  ['generated control 3', ['AAAAAA', 4, False], []]],\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: report order', ['AAAABAAAACABAA', 3, False],\n   [['B', 0, 4], ['C', 0, 9], ['B', 5, 6], ['C', 10, 4]]],\n  ['repair check: report order', ['AAAAABAAAAAAAA', 4, False], [['B', 0, 5], ['B', 6, 8]]],\n  ['generated control 1', ['ABAAAAABAAAABA', 3, False], [['B', 2, 5], ['B', 8, 4]]],\n  ['generated control 2', ['BAAAABAA', 5, False], []],\n  ['generated control 3', ['BAAAAAABBAAA', 4, False], [['B', 1, 6]]]],\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: report order', ['AAAAAAAACABAAAC', 4, True], [['C', 0, 8], ['C', 9, 5], ['B', 11, 14]]],\n  ['repair check: report order', ['BAAAABAAAAA', 3, True], [['B', 1, 4], ['B', 6, 5]]],\n  ['generated control 1', ['ABAAAAAAAAA', 5, False], [['B', 2, 9]]],\n  ['generated control 2', ['AABBABBABABA', 3, False], []],\n  ['generated control 3', ['BAAAAABAAAA', 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: report order', ['AAAAAAAAAAAAACBC', 4, True], [['C', 0, 13], ['B', 15, 15]]],\n  ['repair check: report order', ['BAAAABAAAAA', 3, False], [['B', 1, 4], ['B', 6, 5]]],\n  ['generated control 1', ['ABABAAAA', 3, True], [['B', 4, 5]]],\n  ['generated control 2', ['BAAAABBAAAAA', 5, False], []],\n  ['generated control 3', ['BACACCABACAB', 3, True], [['B', 1, 6], ['C', 10, 4]]]],\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: report order', ['CAAAABAAAAA', 4, False], [['B', 0, 5], ['C', 1, 10], ['B', 6, 5]]],\n  ['repair check: report order', ['AAAAAAABAC', 4, False], [['B', 0, 7], ['C', 0, 9]]],\n  ['generated control 1', ['BAAABAAAAA', 4, True], [['B', 5, 5]]],\n  ['generated control 2', ['BAAAAAAABAAA', 5, False], [['B', 1, 7]]],\n  ['generated control 3', ['AAAAAA', 3, True], []]]]\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":"a7de8db7779941d8f5f7c4a9cb2e296a3f2920d41d97c0a167d424c03969bf17","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] += first[1]\n        for start, length in runs:\n            if length > max_float:\n                out.append([color, start, length])\n    return out\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: report order', ['AAAAAACBCCBAACAA', 4, False],\n   [['B', 0, 7], ['C', 0, 6], ['A', 6, 5], ['B', 11, 5]]],\n  ['repair check: report order', ['BAAAABAABAAAAAAA', 3, True], [['B', 1, 4], ['B', 9, 7]]],\n  ['generated control 1', ['ABBBABAAABA', 4, True], []],\n  ['generated control 2', ['AABABAAAABAA', 4, False], []],\n  ['generated control 3', ['AAAAAA', 4, False], []]],\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: report order', ['AAAABAAAACABAA', 3, False],\n   [['B', 0, 4], ['C', 0, 9], ['B', 5, 6], ['C', 10, 4]]],\n  ['repair check: report order', ['AAAAABAAAAAAAA', 4, False], [['B', 0, 5], ['B', 6, 8]]],\n  ['generated control 1', ['ABAAAAABAAAABA', 3, False], [['B', 2, 5], ['B', 8, 4]]],\n  ['generated control 2', ['BAAAABAA', 5, False], []],\n  ['generated control 3', ['BAAAAAABBAAA', 4, False], [['B', 1, 6]]]],\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: report order', ['AAAAAAAACABAAAC', 4, True], [['C', 0, 8], ['C', 9, 5], ['B', 11, 14]]],\n  ['repair check: report order', ['BAAAABAAAAA', 3, True], [['B', 1, 4], ['B', 6, 5]]],\n  ['generated control 1', ['ABAAAAAAAAA', 5, False], [['B', 2, 9]]],\n  ['generated control 2', ['AABBABBABABA', 3, False], []],\n  ['generated control 3', ['BAAAAABAAAA', 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: report order', ['AAAAAAAAAAAAACBC', 4, True], [['C', 0, 13], ['B', 15, 15]]],\n  ['repair check: report order', ['BAAAABAAAAA', 3, False], [['B', 1, 4], ['B', 6, 5]]],\n  ['generated control 1', ['ABABAAAA', 3, True], [['B', 4, 5]]],\n  ['generated control 2', ['BAAAABBAAAAA', 5, False], []],\n  ['generated control 3', ['BACACCABACAB', 3, True], [['B', 1, 6], ['C', 10, 4]]]],\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: report order', ['CAAAABAAAAA', 4, False], [['B', 0, 5], ['C', 1, 10], ['B', 6, 5]]],\n  ['repair check: report order', ['AAAAAAABAC', 4, False], [['B', 0, 7], ['C', 0, 9]]],\n  ['generated control 1', ['BAAABAAAAA', 4, True], [['B', 5, 5]]],\n  ['generated control 2', ['BAAAAAAABAAA', 5, False], [['B', 1, 7]]],\n  ['generated control 3', ['AAAAAA', 3, True], []]]]\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-report-order","generated_at":"2026-09-29T14:52:34.451018+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 report keeps per-color discovery order.","sha256":"d96eb3d7850275193387a45f22c3f18550a53938b19b7b7eb0b07b706ea56b76","title":"Stranded colorwork float checker: report order · 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":43.686,"exit_code":1,"observations":[{"actual":[["B",1,6]],"check":"flat long float","expected":[["B",1,6]],"passed":true},{"actual":[["A",7,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,7],["C",0,6],["A",6,5],["B",11,5]],"check":"regression: report order","expected":[["B",0,7],["C",0,6],["A",6,5],["B",11,5]],"passed":true},{"actual":[["B",9,7],["B",1,4]],"check":"repair check: report order","expected":[["B",1,4],["B",9,7]],"passed":false},{"actual":[],"check":"generated control 1","expected":[],"passed":true},{"actual":[],"check":"generated control 2","expected":[],"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\", 7, 5], [\"B\", 2, 5]], \"expected\": [[\"B\", 2, 5], [\"A\", 7, 5]], \"passed\": false}, {\"check\": \"exact limit\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"regression: report order\", \"actual\": [[\"B\", 0, 7], [\"C\", 0, 6], [\"A\", 6, 5], [\"B\", 11, 5]], \"expected\": [[\"B\", 0, 7], [\"C\", 0, 6], [\"A\", 6, 5], [\"B\", 11, 5]], \"passed\": true}, {\"check\": \"repair check: report order\", \"actual\": [[\"B\", 9, 7], [\"B\", 1, 4]], \"expected\": [[\"B\", 1, 4], [\"B\", 9, 7]], \"passed\": false}, {\"check\": \"generated control 1\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"generated control 2\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"generated control 3\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.612,"exit_code":1,"observations":[{"actual":[["B",1,6]],"check":"flat long float","expected":[["B",1,6]],"passed":true},{"actual":[["A",7,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":[["A",6,5],["B",0,7],["B",11,5],["C",0,6]],"check":"regression: report order","expected":[["B",0,7],["C",0,6],["A",6,5],["B",11,5]],"passed":false},{"actual":[["B",1,4],["B",9,7]],"check":"repair check: report order","expected":[["B",1,4],["B",9,7]],"passed":true},{"actual":[],"check":"generated control 1","expected":[],"passed":true},{"actual":[],"check":"generated control 2","expected":[],"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\", 7, 5], [\"B\", 2, 5]], \"expected\": [[\"B\", 2, 5], [\"A\", 7, 5]], \"passed\": false}, {\"check\": \"exact limit\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"regression: report order\", \"actual\": [[\"A\", 6, 5], [\"B\", 0, 7], [\"B\", 11, 5], [\"C\", 0, 6]], \"expected\": [[\"B\", 0, 7], [\"C\", 0, 6], [\"A\", 6, 5], [\"B\", 11, 5]], \"passed\": false}, {\"check\": \"repair check: report order\", \"actual\": [[\"B\", 1, 4], [\"B\", 9, 7]], \"expected\": [[\"B\", 1, 4], [\"B\", 9, 7]], \"passed\": true}, {\"check\": \"generated control 1\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"generated control 2\", \"actual\": [], \"expected\": [], \"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."}}