{"abstract":"Notes a few steps below the tonic jump up an octave after transposition (B3 up two steps in C gives D5).","category":"Music interval and transposition theory","checks":8,"contract":"Input [tonic, notes, steps] where tonic is a MIDI reference note. Each note must belong to the major scale on the tonic (else return None). Its scale position is its degree plus 7 per octave counted from the tonic note with floor division (notes below the tonic note are in negative octaves). Move by the signed number of steps and return the resulting MIDI notes.","contract_signature":"x","evaluation_group":"w2-music-interval-diatonic-shift","failed_approach":"Using the absolute distance places every note below the tonic in a positive octave.","family":"w2-music-interval-diatonic-shift-octave-floor","id":"FA-81261","implementations":{"attempt":{"sha256":"bae1db2311d5aea28f7d5ea417556bd5e1d284771002f3cccc73316ec8cc219d","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) != 3:\n        return None\n    tonic, notes, steps = x\n    scale = [0, 2, 4, 5, 7, 9, 11]\n    out = []\n    for n in notes:\n        rel = (n - tonic) % 12\n        if rel not in scale:\n            return None\n        octave = abs(n - tonic) // 12\n        pos = octave * 7 + scale.index(rel) + steps\n        out.append(tonic + 12 * (pos // 7) + scale[pos % 7])\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([60, [60, 62, 64], 2], [64, 65, 67]), ([60, [60, 64, 67], 1], [62, 65, 69]), ([60, [71], 1], [72]), ([60, [60], -1], [59]), ([60, [59, 57], 2], [62, 60]), ([67, [67, 71, 74], 2], [71, 74, 78]), ([67, [66], 1], [67]), ([67, [55, 54], -2], [52, 50])], [([60, [60], -1], [59]), ([60, [48, 50], -3], [43, 45]), ([67, [67, 71, 74], 2], [71, 74, 78]), ([67, [55, 54], -2], [52, 50]), ([60, [61], 1], None), ([60, [60, 65], 3], [65, 71]), ([62, [62, 66], -7], [50, 54]), ([65, [53, 58], 4], [60, 65])], [([67, [66], 1], [67]), ([60, [60, 65], 3], [65, 71]), ([62, [62, 66], -7], [50, 54]), ([60, [72, 74], 7], [84, 86]), ([65, [53, 58], 4], [60, 65]), ([60, [], 3], []), ([60, [64], -9], [48]), ([60, [57], -2], [53])], [([60, [59, 57], 2], [62, 60]), ([60, [48, 50], -3], [43, 45]), ([67, [55, 54], -2], [52, 50]), ([60, [], 3], []), ([60, [64], -9], [48]), ([60, [57], -2], [53]), ([69, [57, 56], 1], [59, 57]), ([60, [65, 71], 0], [65, 71])], [([60, [59, 57], 2], [62, 60]), ([60, [48, 50], -3], [43, 45]), ([67, [66], 1], [67]), ([67, [55, 54], -2], [52, 50]), ([65, [53, 58], 4], [60, 65]), ([60, [57], -2], [53]), ([69, [57, 56], 1], [59, 57]), ([60, [40, 41], 10], [57, 59])]]\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":"d4e72f4c3c57d686d3881087c9d5b9da3833eefeaa5d9fdd3070f26b27b895b0","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) != 3:\n        return None\n    tonic, notes, steps = x\n    scale = [0, 2, 4, 5, 7, 9, 11]\n    out = []\n    for n in notes:\n        rel = (n - tonic) % 12\n        if rel not in scale:\n            return None\n        octave = int((n - tonic) / 12)\n        pos = octave * 7 + scale.index(rel) + steps\n        out.append(tonic + 12 * (pos // 7) + scale[pos % 7])\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([60, [60, 62, 64], 2], [64, 65, 67]), ([60, [60, 64, 67], 1], [62, 65, 69]), ([60, [71], 1], [72]), ([60, [60], -1], [59]), ([60, [59, 57], 2], [62, 60]), ([67, [67, 71, 74], 2], [71, 74, 78]), ([67, [66], 1], [67]), ([67, [55, 54], -2], [52, 50])], [([60, [60], -1], [59]), ([60, [48, 50], -3], [43, 45]), ([67, [67, 71, 74], 2], [71, 74, 78]), ([67, [55, 54], -2], [52, 50]), ([60, [61], 1], None), ([60, [60, 65], 3], [65, 71]), ([62, [62, 66], -7], [50, 54]), ([65, [53, 58], 4], [60, 65])], [([67, [66], 1], [67]), ([60, [60, 65], 3], [65, 71]), ([62, [62, 66], -7], [50, 54]), ([60, [72, 74], 7], [84, 86]), ([65, [53, 58], 4], [60, 65]), ([60, [], 3], []), ([60, [64], -9], [48]), ([60, [57], -2], [53])], [([60, [59, 57], 2], [62, 60]), ([60, [48, 50], -3], [43, 45]), ([67, [55, 54], -2], [52, 50]), ([60, [], 3], []), ([60, [64], -9], [48]), ([60, [57], -2], [53]), ([69, [57, 56], 1], [59, 57]), ([60, [65, 71], 0], [65, 71])], [([60, [59, 57], 2], [62, 60]), ([60, [48, 50], -3], [43, 45]), ([67, [66], 1], [67]), ([67, [55, 54], -2], [52, 50]), ([65, [53, 58], 4], [60, 65]), ([60, [57], -2], [53]), ([69, [57, 56], 1], [59, 57]), ([60, [40, 41], 10], [57, 59])]]\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-diatonic-shift-octave-floor","generated_at":"2026-09-29T14:50:01.272161+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Harmonisers and sequence generators transpose melodies diatonically rather than chromatically.","root_cause":"The octave index truncates toward zero instead of flooring, so notes below the tonic are placed in octave 0.","sha256":"8d891984f2266b36ee2db28ae160cb90f232cd4b146a9ade373265ee6381f56a","title":"Diatonic step transposition within a major key: notes below the tonic truncated toward zero · 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":39.921,"exit_code":1,"observations":[{"actual":[64,65,67],"check":"oracle 0","expected":[64,65,67],"passed":true},{"actual":[62,65,69],"check":"oracle 1","expected":[62,65,69],"passed":true},{"actual":[72],"check":"oracle 2","expected":[72],"passed":true},{"actual":[59],"check":"oracle 3","expected":[59],"passed":true},{"actual":[74,72],"check":"oracle 4","expected":[62,60],"passed":false},{"actual":[71,74,78],"check":"oracle 5","expected":[71,74,78],"passed":true},{"actual":[79],"check":"oracle 6","expected":[67],"passed":false},{"actual":[76,86],"check":"oracle 7","expected":[52,50],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"oracle 0\", \"actual\": [64, 65, 67], \"expected\": [64, 65, 67], \"passed\": true}, {\"check\": \"oracle 1\", \"actual\": [62, 65, 69], \"expected\": [62, 65, 69], \"passed\": true}, {\"check\": \"oracle 2\", \"actual\": [72], \"expected\": [72], \"passed\": true}, {\"check\": \"oracle 3\", \"actual\": [59], \"expected\": [59], \"passed\": true}, {\"check\": \"oracle 4\", \"actual\": [74, 72], \"expected\": [62, 60], \"passed\": false}, {\"check\": \"oracle 5\", \"actual\": [71, 74, 78], \"expected\": [71, 74, 78], \"passed\": true}, {\"check\": \"oracle 6\", \"actual\": [79], \"expected\": [67], \"passed\": false}, {\"check\": \"oracle 7\", \"actual\": [76, 86], \"expected\": [52, 50], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":37.452,"exit_code":1,"observations":[{"actual":[64,65,67],"check":"oracle 0","expected":[64,65,67],"passed":true},{"actual":[62,65,69],"check":"oracle 1","expected":[62,65,69],"passed":true},{"actual":[72],"check":"oracle 2","expected":[72],"passed":true},{"actual":[59],"check":"oracle 3","expected":[59],"passed":true},{"actual":[74,72],"check":"oracle 4","expected":[62,60],"passed":false},{"actual":[71,74,78],"check":"oracle 5","expected":[71,74,78],"passed":true},{"actual":[79],"check":"oracle 6","expected":[67],"passed":false},{"actual":[52,62],"check":"oracle 7","expected":[52,50],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"oracle 0\", \"actual\": [64, 65, 67], \"expected\": [64, 65, 67], \"passed\": true}, {\"check\": \"oracle 1\", \"actual\": [62, 65, 69], \"expected\": [62, 65, 69], \"passed\": true}, {\"check\": \"oracle 2\", \"actual\": [72], \"expected\": [72], \"passed\": true}, {\"check\": \"oracle 3\", \"actual\": [59], \"expected\": [59], \"passed\": true}, {\"check\": \"oracle 4\", \"actual\": [74, 72], \"expected\": [62, 60], \"passed\": false}, {\"check\": \"oracle 5\", \"actual\": [71, 74, 78], \"expected\": [71, 74, 78], \"passed\": true}, {\"check\": \"oracle 6\", \"actual\": [79], \"expected\": [67], \"passed\": false}, {\"check\": \"oracle 7\", \"actual\": [52, 62], \"expected\": [52, 50], \"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."}}