{"abstract":"The empty set returns None instead of the empty prime form [].","category":"Music interval and transposition theory","checks":8,"contract":"Input a list of integers. Compute the right-packed normal form of the set and of its inversion (p -> -p mod 12), transpose each to start on 0, and return whichever is more packed: compare the last value, then the penultimate, and so on toward the second (the original wins ties). Empty input returns []; non-integers return None.","evaluation_group":"w2-music-interval-prime-form","failed_approach":"Returning [0] invents a pitch class that was never in the set.","family":"w2-music-interval-prime-form-empty-set","id":"FA-81061","implementations":{"attempt":{"sha256":"e88e4a2d108fdd2d2f919a2265307c5170ff080743acd7d77feed8b3b9cbd79e","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    def normal(values):\n        pcs = sorted(set(p % 12 for p in values))\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            if best is None or (key, rot[0]) < best[0]:\n                best = ((key, rot[0]), rot)\n        return [p - best[1][0] for p in best[1]]\n    if not x:\n        return [0]\n    a = normal(x)\n    b = normal([(-p) % 12 for p in x])\n    ka = [a[-1]] + a[-2:0:-1]\n    kb = [b[-1]] + b[-2:0:-1]\n    return a if ka <= kb else b\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([0, 4, 7], [0, 3, 7]), ([0, 3, 7], [0, 3, 7]), ([2, 6, 9], [0, 3, 7]), ([0, 1, 5, 6, 8], [0, 1, 5, 6, 8]), ([0, 1, 3, 5, 8, 9], [0, 1, 4, 5, 7, 9]), ([0, 2, 3, 6, 7, 9], [0, 2, 3, 6, 7, 9]), ([0, 4, 8], [0, 4, 8]), ([], [])], [([0, 1, 5, 6, 8], [0, 1, 5, 6, 8]), ([0, 1, 3, 5, 8, 9], [0, 1, 4, 5, 7, 9]), ([0, 2, 3, 6, 7, 9], [0, 2, 3, 6, 7, 9]), ([0, 4, 8], [0, 4, 8]), ([0, 3, 6, 9], [0, 3, 6, 9]), ([0, 1, 4], [0, 1, 4]), ([0, 3, 4], [0, 1, 4]), ([], [])], [([0, 4, 8], [0, 4, 8]), ([0, 3, 6, 9], [0, 3, 6, 9]), ([0, 1, 4], [0, 1, 4]), ([0, 3, 4], [0, 1, 4]), ([4, 5, 8], [0, 1, 4]), ([0, 2, 7], [0, 2, 7]), ([0, 5, 7], [0, 2, 7]), ([], [])], [([0, 3, 4], [0, 1, 4]), ([4, 5, 8], [0, 1, 4]), ([0, 2, 7], [0, 2, 7]), ([0, 5, 7], [0, 2, 7]), ([1, 2, 4, 8], [0, 1, 3, 7]), ([0, 1, 5], [0, 1, 5]), ([7, 11, 2, 5], [0, 2, 5, 8]), ([], [])], [([0, 5, 7], [0, 2, 7]), ([1, 2, 4, 8], [0, 1, 3, 7]), ([0, 1, 5], [0, 1, 5]), ([7, 11, 2, 5], [0, 2, 5, 8]), ([10, 1, 5], [0, 3, 7]), ([0, 1, 2, 3], [0, 1, 2, 3]), ([], []), ([6], [0])]]\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":"085341ec36370e88d7bcae332b7ce7f2af780229cbbfd848bbe179c32de6ddc7","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    def normal(values):\n        pcs = sorted(set(p % 12 for p in values))\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            if best is None or (key, rot[0]) < best[0]:\n                best = ((key, rot[0]), rot)\n        return [p - best[1][0] for p in best[1]]\n    if not x:\n        return None\n    a = normal(x)\n    b = normal([(-p) % 12 for p in x])\n    ka = [a[-1]] + a[-2:0:-1]\n    kb = [b[-1]] + b[-2:0:-1]\n    return a if ka <= kb else b\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([0, 4, 7], [0, 3, 7]), ([0, 3, 7], [0, 3, 7]), ([2, 6, 9], [0, 3, 7]), ([0, 1, 5, 6, 8], [0, 1, 5, 6, 8]), ([0, 1, 3, 5, 8, 9], [0, 1, 4, 5, 7, 9]), ([0, 2, 3, 6, 7, 9], [0, 2, 3, 6, 7, 9]), ([0, 4, 8], [0, 4, 8]), ([], [])], [([0, 1, 5, 6, 8], [0, 1, 5, 6, 8]), ([0, 1, 3, 5, 8, 9], [0, 1, 4, 5, 7, 9]), ([0, 2, 3, 6, 7, 9], [0, 2, 3, 6, 7, 9]), ([0, 4, 8], [0, 4, 8]), ([0, 3, 6, 9], [0, 3, 6, 9]), ([0, 1, 4], [0, 1, 4]), ([0, 3, 4], [0, 1, 4]), ([], [])], [([0, 4, 8], [0, 4, 8]), ([0, 3, 6, 9], [0, 3, 6, 9]), ([0, 1, 4], [0, 1, 4]), ([0, 3, 4], [0, 1, 4]), ([4, 5, 8], [0, 1, 4]), ([0, 2, 7], [0, 2, 7]), ([0, 5, 7], [0, 2, 7]), ([], [])], [([0, 3, 4], [0, 1, 4]), ([4, 5, 8], [0, 1, 4]), ([0, 2, 7], [0, 2, 7]), ([0, 5, 7], [0, 2, 7]), ([1, 2, 4, 8], [0, 1, 3, 7]), ([0, 1, 5], [0, 1, 5]), ([7, 11, 2, 5], [0, 2, 5, 8]), ([], [])], [([0, 5, 7], [0, 2, 7]), ([1, 2, 4, 8], [0, 1, 3, 7]), ([0, 1, 5], [0, 1, 5]), ([7, 11, 2, 5], [0, 2, 5, 8]), ([10, 1, 5], [0, 3, 7]), ([0, 1, 2, 3], [0, 1, 2, 3]), ([], []), ([6], [0])]]\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":"846eccbb8431947ac1f08a5aad2370699d2357e42e7f22bd314044b24db6ae94","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    def normal(values):\n        pcs = sorted(set(p % 12 for p in values))\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            if best is None or (key, rot[0]) < best[0]:\n                best = ((key, rot[0]), rot)\n        return [p - best[1][0] for p in best[1]]\n    if not x:\n        return []\n    a = normal(x)\n    b = normal([(-p) % 12 for p in x])\n    ka = [a[-1]] + a[-2:0:-1]\n    kb = [b[-1]] + b[-2:0:-1]\n    return a if ka <= kb else b\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([0, 4, 7], [0, 3, 7]), ([0, 3, 7], [0, 3, 7]), ([2, 6, 9], [0, 3, 7]), ([0, 1, 5, 6, 8], [0, 1, 5, 6, 8]), ([0, 1, 3, 5, 8, 9], [0, 1, 4, 5, 7, 9]), ([0, 2, 3, 6, 7, 9], [0, 2, 3, 6, 7, 9]), ([0, 4, 8], [0, 4, 8]), ([], [])], [([0, 1, 5, 6, 8], [0, 1, 5, 6, 8]), ([0, 1, 3, 5, 8, 9], [0, 1, 4, 5, 7, 9]), ([0, 2, 3, 6, 7, 9], [0, 2, 3, 6, 7, 9]), ([0, 4, 8], [0, 4, 8]), ([0, 3, 6, 9], [0, 3, 6, 9]), ([0, 1, 4], [0, 1, 4]), ([0, 3, 4], [0, 1, 4]), ([], [])], [([0, 4, 8], [0, 4, 8]), ([0, 3, 6, 9], [0, 3, 6, 9]), ([0, 1, 4], [0, 1, 4]), ([0, 3, 4], [0, 1, 4]), ([4, 5, 8], [0, 1, 4]), ([0, 2, 7], [0, 2, 7]), ([0, 5, 7], [0, 2, 7]), ([], [])], [([0, 3, 4], [0, 1, 4]), ([4, 5, 8], [0, 1, 4]), ([0, 2, 7], [0, 2, 7]), ([0, 5, 7], [0, 2, 7]), ([1, 2, 4, 8], [0, 1, 3, 7]), ([0, 1, 5], [0, 1, 5]), ([7, 11, 2, 5], [0, 2, 5, 8]), ([], [])], [([0, 5, 7], [0, 2, 7]), ([1, 2, 4, 8], [0, 1, 3, 7]), ([0, 1, 5], [0, 1, 5]), ([7, 11, 2, 5], [0, 2, 5, 8]), ([10, 1, 5], [0, 3, 7]), ([0, 1, 2, 3], [0, 1, 2, 3]), ([], []), ([6], [0])]]\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-prime-form-empty-set","generated_at":"2026-09-29T14:49:59.503337+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Set-class labelling depends on prime forms being computed identically for every member of a class.","repair":"Restore the empty set step so that it reads `if not x:\n    return []`.","root_cause":"The empty-input guard returns the invalid-input sentinel.","sha256":"7203d254d39f3ffb51013f3dd3976a50175d95fa9c14cebaaff4065483aec88f","title":"Pitch-class set prime form (right-packed): empty set treated as invalid · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":38.905,"exit_code":1,"observations":[{"actual":[0,3,7],"check":"oracle 0","expected":[0,3,7],"passed":true},{"actual":[0,3,7],"check":"oracle 1","expected":[0,3,7],"passed":true},{"actual":[0,3,7],"check":"oracle 2","expected":[0,3,7],"passed":true},{"actual":[0,1,5,6,8],"check":"oracle 3","expected":[0,1,5,6,8],"passed":true},{"actual":[0,1,4,5,7,9],"check":"oracle 4","expected":[0,1,4,5,7,9],"passed":true},{"actual":[0,2,3,6,7,9],"check":"oracle 5","expected":[0,2,3,6,7,9],"passed":true},{"actual":[0,4,8],"check":"oracle 6","expected":[0,4,8],"passed":true},{"actual":[0],"check":"oracle 7","expected":[],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"oracle 0\", \"actual\": [0, 3, 7], \"expected\": [0, 3, 7], \"passed\": true}, {\"check\": \"oracle 1\", \"actual\": [0, 3, 7], \"expected\": [0, 3, 7], \"passed\": true}, {\"check\": \"oracle 2\", \"actual\": [0, 3, 7], \"expected\": [0, 3, 7], \"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, 4, 5, 7, 9], \"expected\": [0, 1, 4, 5, 7, 9], \"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, 4, 8], \"expected\": [0, 4, 8], \"passed\": true}, {\"check\": \"oracle 7\", \"actual\": [0], \"expected\": [], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.773,"exit_code":1,"observations":[{"actual":[0,3,7],"check":"oracle 0","expected":[0,3,7],"passed":true},{"actual":[0,3,7],"check":"oracle 1","expected":[0,3,7],"passed":true},{"actual":[0,3,7],"check":"oracle 2","expected":[0,3,7],"passed":true},{"actual":[0,1,5,6,8],"check":"oracle 3","expected":[0,1,5,6,8],"passed":true},{"actual":[0,1,4,5,7,9],"check":"oracle 4","expected":[0,1,4,5,7,9],"passed":true},{"actual":[0,2,3,6,7,9],"check":"oracle 5","expected":[0,2,3,6,7,9],"passed":true},{"actual":[0,4,8],"check":"oracle 6","expected":[0,4,8],"passed":true},{"actual":null,"check":"oracle 7","expected":[],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"oracle 0\", \"actual\": [0, 3, 7], \"expected\": [0, 3, 7], \"passed\": true}, {\"check\": \"oracle 1\", \"actual\": [0, 3, 7], \"expected\": [0, 3, 7], \"passed\": true}, {\"check\": \"oracle 2\", \"actual\": [0, 3, 7], \"expected\": [0, 3, 7], \"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, 4, 5, 7, 9], \"expected\": [0, 1, 4, 5, 7, 9], \"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, 4, 8], \"expected\": [0, 4, 8], \"passed\": true}, {\"check\": \"oracle 7\", \"actual\": null, \"expected\": [], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":38.479,"exit_code":0,"observations":[{"actual":[0,3,7],"check":"oracle 0","expected":[0,3,7],"passed":true},{"actual":[0,3,7],"check":"oracle 1","expected":[0,3,7],"passed":true},{"actual":[0,3,7],"check":"oracle 2","expected":[0,3,7],"passed":true},{"actual":[0,1,5,6,8],"check":"oracle 3","expected":[0,1,5,6,8],"passed":true},{"actual":[0,1,4,5,7,9],"check":"oracle 4","expected":[0,1,4,5,7,9],"passed":true},{"actual":[0,2,3,6,7,9],"check":"oracle 5","expected":[0,2,3,6,7,9],"passed":true},{"actual":[0,4,8],"check":"oracle 6","expected":[0,4,8],"passed":true},{"actual":[],"check":"oracle 7","expected":[],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"oracle 0\", \"actual\": [0, 3, 7], \"expected\": [0, 3, 7], \"passed\": true}, {\"check\": \"oracle 1\", \"actual\": [0, 3, 7], \"expected\": [0, 3, 7], \"passed\": true}, {\"check\": \"oracle 2\", \"actual\": [0, 3, 7], \"expected\": [0, 3, 7], \"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, 4, 5, 7, 9], \"expected\": [0, 1, 4, 5, 7, 9], \"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, 4, 8], \"expected\": [0, 4, 8], \"passed\": true}, {\"check\": \"oracle 7\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}