{"abstract":"A melody that already fits a wide range is dropped several octaves to the lowest register that still fits.","category":"Music interval and transposition theory","checks":8,"contract":"Input [notes, semitones, lo, hi]. Transpose every note by the semitone amount, then shift the whole melody by the octave offset k (|k| <= 10) of smallest magnitude that places every note within [lo, hi] inclusive. Return the notes, or None if the melody is empty, lo > hi, or no octave fits.","contract_signature":"x","evaluation_group":"w2-music-interval-range-fit-transposition","failed_approach":"Taking the maximum candidate picks the largest-magnitude or highest shift instead of the nearest octave.","family":"w2-music-interval-range-fit-transposition-octave-choice","id":"FA-81226","implementations":{"attempt":{"sha256":"c8f99b0ceebbae1d369482a35027a6cd46f0645947a8772cee52fc846e74625d","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) != 4:\n        return None\n    notes, t, lo, hi = x\n    if not notes or lo > hi:\n        return None\n    moved = [n + t for n in notes]\n    low, high = min(moved), max(moved)\n    if high - low > hi - lo:\n        return None\n    options = []\n    for k in range(-10, 11):\n        if lo <= low + 12 * k and high + 12 * k <= hi:\n            options.append((abs(k), k))\n    if not options:\n        return None\n    k = max(options)[1]\n    return [n + 12 * k for n in moved]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([[60, 64, 67], 0, 55, 79], [60, 64, 67]), ([[60, 64, 67], 2, 55, 79], [62, 66, 69]), ([[60, 64, 67], 0, 36, 60], [48, 52, 55]), ([[60, 72], 0, 60, 72], [60, 72]), ([[60, 72], 0, 61, 73], None), ([[60, 64], 0, 54, 78], [60, 64]), ([[60, 62], 5, 40, 50], [41, 43]), ([[60], 6, 54, 67], [66])], [([[60, 64, 67], 0, 72, 96], [72, 76, 79]), ([[60, 64, 67], 0, 36, 60], [48, 52, 55]), ([[60, 62], 5, 40, 50], [41, 43]), ([[60, 79], 0, 60, 78], None), ([[70], 0, 52, 64], [58]), ([[70], 0, 58, 70], [70]), ([[48, 50], -2, 50, 70], [58, 60]), ([[], 0, 0, 127], None)], [([[60, 64, 67], 0, 36, 60], [48, 52, 55]), ([[70], 0, 58, 70], [70]), ([[48, 50], -2, 50, 70], [58, 60]), ([[], 0, 0, 127], None), ([[60], 0, 70, 60], None), ([[60, 64, 67], -12, 55, 79], [60, 64, 67]), ([[60], 6, 54, 67], [66]), ([[62, 65], 0, 50, 62], [50, 53])], [([[60, 64, 67], 0, 36, 60], [48, 52, 55]), ([[60, 64], 0, 54, 78], [60, 64]), ([[60], 6, 54, 67], [66]), ([[62, 65], 0, 50, 62], [50, 53]), ([[60, 67], 0, 62, 73], None), ([[60, 63], 3, 48, 60], [51, 54]), ([[60], 0, 48, 48], [48]), ([[59, 61], 0, 47, 49], [47, 49])], [([[60, 64, 67], 0, 55, 79], [60, 64, 67]), ([[60, 64, 67], 0, 72, 96], [72, 76, 79]), ([[60, 64, 67], 0, 36, 60], [48, 52, 55]), ([[60, 64], 0, 54, 78], [60, 64]), ([[70], 0, 58, 70], [70]), ([[60, 64, 67], -12, 55, 79], [60, 64, 67]), ([[60], 0, 48, 48], [48]), ([[59, 61], 0, 47, 49], [47, 49])]]\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":"f2f8c7d377e08df79ed02e3f7a5566aa62f8acc2d98a68c307e1f04f69c93827","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) != 4:\n        return None\n    notes, t, lo, hi = x\n    if not notes or lo > hi:\n        return None\n    moved = [n + t for n in notes]\n    low, high = min(moved), max(moved)\n    if high - low > hi - lo:\n        return None\n    options = []\n    for k in range(-10, 11):\n        if lo <= low + 12 * k and high + 12 * k <= hi:\n            options.append((abs(k), k))\n    if not options:\n        return None\n    k = options[0][1]\n    return [n + 12 * k for n in moved]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([[60, 64, 67], 0, 55, 79], [60, 64, 67]), ([[60, 64, 67], 2, 55, 79], [62, 66, 69]), ([[60, 64, 67], 0, 36, 60], [48, 52, 55]), ([[60, 72], 0, 60, 72], [60, 72]), ([[60, 72], 0, 61, 73], None), ([[60, 64], 0, 54, 78], [60, 64]), ([[60, 62], 5, 40, 50], [41, 43]), ([[60], 6, 54, 67], [66])], [([[60, 64, 67], 0, 72, 96], [72, 76, 79]), ([[60, 64, 67], 0, 36, 60], [48, 52, 55]), ([[60, 62], 5, 40, 50], [41, 43]), ([[60, 79], 0, 60, 78], None), ([[70], 0, 52, 64], [58]), ([[70], 0, 58, 70], [70]), ([[48, 50], -2, 50, 70], [58, 60]), ([[], 0, 0, 127], None)], [([[60, 64, 67], 0, 36, 60], [48, 52, 55]), ([[70], 0, 58, 70], [70]), ([[48, 50], -2, 50, 70], [58, 60]), ([[], 0, 0, 127], None), ([[60], 0, 70, 60], None), ([[60, 64, 67], -12, 55, 79], [60, 64, 67]), ([[60], 6, 54, 67], [66]), ([[62, 65], 0, 50, 62], [50, 53])], [([[60, 64, 67], 0, 36, 60], [48, 52, 55]), ([[60, 64], 0, 54, 78], [60, 64]), ([[60], 6, 54, 67], [66]), ([[62, 65], 0, 50, 62], [50, 53]), ([[60, 67], 0, 62, 73], None), ([[60, 63], 3, 48, 60], [51, 54]), ([[60], 0, 48, 48], [48]), ([[59, 61], 0, 47, 49], [47, 49])], [([[60, 64, 67], 0, 55, 79], [60, 64, 67]), ([[60, 64, 67], 0, 72, 96], [72, 76, 79]), ([[60, 64, 67], 0, 36, 60], [48, 52, 55]), ([[60, 64], 0, 54, 78], [60, 64]), ([[70], 0, 58, 70], [70]), ([[60, 64, 67], -12, 55, 79], [60, 64, 67]), ([[60], 0, 48, 48], [48]), ([[59, 61], 0, 47, 49], [47, 49])]]\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-range-fit-transposition-octave-choice","generated_at":"2026-09-29T14:50:01.166163+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Arranging tools transpose parts into playable instrument ranges.","root_cause":"The first candidate found by the ascending octave scan is used instead of the candidate with the smallest shift.","sha256":"e32cb43da3b7349b936228fee2352d3d143fd301510c249c940f6303768d0db6","title":"Melody transposition fitted into an instrument range: lowest fitting octave chosen instead of nearest · 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":42.128,"exit_code":1,"observations":[{"actual":[72,76,79],"check":"oracle 0","expected":[60,64,67],"passed":false},{"actual":[62,66,69],"check":"oracle 1","expected":[62,66,69],"passed":true},{"actual":[36,40,43],"check":"oracle 2","expected":[48,52,55],"passed":false},{"actual":[60,72],"check":"oracle 3","expected":[60,72],"passed":true},{"actual":null,"check":"oracle 4","expected":null,"passed":true},{"actual":[72,76],"check":"oracle 5","expected":[60,64],"passed":false},{"actual":[41,43],"check":"oracle 6","expected":[41,43],"passed":true},{"actual":[54],"check":"oracle 7","expected":[66],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"oracle 0\", \"actual\": [72, 76, 79], \"expected\": [60, 64, 67], \"passed\": false}, {\"check\": \"oracle 1\", \"actual\": [62, 66, 69], \"expected\": [62, 66, 69], \"passed\": true}, {\"check\": \"oracle 2\", \"actual\": [36, 40, 43], \"expected\": [48, 52, 55], \"passed\": false}, {\"check\": \"oracle 3\", \"actual\": [60, 72], \"expected\": [60, 72], \"passed\": true}, {\"check\": \"oracle 4\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"oracle 5\", \"actual\": [72, 76], \"expected\": [60, 64], \"passed\": false}, {\"check\": \"oracle 6\", \"actual\": [41, 43], \"expected\": [41, 43], \"passed\": true}, {\"check\": \"oracle 7\", \"actual\": [54], \"expected\": [66], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.671,"exit_code":1,"observations":[{"actual":[60,64,67],"check":"oracle 0","expected":[60,64,67],"passed":true},{"actual":[62,66,69],"check":"oracle 1","expected":[62,66,69],"passed":true},{"actual":[36,40,43],"check":"oracle 2","expected":[48,52,55],"passed":false},{"actual":[60,72],"check":"oracle 3","expected":[60,72],"passed":true},{"actual":null,"check":"oracle 4","expected":null,"passed":true},{"actual":[60,64],"check":"oracle 5","expected":[60,64],"passed":true},{"actual":[41,43],"check":"oracle 6","expected":[41,43],"passed":true},{"actual":[54],"check":"oracle 7","expected":[66],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"oracle 0\", \"actual\": [60, 64, 67], \"expected\": [60, 64, 67], \"passed\": true}, {\"check\": \"oracle 1\", \"actual\": [62, 66, 69], \"expected\": [62, 66, 69], \"passed\": true}, {\"check\": \"oracle 2\", \"actual\": [36, 40, 43], \"expected\": [48, 52, 55], \"passed\": false}, {\"check\": \"oracle 3\", \"actual\": [60, 72], \"expected\": [60, 72], \"passed\": true}, {\"check\": \"oracle 4\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"oracle 5\", \"actual\": [60, 64], \"expected\": [60, 64], \"passed\": true}, {\"check\": \"oracle 6\", \"actual\": [41, 43], \"expected\": [41, 43], \"passed\": true}, {\"check\": \"oracle 7\", \"actual\": [54], \"expected\": [66], \"passed\": false}], \"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."}}