{"abstract":"An input pitch of 128 is converted (to 126 for Bb clarinet) instead of being rejected.","category":"Music interval and transposition theory","checks":8,"contract":"Input [instrument, pitch, direction]. Each instrument has a stipulated sounding offset in semitones (concert = written + offset): Bb clarinet -2, A clarinet -3, F horn -7, Eb alto sax -9, Bb tenor sax -14, Eb baritone sax -21, guitar -12, piccolo +12, D trumpet +2, flute 0. direction to_concert adds the offset, to_written subtracts it. pitch and result must be MIDI 0..127; otherwise, or for unknown instrument or direction, return None.","contract_signature":"x","evaluation_group":"w2-music-interval-transposing-instrument","failed_approach":"Checking only the upper bound lets negative written pitches through.","family":"w2-music-interval-transposing-instrument-input-range","id":"FA-81136","implementations":{"attempt":{"sha256":"d4362f2f96a2bd19d1c717be2f93dc4a07d839244051a1959a0501c804208e6d","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    table = {'Bb clarinet': -2, 'A clarinet': -3, 'F horn': -7, 'Eb alto sax': -9, 'Bb tenor sax': -14, 'Eb baritone sax': -21, 'guitar': -12, 'piccolo': 12, 'D trumpet': 2, 'flute': 0}\n    if not isinstance(x, list) or len(x) != 3:\n        return None\n    inst, pitch, direction = x\n    if inst not in table or not isinstance(pitch, int) or not pitch <= 127:\n        return None\n    if direction == 'to_concert':\n        out = pitch + table[inst]\n    elif direction == 'to_written':\n        out = pitch - table[inst]\n    else:\n        return None\n    if out < 0 or out > 127:\n        return None\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[(['Bb clarinet', 62, 'to_concert'], 60), (['Bb clarinet', 60, 'to_written'], 62), (['F horn', 67, 'to_concert'], 60), (['F horn', 60, 'to_written'], 67), (['Eb alto sax', 69, 'to_concert'], 60), (['Eb alto sax', 60, 'to_written'], 69), (['Bb clarinet', 128, 'to_concert'], None), (['Bb clarinet', -1, 'to_written'], None)], [(['F horn', 60, 'to_written'], 67), (['Eb alto sax', 69, 'to_concert'], 60), (['Eb alto sax', 60, 'to_written'], 69), (['Bb tenor sax', 74, 'to_concert'], 60), (['Bb tenor sax', 60, 'to_written'], 74), (['piccolo', 60, 'to_concert'], 72), (['Bb clarinet', 128, 'to_concert'], None), (['Bb clarinet', -1, 'to_written'], None)], [(['Bb tenor sax', 74, 'to_concert'], 60), (['Bb tenor sax', 60, 'to_written'], 74), (['piccolo', 60, 'to_concert'], 72), (['piccolo', 72, 'to_written'], 60), (['D trumpet', 60, 'to_concert'], 62), (['D trumpet', 62, 'to_written'], 60), (['Bb clarinet', 128, 'to_concert'], None), (['Bb clarinet', -1, 'to_written'], None)], [(['piccolo', 72, 'to_written'], 60), (['D trumpet', 60, 'to_concert'], 62), (['D trumpet', 62, 'to_written'], 60), (['guitar', 64, 'to_concert'], 52), (['flute', 60, 'to_concert'], 60), (['flute', 60, 'to_written'], 60), (['Bb clarinet', 128, 'to_concert'], None), (['Bb clarinet', -1, 'to_written'], None)], [(['guitar', 64, 'to_concert'], 52), (['flute', 60, 'to_concert'], 60), (['flute', 60, 'to_written'], 60), (['flute', 127, 'to_concert'], 127), (['piccolo', 115, 'to_concert'], 127), (['Eb baritone sax', 10, 'to_concert'], None), (['Bb clarinet', 128, 'to_concert'], None), (['Bb clarinet', -1, 'to_written'], None)]]\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":"6bf96c4f2a320db5f86c1753c53156c3a86646f290124a04c0c9772ec62d3833","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    table = {'Bb clarinet': -2, 'A clarinet': -3, 'F horn': -7, 'Eb alto sax': -9, 'Bb tenor sax': -14, 'Eb baritone sax': -21, 'guitar': -12, 'piccolo': 12, 'D trumpet': 2, 'flute': 0}\n    if not isinstance(x, list) or len(x) != 3:\n        return None\n    inst, pitch, direction = x\n    if inst not in table or not isinstance(pitch, int) or not 0 <= pitch:\n        return None\n    if direction == 'to_concert':\n        out = pitch + table[inst]\n    elif direction == 'to_written':\n        out = pitch - table[inst]\n    else:\n        return None\n    if out < 0 or out > 127:\n        return None\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[(['Bb clarinet', 62, 'to_concert'], 60), (['Bb clarinet', 60, 'to_written'], 62), (['F horn', 67, 'to_concert'], 60), (['F horn', 60, 'to_written'], 67), (['Eb alto sax', 69, 'to_concert'], 60), (['Eb alto sax', 60, 'to_written'], 69), (['Bb clarinet', 128, 'to_concert'], None), (['Bb clarinet', -1, 'to_written'], None)], [(['F horn', 60, 'to_written'], 67), (['Eb alto sax', 69, 'to_concert'], 60), (['Eb alto sax', 60, 'to_written'], 69), (['Bb tenor sax', 74, 'to_concert'], 60), (['Bb tenor sax', 60, 'to_written'], 74), (['piccolo', 60, 'to_concert'], 72), (['Bb clarinet', 128, 'to_concert'], None), (['Bb clarinet', -1, 'to_written'], None)], [(['Bb tenor sax', 74, 'to_concert'], 60), (['Bb tenor sax', 60, 'to_written'], 74), (['piccolo', 60, 'to_concert'], 72), (['piccolo', 72, 'to_written'], 60), (['D trumpet', 60, 'to_concert'], 62), (['D trumpet', 62, 'to_written'], 60), (['Bb clarinet', 128, 'to_concert'], None), (['Bb clarinet', -1, 'to_written'], None)], [(['piccolo', 72, 'to_written'], 60), (['D trumpet', 60, 'to_concert'], 62), (['D trumpet', 62, 'to_written'], 60), (['guitar', 64, 'to_concert'], 52), (['flute', 60, 'to_concert'], 60), (['flute', 60, 'to_written'], 60), (['Bb clarinet', 128, 'to_concert'], None), (['Bb clarinet', -1, 'to_written'], None)], [(['guitar', 64, 'to_concert'], 52), (['flute', 60, 'to_concert'], 60), (['flute', 60, 'to_written'], 60), (['flute', 127, 'to_concert'], 127), (['piccolo', 115, 'to_concert'], 127), (['Eb baritone sax', 10, 'to_concert'], None), (['Bb clarinet', 128, 'to_concert'], None), (['Bb clarinet', -1, 'to_written'], None)]]\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-transposing-instrument-input-range","generated_at":"2026-09-29T14:50:00.206791+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Score and part generators convert between written and sounding pitch for every transposing instrument.","root_cause":"The input guard enforces only the lower MIDI bound.","sha256":"16dd9956f55a4555387fb4cd94792076327294f8e2ab1a5d8b772292884bd1c0","title":"Transposing instrument written and concert pitch: input pitch above MIDI range accepted · 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":41.355,"exit_code":1,"observations":[{"actual":60,"check":"oracle 0","expected":60,"passed":true},{"actual":62,"check":"oracle 1","expected":62,"passed":true},{"actual":60,"check":"oracle 2","expected":60,"passed":true},{"actual":67,"check":"oracle 3","expected":67,"passed":true},{"actual":60,"check":"oracle 4","expected":60,"passed":true},{"actual":69,"check":"oracle 5","expected":69,"passed":true},{"actual":null,"check":"oracle 6","expected":null,"passed":true},{"actual":1,"check":"oracle 7","expected":null,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"oracle 0\", \"actual\": 60, \"expected\": 60, \"passed\": true}, {\"check\": \"oracle 1\", \"actual\": 62, \"expected\": 62, \"passed\": true}, {\"check\": \"oracle 2\", \"actual\": 60, \"expected\": 60, \"passed\": true}, {\"check\": \"oracle 3\", \"actual\": 67, \"expected\": 67, \"passed\": true}, {\"check\": \"oracle 4\", \"actual\": 60, \"expected\": 60, \"passed\": true}, {\"check\": \"oracle 5\", \"actual\": 69, \"expected\": 69, \"passed\": true}, {\"check\": \"oracle 6\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"oracle 7\", \"actual\": 1, \"expected\": null, \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":38.665,"exit_code":1,"observations":[{"actual":60,"check":"oracle 0","expected":60,"passed":true},{"actual":62,"check":"oracle 1","expected":62,"passed":true},{"actual":60,"check":"oracle 2","expected":60,"passed":true},{"actual":67,"check":"oracle 3","expected":67,"passed":true},{"actual":60,"check":"oracle 4","expected":60,"passed":true},{"actual":69,"check":"oracle 5","expected":69,"passed":true},{"actual":126,"check":"oracle 6","expected":null,"passed":false},{"actual":null,"check":"oracle 7","expected":null,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"oracle 0\", \"actual\": 60, \"expected\": 60, \"passed\": true}, {\"check\": \"oracle 1\", \"actual\": 62, \"expected\": 62, \"passed\": true}, {\"check\": \"oracle 2\", \"actual\": 60, \"expected\": 60, \"passed\": true}, {\"check\": \"oracle 3\", \"actual\": 67, \"expected\": 67, \"passed\": true}, {\"check\": \"oracle 4\", \"actual\": 60, \"expected\": 60, \"passed\": true}, {\"check\": \"oracle 5\", \"actual\": 69, \"expected\": 69, \"passed\": true}, {\"check\": \"oracle 6\", \"actual\": 126, \"expected\": null, \"passed\": false}, {\"check\": \"oracle 7\", \"actual\": null, \"expected\": null, \"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."}}