{"abstract":"A Bb clarinet part (written a whole step up) for C major is given two flats instead of two sharps.","category":"Music interval and transposition theory","checks":8,"contract":"Input [concert_fifths, written_semitones_above_concert] with concert_fifths -7..7 and an integer semitone shift. The key moves by (7 * shift) mod 12 fifths; the written signature is concert_fifths plus that move, then normalised into -5..6 by adding or subtracting 12 (so six flats is written as six sharps). Invalid input returns None.","evaluation_group":"w2-music-interval-part-key-signature","failed_approach":"Subtracting the concert signature from the movement also flips the sign of the concert key itself.","family":"w2-music-interval-part-key-signature-shift-direction","id":"FA-81151","implementations":{"attempt":{"sha256":"dc257703c73467975728fb631c55fc47cd804f8c88c4917d39403c2429ac395d","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 len(x) != 2:\n        return None\n    concert, shift = x\n    if not isinstance(concert, int) or not isinstance(shift, int) or concert < -7 or concert > 7:\n        return None\n    move = (7 * shift) % 12\n    r = move - concert\n    while r > 6:\n        r -= 12\n    while r < -5:\n        r += 12\n    return r\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([0, 2], 2), ([-3, 2], -1), ([4, 2], 6), ([-6, 0], 6), ([6, 0], 6), ([0, 0], 0), ([0, 12], 0), ([8, 0], None)], [([0, -2], -2), ([0, 9], 3), ([1, 2], 3), ([5, 2], -5), ([0, 12], 0), ([8, 0], None), ([0, '2'], None), ([-8, 0], None)], [([0, 2], 2), ([0, -2], -2), ([-3, 2], -1), ([0, 3], -3), ([-1, 2], 1), ([7, 0], -5), ([-8, 0], None), ([-9, 2], None)], [([0, -2], -2), ([-3, 2], -1), ([0, 9], 3), ([0, 3], -3), ([0, 7], 1), ([0, 14], 2), ([4, 2], 6), ([-7, 0], 5)], [([0, 3], -3), ([0, 7], 1), ([0, 14], 2), ([1, 2], 3), ([-1, 2], 1), ([4, 2], 6), ([5, 2], -5), ([2, -2], 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":"bf43a66756e902abf6838d2d4566b6cef2f670d874679b9847f534eafcd06348","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 len(x) != 2:\n        return None\n    concert, shift = x\n    if not isinstance(concert, int) or not isinstance(shift, int) or concert < -7 or concert > 7:\n        return None\n    move = (7 * shift) % 12\n    r = concert - move\n    while r > 6:\n        r -= 12\n    while r < -5:\n        r += 12\n    return r\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([0, 2], 2), ([-3, 2], -1), ([4, 2], 6), ([-6, 0], 6), ([6, 0], 6), ([0, 0], 0), ([0, 12], 0), ([8, 0], None)], [([0, -2], -2), ([0, 9], 3), ([1, 2], 3), ([5, 2], -5), ([0, 12], 0), ([8, 0], None), ([0, '2'], None), ([-8, 0], None)], [([0, 2], 2), ([0, -2], -2), ([-3, 2], -1), ([0, 3], -3), ([-1, 2], 1), ([7, 0], -5), ([-8, 0], None), ([-9, 2], None)], [([0, -2], -2), ([-3, 2], -1), ([0, 9], 3), ([0, 3], -3), ([0, 7], 1), ([0, 14], 2), ([4, 2], 6), ([-7, 0], 5)], [([0, 3], -3), ([0, 7], 1), ([0, 14], 2), ([1, 2], 3), ([-1, 2], 1), ([4, 2], 6), ([5, 2], -5), ([2, -2], 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":"d9b9585fdb3ec88f72bb0ed57d7c25c8f8b68e697c962a63f5a594c69970bdde","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 len(x) != 2:\n        return None\n    concert, shift = x\n    if not isinstance(concert, int) or not isinstance(shift, int) or concert < -7 or concert > 7:\n        return None\n    move = (7 * shift) % 12\n    r = concert + move\n    while r > 6:\n        r -= 12\n    while r < -5:\n        r += 12\n    return r\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([0, 2], 2), ([-3, 2], -1), ([4, 2], 6), ([-6, 0], 6), ([6, 0], 6), ([0, 0], 0), ([0, 12], 0), ([8, 0], None)], [([0, -2], -2), ([0, 9], 3), ([1, 2], 3), ([5, 2], -5), ([0, 12], 0), ([8, 0], None), ([0, '2'], None), ([-8, 0], None)], [([0, 2], 2), ([0, -2], -2), ([-3, 2], -1), ([0, 3], -3), ([-1, 2], 1), ([7, 0], -5), ([-8, 0], None), ([-9, 2], None)], [([0, -2], -2), ([-3, 2], -1), ([0, 9], 3), ([0, 3], -3), ([0, 7], 1), ([0, 14], 2), ([4, 2], 6), ([-7, 0], 5)], [([0, 3], -3), ([0, 7], 1), ([0, 14], 2), ([1, 2], 3), ([-1, 2], 1), ([4, 2], 6), ([5, 2], -5), ([2, -2], 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-part-key-signature-shift-direction","generated_at":"2026-09-29T14:50:00.508491+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Part extraction must print a transposed key signature consistent with the transposed notes.","repair":"Restore the shift direction step so that it reads `r = concert + move`.","root_cause":"The fifths movement is subtracted from the concert signature, transposing the key the way the instrument sounds rather than the way it is written.","sha256":"7c09a4a74a10a723cd8608026300757d40ff6d6600533834a63165afe1673978","title":"Written key signature for a transposing part: written key moved toward concert pitch · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":42.0,"exit_code":1,"observations":[{"actual":2,"check":"oracle 0","expected":2,"passed":true},{"actual":5,"check":"oracle 1","expected":-1,"passed":false},{"actual":-2,"check":"oracle 2","expected":6,"passed":false},{"actual":6,"check":"oracle 3","expected":6,"passed":true},{"actual":6,"check":"oracle 4","expected":6,"passed":true},{"actual":0,"check":"oracle 5","expected":0,"passed":true},{"actual":0,"check":"oracle 6","expected":0,"passed":true},{"actual":null,"check":"oracle 7","expected":null,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"oracle 0\", \"actual\": 2, \"expected\": 2, \"passed\": true}, {\"check\": \"oracle 1\", \"actual\": 5, \"expected\": -1, \"passed\": false}, {\"check\": \"oracle 2\", \"actual\": -2, \"expected\": 6, \"passed\": false}, {\"check\": \"oracle 3\", \"actual\": 6, \"expected\": 6, \"passed\": true}, {\"check\": \"oracle 4\", \"actual\": 6, \"expected\": 6, \"passed\": true}, {\"check\": \"oracle 5\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"oracle 6\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"oracle 7\", \"actual\": null, \"expected\": null, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.013,"exit_code":1,"observations":[{"actual":-2,"check":"oracle 0","expected":2,"passed":false},{"actual":-5,"check":"oracle 1","expected":-1,"passed":false},{"actual":2,"check":"oracle 2","expected":6,"passed":false},{"actual":6,"check":"oracle 3","expected":6,"passed":true},{"actual":6,"check":"oracle 4","expected":6,"passed":true},{"actual":0,"check":"oracle 5","expected":0,"passed":true},{"actual":0,"check":"oracle 6","expected":0,"passed":true},{"actual":null,"check":"oracle 7","expected":null,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"oracle 0\", \"actual\": -2, \"expected\": 2, \"passed\": false}, {\"check\": \"oracle 1\", \"actual\": -5, \"expected\": -1, \"passed\": false}, {\"check\": \"oracle 2\", \"actual\": 2, \"expected\": 6, \"passed\": false}, {\"check\": \"oracle 3\", \"actual\": 6, \"expected\": 6, \"passed\": true}, {\"check\": \"oracle 4\", \"actual\": 6, \"expected\": 6, \"passed\": true}, {\"check\": \"oracle 5\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"oracle 6\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"oracle 7\", \"actual\": null, \"expected\": null, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":41.637,"exit_code":0,"observations":[{"actual":2,"check":"oracle 0","expected":2,"passed":true},{"actual":-1,"check":"oracle 1","expected":-1,"passed":true},{"actual":6,"check":"oracle 2","expected":6,"passed":true},{"actual":6,"check":"oracle 3","expected":6,"passed":true},{"actual":6,"check":"oracle 4","expected":6,"passed":true},{"actual":0,"check":"oracle 5","expected":0,"passed":true},{"actual":0,"check":"oracle 6","expected":0,"passed":true},{"actual":null,"check":"oracle 7","expected":null,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"oracle 0\", \"actual\": 2, \"expected\": 2, \"passed\": true}, {\"check\": \"oracle 1\", \"actual\": -1, \"expected\": -1, \"passed\": true}, {\"check\": \"oracle 2\", \"actual\": 6, \"expected\": 6, \"passed\": true}, {\"check\": \"oracle 3\", \"actual\": 6, \"expected\": 6, \"passed\": true}, {\"check\": \"oracle 4\", \"actual\": 6, \"expected\": 6, \"passed\": true}, {\"check\": \"oracle 5\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"oracle 6\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"oracle 7\", \"actual\": null, \"expected\": null, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}