{"abstract":"Sets such as [0,1,5,6,8] and [0,1,3,5,8,9] get the left-packed normal form instead of the stipulated right-packed one.","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":"Comparing only the outer span leaves all remaining ties to the starting pitch class.","family":"w2-music-interval-normal-form-packing-priority","id":"FA-81031","implementations":{"attempt":{"sha256":"145d8c2005b7423ea0353654d038b831f215367748dfef19c47271729a1a07ec","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]]\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, 4, 5, 7, 9, 10], [9, 10, 0, 1, 2, 4, 5, 7]), ([0, 4, 8], [0, 4, 8])], [([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, 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, 2, 3, 6, 7, 9], [0, 2, 3, 6, 7, 9]), ([0, 1, 2, 4, 5, 7, 9, 10], [9, 10, 0, 1, 2, 4, 5, 7]), ([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]), ([11, 2, 6], [11, 2, 6])], [([0, 1, 5, 6, 8], [0, 1, 5, 6, 8]), ([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]), ([1, 5, 8], [1, 5, 8]), ([11, 2, 6], [11, 2, 6]), ([0, 1, 4, 6], [0, 1, 4, 6]), ([0, 1, 3, 7], [0, 1, 3, 7])], [([0, 1, 3, 5, 8, 9], [8, 9, 0, 1, 3, 5]), ([0, 1, 2, 4, 5, 7, 9, 10], [9, 10, 0, 1, 2, 4, 5, 7]), ([0, 1, 3, 7], [0, 1, 3, 7]), ([5], [5]), ([], []), ([3, 15, 27], [3]), ([-1, 0, 1], [11, 0, 1]), ([0, 2, 4, 6, 8, 10], [0, 2, 4, 6, 8, 10])]]\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":"1f46e05ed30c6381cb33ac063a600a4f7f0a312ac879ee67d27611b36c0fbeb8","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(1, n - 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, 4, 5, 7, 9, 10], [9, 10, 0, 1, 2, 4, 5, 7]), ([0, 4, 8], [0, 4, 8])], [([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, 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, 2, 3, 6, 7, 9], [0, 2, 3, 6, 7, 9]), ([0, 1, 2, 4, 5, 7, 9, 10], [9, 10, 0, 1, 2, 4, 5, 7]), ([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]), ([11, 2, 6], [11, 2, 6])], [([0, 1, 5, 6, 8], [0, 1, 5, 6, 8]), ([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]), ([1, 5, 8], [1, 5, 8]), ([11, 2, 6], [11, 2, 6]), ([0, 1, 4, 6], [0, 1, 4, 6]), ([0, 1, 3, 7], [0, 1, 3, 7])], [([0, 1, 3, 5, 8, 9], [8, 9, 0, 1, 3, 5]), ([0, 1, 2, 4, 5, 7, 9, 10], [9, 10, 0, 1, 2, 4, 5, 7]), ([0, 1, 3, 7], [0, 1, 3, 7]), ([5], [5]), ([], []), ([3, 15, 27], [3]), ([-1, 0, 1], [11, 0, 1]), ([0, 2, 4, 6, 8, 10], [0, 2, 4, 6, 8, 10])]]\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":"a4f50ffe1fd8ef62b694e7b5a02ab06cf36ce97a8e0a323b32ce28b1146e7cc5","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, 4, 5, 7, 9, 10], [9, 10, 0, 1, 2, 4, 5, 7]), ([0, 4, 8], [0, 4, 8])], [([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, 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, 2, 3, 6, 7, 9], [0, 2, 3, 6, 7, 9]), ([0, 1, 2, 4, 5, 7, 9, 10], [9, 10, 0, 1, 2, 4, 5, 7]), ([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]), ([11, 2, 6], [11, 2, 6])], [([0, 1, 5, 6, 8], [0, 1, 5, 6, 8]), ([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]), ([1, 5, 8], [1, 5, 8]), ([11, 2, 6], [11, 2, 6]), ([0, 1, 4, 6], [0, 1, 4, 6]), ([0, 1, 3, 7], [0, 1, 3, 7])], [([0, 1, 3, 5, 8, 9], [8, 9, 0, 1, 3, 5]), ([0, 1, 2, 4, 5, 7, 9, 10], [9, 10, 0, 1, 2, 4, 5, 7]), ([0, 1, 3, 7], [0, 1, 3, 7]), ([5], [5]), ([], []), ([3, 15, 27], [3]), ([-1, 0, 1], [11, 0, 1]), ([0, 2, 4, 6, 8, 10], [0, 2, 4, 6, 8, 10])]]\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-packing-priority","generated_at":"2026-09-29T14:49:59.253042+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 packing priority step so that it reads `[rot[-1] - rot[0]] + [rot[j] - rot[0] for j in range(n - 2, 0, -1)]`.","root_cause":"After the outer span, ties are compared first-to-second, first-to-third instead of first-to-penultimate inward.","sha256":"18cf1368ad0f6ac31f086c60618962d81f9d9b294ceb6097b637a483a8254b28","title":"Pitch-class set normal form (right-packed): span ties broken from the left · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":41.205,"exit_code":1,"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":[0,1,3,5,8,9],"check":"oracle 4","expected":[8,9,0,1,3,5],"passed":false},{"actual":[0,2,3,6,7,9],"check":"oracle 5","expected":[0,2,3,6,7,9],"passed":true},{"actual":[0,1,2,4,5,7,9,10],"check":"oracle 6","expected":[9,10,0,1,2,4,5,7],"passed":false},{"actual":[0,4,8],"check":"oracle 7","expected":[0,4,8],"passed":true}],"passed":false,"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\": [0, 1, 3, 5, 8, 9], \"expected\": [8, 9, 0, 1, 3, 5], \"passed\": false}, {\"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, 4, 5, 7, 9, 10], \"expected\": [9, 10, 0, 1, 2, 4, 5, 7], \"passed\": false}, {\"check\": \"oracle 7\", \"actual\": [0, 4, 8], \"expected\": [0, 4, 8], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.963,"exit_code":1,"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":[5,6,8,0,1],"check":"oracle 3","expected":[0,1,5,6,8],"passed":false},{"actual":[0,1,3,5,8,9],"check":"oracle 4","expected":[8,9,0,1,3,5],"passed":false},{"actual":[6,7,9,0,2,3],"check":"oracle 5","expected":[0,2,3,6,7,9],"passed":false},{"actual":[0,1,2,4,5,7,9,10],"check":"oracle 6","expected":[9,10,0,1,2,4,5,7],"passed":false},{"actual":[0,4,8],"check":"oracle 7","expected":[0,4,8],"passed":true}],"passed":false,"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\": [5, 6, 8, 0, 1], \"expected\": [0, 1, 5, 6, 8], \"passed\": false}, {\"check\": \"oracle 4\", \"actual\": [0, 1, 3, 5, 8, 9], \"expected\": [8, 9, 0, 1, 3, 5], \"passed\": false}, {\"check\": \"oracle 5\", \"actual\": [6, 7, 9, 0, 2, 3], \"expected\": [0, 2, 3, 6, 7, 9], \"passed\": false}, {\"check\": \"oracle 6\", \"actual\": [0, 1, 2, 4, 5, 7, 9, 10], \"expected\": [9, 10, 0, 1, 2, 4, 5, 7], \"passed\": false}, {\"check\": \"oracle 7\", \"actual\": [0, 4, 8], \"expected\": [0, 4, 8], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":41.728,"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":[9,10,0,1,2,4,5,7],"check":"oracle 6","expected":[9,10,0,1,2,4,5,7],"passed":true},{"actual":[0,4,8],"check":"oracle 7","expected":[0,4,8],"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\": [9, 10, 0, 1, 2, 4, 5, 7], \"expected\": [9, 10, 0, 1, 2, 4, 5, 7], \"passed\": true}, {\"check\": \"oracle 7\", \"actual\": [0, 4, 8], \"expected\": [0, 4, 8], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}