{"abstract":"Rotations that wrap past 11 produce negative spans, so a wrapped rotation such as [11,0,4] is never chosen correctly.","category":"Music interval and transposition theory","checks":8,"contract":"Input a list of integers (reduced mod 12, duplicates removed). Return the normal form: among all rotations of the ascending set, choose the one with the smallest span first-to-last, then smallest span first-to-penultimate, and so on toward the second element; a full tie picks the rotation starting on the lowest pitch class. Empty input returns []; non-integer input returns None.","evaluation_group":"w2-music-interval-normal-form","failed_approach":"Lifting one element too many duplicates the rotation start, making every span twelve and every choice a tie.","family":"w2-music-interval-normal-form-rotation-wrap","id":"FA-81026","implementations":{"attempt":{"sha256":"32797b63e1bd0d076c73d6acdd77e0b12898170787f89b78ae8210a08f67290b","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    if not isinstance(x, list) or not all(isinstance(v, int) for v in x):\n        return None\n    pcs = sorted(set(v % 12 for v in x))\n    if not pcs:\n        return []\n    n = len(pcs)\n    best = None\n    for r in range(n):\n        rot = pcs[r:] + [p + 12 for p in pcs[:r + 1]]\n        key = [rot[-1] - rot[0]] + [rot[j] - rot[0] for j in range(n - 2, 0, -1)]\n        cand = (key, rot[0])\n        if best is None or cand < best[0]:\n            best = (cand, [p % 12 for p in rot])\n    return best[1]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([0, 4, 7], [0, 4, 7]), ([7, 4, 0], [0, 4, 7]), ([11, 0, 4], [11, 0, 4]), ([0, 1, 5, 6, 8], [0, 1, 5, 6, 8]), ([0, 1, 3, 5, 8, 9], [8, 9, 0, 1, 3, 5]), ([0, 2, 3, 6, 7, 9], [0, 2, 3, 6, 7, 9]), ([0, 1, 2, 5, 6, 7, 9], [0, 1, 2, 5, 6, 7, 9]), ([], [])], [([7, 4, 0], [0, 4, 7]), ([11, 0, 4], [11, 0, 4]), ([0, 1, 5, 6, 8], [0, 1, 5, 6, 8]), ([0, 1, 3, 5, 8, 9], [8, 9, 0, 1, 3, 5]), ([0, 2, 3, 6, 7, 9], [0, 2, 3, 6, 7, 9]), ([0, 1, 2, 5, 6, 7, 9], [0, 1, 2, 5, 6, 7, 9]), ([0, 1, 2, 4, 5, 7, 9, 10], [9, 10, 0, 1, 2, 4, 5, 7]), ([0, 4, 8], [0, 4, 8])], [([11, 0, 4], [11, 0, 4]), ([0, 1, 5, 6, 8], [0, 1, 5, 6, 8]), ([0, 2, 3, 6, 7, 9], [0, 2, 3, 6, 7, 9]), ([0, 1, 2, 5, 6, 7, 9], [0, 1, 2, 5, 6, 7, 9]), ([0, 1, 2, 4, 5, 7, 9, 10], [9, 10, 0, 1, 2, 4, 5, 7]), ([0, 4, 8], [0, 4, 8]), ([0, 3, 6, 9], [0, 3, 6, 9]), ([0, 6], [0, 6])], [([0, 1, 5, 6, 8], [0, 1, 5, 6, 8]), ([0, 2, 3, 6, 7, 9], [0, 2, 3, 6, 7, 9]), ([0, 1, 2, 5, 6, 7, 9], [0, 1, 2, 5, 6, 7, 9]), ([0, 4, 8], [0, 4, 8]), ([0, 3, 6, 9], [0, 3, 6, 9]), ([0, 6], [0, 6]), ([9, 0, 4, 4, 16], [9, 0, 4]), ([2, 5, 9], [2, 5, 9])], [([0, 1, 3, 5, 8, 9], [8, 9, 0, 1, 3, 5]), ([0, 1, 2, 5, 6, 7, 9], [0, 1, 2, 5, 6, 7, 9]), ([0, 1, 2, 4, 5, 7, 9, 10], [9, 10, 0, 1, 2, 4, 5, 7]), ([0, 3, 6, 9], [0, 3, 6, 9]), ([9, 0, 4, 4, 16], [9, 0, 4]), ([2, 5, 9], [2, 5, 9]), ([10, 2, 5], [10, 2, 5]), ([1, 5, 8], [1, 5, 8])]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check(\"oracle %d\" % i, 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":"48691764dcef6357784f06bcf831bb092f13b8c12d43aa52a3d6c9ed5c71039c","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    if not isinstance(x, list) or not all(isinstance(v, int) for v in x):\n        return None\n    pcs = sorted(set(v % 12 for v in x))\n    if not pcs:\n        return []\n    n = len(pcs)\n    best = None\n    for r in range(n):\n        rot = pcs[r:] + pcs[:r]\n        key = [rot[-1] - rot[0]] + [rot[j] - rot[0] for j in range(n - 2, 0, -1)]\n        cand = (key, rot[0])\n        if best is None or cand < best[0]:\n            best = (cand, [p % 12 for p in rot])\n    return best[1]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([0, 4, 7], [0, 4, 7]), ([7, 4, 0], [0, 4, 7]), ([11, 0, 4], [11, 0, 4]), ([0, 1, 5, 6, 8], [0, 1, 5, 6, 8]), ([0, 1, 3, 5, 8, 9], [8, 9, 0, 1, 3, 5]), ([0, 2, 3, 6, 7, 9], [0, 2, 3, 6, 7, 9]), ([0, 1, 2, 5, 6, 7, 9], [0, 1, 2, 5, 6, 7, 9]), ([], [])], [([7, 4, 0], [0, 4, 7]), ([11, 0, 4], [11, 0, 4]), ([0, 1, 5, 6, 8], [0, 1, 5, 6, 8]), ([0, 1, 3, 5, 8, 9], [8, 9, 0, 1, 3, 5]), ([0, 2, 3, 6, 7, 9], [0, 2, 3, 6, 7, 9]), ([0, 1, 2, 5, 6, 7, 9], [0, 1, 2, 5, 6, 7, 9]), ([0, 1, 2, 4, 5, 7, 9, 10], [9, 10, 0, 1, 2, 4, 5, 7]), ([0, 4, 8], [0, 4, 8])], [([11, 0, 4], [11, 0, 4]), ([0, 1, 5, 6, 8], [0, 1, 5, 6, 8]), ([0, 2, 3, 6, 7, 9], [0, 2, 3, 6, 7, 9]), ([0, 1, 2, 5, 6, 7, 9], [0, 1, 2, 5, 6, 7, 9]), ([0, 1, 2, 4, 5, 7, 9, 10], [9, 10, 0, 1, 2, 4, 5, 7]), ([0, 4, 8], [0, 4, 8]), ([0, 3, 6, 9], [0, 3, 6, 9]), ([0, 6], [0, 6])], [([0, 1, 5, 6, 8], [0, 1, 5, 6, 8]), ([0, 2, 3, 6, 7, 9], [0, 2, 3, 6, 7, 9]), ([0, 1, 2, 5, 6, 7, 9], [0, 1, 2, 5, 6, 7, 9]), ([0, 4, 8], [0, 4, 8]), ([0, 3, 6, 9], [0, 3, 6, 9]), ([0, 6], [0, 6]), ([9, 0, 4, 4, 16], [9, 0, 4]), ([2, 5, 9], [2, 5, 9])], [([0, 1, 3, 5, 8, 9], [8, 9, 0, 1, 3, 5]), ([0, 1, 2, 5, 6, 7, 9], [0, 1, 2, 5, 6, 7, 9]), ([0, 1, 2, 4, 5, 7, 9, 10], [9, 10, 0, 1, 2, 4, 5, 7]), ([0, 3, 6, 9], [0, 3, 6, 9]), ([9, 0, 4, 4, 16], [9, 0, 4]), ([2, 5, 9], [2, 5, 9]), ([10, 2, 5], [10, 2, 5]), ([1, 5, 8], [1, 5, 8])]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check(\"oracle %d\" % i, 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":"30e577db9966a94df4611aaf999ebb18819c8803fccd1b0f9163e5113d54814f","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    if not isinstance(x, list) or not all(isinstance(v, int) for v in x):\n        return None\n    pcs = sorted(set(v % 12 for v in x))\n    if not pcs:\n        return []\n    n = len(pcs)\n    best = None\n    for r in range(n):\n        rot = pcs[r:] + [p + 12 for p in pcs[:r]]\n        key = [rot[-1] - rot[0]] + [rot[j] - rot[0] for j in range(n - 2, 0, -1)]\n        cand = (key, rot[0])\n        if best is None or cand < best[0]:\n            best = (cand, [p % 12 for p in rot])\n    return best[1]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([0, 4, 7], [0, 4, 7]), ([7, 4, 0], [0, 4, 7]), ([11, 0, 4], [11, 0, 4]), ([0, 1, 5, 6, 8], [0, 1, 5, 6, 8]), ([0, 1, 3, 5, 8, 9], [8, 9, 0, 1, 3, 5]), ([0, 2, 3, 6, 7, 9], [0, 2, 3, 6, 7, 9]), ([0, 1, 2, 5, 6, 7, 9], [0, 1, 2, 5, 6, 7, 9]), ([], [])], [([7, 4, 0], [0, 4, 7]), ([11, 0, 4], [11, 0, 4]), ([0, 1, 5, 6, 8], [0, 1, 5, 6, 8]), ([0, 1, 3, 5, 8, 9], [8, 9, 0, 1, 3, 5]), ([0, 2, 3, 6, 7, 9], [0, 2, 3, 6, 7, 9]), ([0, 1, 2, 5, 6, 7, 9], [0, 1, 2, 5, 6, 7, 9]), ([0, 1, 2, 4, 5, 7, 9, 10], [9, 10, 0, 1, 2, 4, 5, 7]), ([0, 4, 8], [0, 4, 8])], [([11, 0, 4], [11, 0, 4]), ([0, 1, 5, 6, 8], [0, 1, 5, 6, 8]), ([0, 2, 3, 6, 7, 9], [0, 2, 3, 6, 7, 9]), ([0, 1, 2, 5, 6, 7, 9], [0, 1, 2, 5, 6, 7, 9]), ([0, 1, 2, 4, 5, 7, 9, 10], [9, 10, 0, 1, 2, 4, 5, 7]), ([0, 4, 8], [0, 4, 8]), ([0, 3, 6, 9], [0, 3, 6, 9]), ([0, 6], [0, 6])], [([0, 1, 5, 6, 8], [0, 1, 5, 6, 8]), ([0, 2, 3, 6, 7, 9], [0, 2, 3, 6, 7, 9]), ([0, 1, 2, 5, 6, 7, 9], [0, 1, 2, 5, 6, 7, 9]), ([0, 4, 8], [0, 4, 8]), ([0, 3, 6, 9], [0, 3, 6, 9]), ([0, 6], [0, 6]), ([9, 0, 4, 4, 16], [9, 0, 4]), ([2, 5, 9], [2, 5, 9])], [([0, 1, 3, 5, 8, 9], [8, 9, 0, 1, 3, 5]), ([0, 1, 2, 5, 6, 7, 9], [0, 1, 2, 5, 6, 7, 9]), ([0, 1, 2, 4, 5, 7, 9, 10], [9, 10, 0, 1, 2, 4, 5, 7]), ([0, 3, 6, 9], [0, 3, 6, 9]), ([9, 0, 4, 4, 16], [9, 0, 4]), ([2, 5, 9], [2, 5, 9]), ([10, 2, 5], [10, 2, 5]), ([1, 5, 8], [1, 5, 8])]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check(\"oracle %d\" % i, 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 bounded teaching model with a stipulated toy contract; it is not a complete music notation or theory engine. 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-music-interval-normal-form-rotation-wrap","generated_at":"2026-09-29T14:49:59.253845+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Post-tonal analysis tools use normal form to compare and catalogue pitch-class sets.","repair":"Restore the rotation wrap step so that it reads `[p + 12 for p in pcs[:r]]`.","root_cause":"Members moved to the end of a rotation are not raised by twelve, so the span arithmetic sees them below the first member.","sha256":"c74f8df5af5fac1b493bbfa2963edac8bb5d4d0de320232cfce5cd7bba24e13c","title":"Pitch-class set normal form (right-packed): wrapped members not lifted an octave · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":40.036,"exit_code":1,"observations":[{"actual":[4,7,0,4],"check":"oracle 0","expected":[0,4,7],"passed":false},{"actual":[4,7,0,4],"check":"oracle 1","expected":[0,4,7],"passed":false},{"actual":[11,0,4,11],"check":"oracle 2","expected":[11,0,4],"passed":false},{"actual":[0,1,5,6,8,0],"check":"oracle 3","expected":[0,1,5,6,8],"passed":false},{"actual":[8,9,0,1,3,5,8],"check":"oracle 4","expected":[8,9,0,1,3,5],"passed":false},{"actual":[2,3,6,7,9,0,2],"check":"oracle 5","expected":[0,2,3,6,7,9],"passed":false},{"actual":[0,1,2,5,6,7,9,0],"check":"oracle 6","expected":[0,1,2,5,6,7,9],"passed":false},{"actual":[],"check":"oracle 7","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"oracle 0\", \"actual\": [4, 7, 0, 4], \"expected\": [0, 4, 7], \"passed\": false}, {\"check\": \"oracle 1\", \"actual\": [4, 7, 0, 4], \"expected\": [0, 4, 7], \"passed\": false}, {\"check\": \"oracle 2\", \"actual\": [11, 0, 4, 11], \"expected\": [11, 0, 4], \"passed\": false}, {\"check\": \"oracle 3\", \"actual\": [0, 1, 5, 6, 8, 0], \"expected\": [0, 1, 5, 6, 8], \"passed\": false}, {\"check\": \"oracle 4\", \"actual\": [8, 9, 0, 1, 3, 5, 8], \"expected\": [8, 9, 0, 1, 3, 5], \"passed\": false}, {\"check\": \"oracle 5\", \"actual\": [2, 3, 6, 7, 9, 0, 2], \"expected\": [0, 2, 3, 6, 7, 9], \"passed\": false}, {\"check\": \"oracle 6\", \"actual\": [0, 1, 2, 5, 6, 7, 9, 0], \"expected\": [0, 1, 2, 5, 6, 7, 9], \"passed\": false}, {\"check\": \"oracle 7\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.171,"exit_code":1,"observations":[{"actual":[4,7,0],"check":"oracle 0","expected":[0,4,7],"passed":false},{"actual":[4,7,0],"check":"oracle 1","expected":[0,4,7],"passed":false},{"actual":[11,0,4],"check":"oracle 2","expected":[11,0,4],"passed":true},{"actual":[5,6,8,0,1],"check":"oracle 3","expected":[0,1,5,6,8],"passed":false},{"actual":[8,9,0,1,3,5],"check":"oracle 4","expected":[8,9,0,1,3,5],"passed":true},{"actual":[6,7,9,0,2,3],"check":"oracle 5","expected":[0,2,3,6,7,9],"passed":false},{"actual":[5,6,7,9,0,1,2],"check":"oracle 6","expected":[0,1,2,5,6,7,9],"passed":false},{"actual":[],"check":"oracle 7","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"oracle 0\", \"actual\": [4, 7, 0], \"expected\": [0, 4, 7], \"passed\": false}, {\"check\": \"oracle 1\", \"actual\": [4, 7, 0], \"expected\": [0, 4, 7], \"passed\": false}, {\"check\": \"oracle 2\", \"actual\": [11, 0, 4], \"expected\": [11, 0, 4], \"passed\": true}, {\"check\": \"oracle 3\", \"actual\": [5, 6, 8, 0, 1], \"expected\": [0, 1, 5, 6, 8], \"passed\": false}, {\"check\": \"oracle 4\", \"actual\": [8, 9, 0, 1, 3, 5], \"expected\": [8, 9, 0, 1, 3, 5], \"passed\": true}, {\"check\": \"oracle 5\", \"actual\": [6, 7, 9, 0, 2, 3], \"expected\": [0, 2, 3, 6, 7, 9], \"passed\": false}, {\"check\": \"oracle 6\", \"actual\": [5, 6, 7, 9, 0, 1, 2], \"expected\": [0, 1, 2, 5, 6, 7, 9], \"passed\": false}, {\"check\": \"oracle 7\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":43.352,"exit_code":0,"observations":[{"actual":[0,4,7],"check":"oracle 0","expected":[0,4,7],"passed":true},{"actual":[0,4,7],"check":"oracle 1","expected":[0,4,7],"passed":true},{"actual":[11,0,4],"check":"oracle 2","expected":[11,0,4],"passed":true},{"actual":[0,1,5,6,8],"check":"oracle 3","expected":[0,1,5,6,8],"passed":true},{"actual":[8,9,0,1,3,5],"check":"oracle 4","expected":[8,9,0,1,3,5],"passed":true},{"actual":[0,2,3,6,7,9],"check":"oracle 5","expected":[0,2,3,6,7,9],"passed":true},{"actual":[0,1,2,5,6,7,9],"check":"oracle 6","expected":[0,1,2,5,6,7,9],"passed":true},{"actual":[],"check":"oracle 7","expected":[],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"oracle 0\", \"actual\": [0, 4, 7], \"expected\": [0, 4, 7], \"passed\": true}, {\"check\": \"oracle 1\", \"actual\": [0, 4, 7], \"expected\": [0, 4, 7], \"passed\": true}, {\"check\": \"oracle 2\", \"actual\": [11, 0, 4], \"expected\": [11, 0, 4], \"passed\": true}, {\"check\": \"oracle 3\", \"actual\": [0, 1, 5, 6, 8], \"expected\": [0, 1, 5, 6, 8], \"passed\": true}, {\"check\": \"oracle 4\", \"actual\": [8, 9, 0, 1, 3, 5], \"expected\": [8, 9, 0, 1, 3, 5], \"passed\": true}, {\"check\": \"oracle 5\", \"actual\": [0, 2, 3, 6, 7, 9], \"expected\": [0, 2, 3, 6, 7, 9], \"passed\": true}, {\"check\": \"oracle 6\", \"actual\": [0, 1, 2, 5, 6, 7, 9], \"expected\": [0, 1, 2, 5, 6, 7, 9], \"passed\": true}, {\"check\": \"oracle 7\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}