{"abstract":"In C, the note D is sung te or li instead of re because the distance is measured from pitch to tonic.","category":"Music interval and transposition theory","checks":8,"contract":"Input [tonic_pc, pitch, spelling] with integer pitch values and spelling sharp or flat. The relative pitch class (pitch - tonic) mod 12 maps diatonic degrees to do re mi fa sol la ti; chromatic degrees use di ri fi si li for sharp spelling and ra me se le te for flat spelling. Invalid input returns None.","evaluation_group":"w2-music-interval-movable-do","failed_approach":"Taking the absolute difference only works when the pitch lies above the tonic number.","family":"w2-music-interval-movable-do-relative-degree-direction","id":"FA-81306","implementations":{"attempt":{"sha256":"fe136ad037987c0bb7f5d5ec566c02e672c7a26e96b3656b74addf4fb19edaeb","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, pitch, spelling = x\n    if not isinstance(tonic, int) or not isinstance(pitch, int) or spelling not in ('sharp', 'flat'):\n        return None\n    rel = abs(pitch - tonic) % 12\n    diatonic = {0: 'do', 2: 're', 4: 'mi', 5: 'fa', 7: 'sol', 9: 'la', 11: 'ti'}\n    if rel in diatonic:\n        return diatonic[rel]\n    if spelling == 'sharp':\n        return {1: 'di', 3: 'ri', 6: 'fi', 8: 'si', 10: 'li'}[rel]\n    return {1: 'ra', 3: 'me', 6: 'se', 8: 'le', 10: 'te'}[rel]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([0, 60, 'sharp'], 'do'), ([0, 62, 'flat'], 're'), ([0, 71, 'flat'], 'ti'), ([0, 66, 'sharp'], 'fi'), ([0, 66, 'flat'], 'se'), ([0, 65, 'weird'], None), ([0, 63, None], None), ([3, 1, 'sharp'], 'li')], [([0, 62, 'flat'], 're'), ([0, 67, 'sharp'], 'sol'), ([0, 71, 'flat'], 'ti'), ([0, 61, 'sharp'], 'di'), ([0, 65, 'weird'], None), ([0, 63, None], None), ([9, 57, 'flat'], 'do'), ([3, 1, 'sharp'], 'li')], [([0, 62, 'flat'], 're'), ([0, 67, 'sharp'], 'sol'), ([0, 71, 'flat'], 'ti'), ([0, 61, 'sharp'], 'di'), ([0, 61, 'flat'], 'ra'), ([0, 70, 'flat'], 'te'), ([0, 70, 'sharp'], 'li'), ([3, 1, 'sharp'], 'li')], [([0, 61, 'sharp'], 'di'), ([0, 61, 'flat'], 'ra'), ([0, 70, 'flat'], 'te'), ([0, 70, 'sharp'], 'li'), ([7, 66, 'sharp'], 'ti'), ([7, 64, 'flat'], 'la'), ([7, 60, 'sharp'], 'fa'), ([3, 1, 'sharp'], 'li')], [([0, 61, 'flat'], 'ra'), ([0, 70, 'sharp'], 'li'), ([7, 66, 'sharp'], 'ti'), ([7, 64, 'flat'], 'la'), ([7, 60, 'sharp'], 'fa'), ([2, 64, 'sharp'], 're'), ([2, 63, 'flat'], 'ra'), ([3, 1, 'sharp'], 'li')]]\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":"1e89e6f131b1c5d528f07ae2277339b17397332e23b14855451e3d1637880283","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, pitch, spelling = x\n    if not isinstance(tonic, int) or not isinstance(pitch, int) or spelling not in ('sharp', 'flat'):\n        return None\n    rel = (tonic - pitch) % 12\n    diatonic = {0: 'do', 2: 're', 4: 'mi', 5: 'fa', 7: 'sol', 9: 'la', 11: 'ti'}\n    if rel in diatonic:\n        return diatonic[rel]\n    if spelling == 'sharp':\n        return {1: 'di', 3: 'ri', 6: 'fi', 8: 'si', 10: 'li'}[rel]\n    return {1: 'ra', 3: 'me', 6: 'se', 8: 'le', 10: 'te'}[rel]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([0, 60, 'sharp'], 'do'), ([0, 62, 'flat'], 're'), ([0, 71, 'flat'], 'ti'), ([0, 66, 'sharp'], 'fi'), ([0, 66, 'flat'], 'se'), ([0, 65, 'weird'], None), ([0, 63, None], None), ([3, 1, 'sharp'], 'li')], [([0, 62, 'flat'], 're'), ([0, 67, 'sharp'], 'sol'), ([0, 71, 'flat'], 'ti'), ([0, 61, 'sharp'], 'di'), ([0, 65, 'weird'], None), ([0, 63, None], None), ([9, 57, 'flat'], 'do'), ([3, 1, 'sharp'], 'li')], [([0, 62, 'flat'], 're'), ([0, 67, 'sharp'], 'sol'), ([0, 71, 'flat'], 'ti'), ([0, 61, 'sharp'], 'di'), ([0, 61, 'flat'], 'ra'), ([0, 70, 'flat'], 'te'), ([0, 70, 'sharp'], 'li'), ([3, 1, 'sharp'], 'li')], [([0, 61, 'sharp'], 'di'), ([0, 61, 'flat'], 'ra'), ([0, 70, 'flat'], 'te'), ([0, 70, 'sharp'], 'li'), ([7, 66, 'sharp'], 'ti'), ([7, 64, 'flat'], 'la'), ([7, 60, 'sharp'], 'fa'), ([3, 1, 'sharp'], 'li')], [([0, 61, 'flat'], 'ra'), ([0, 70, 'sharp'], 'li'), ([7, 66, 'sharp'], 'ti'), ([7, 64, 'flat'], 'la'), ([7, 60, 'sharp'], 'fa'), ([2, 64, 'sharp'], 're'), ([2, 63, 'flat'], 'ra'), ([3, 1, 'sharp'], 'li')]]\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":"3df2e1667528a18b57598ba6019af1dce4c50dd5a4b1e2fdb11146fc83b0f63e","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, pitch, spelling = x\n    if not isinstance(tonic, int) or not isinstance(pitch, int) or spelling not in ('sharp', 'flat'):\n        return None\n    rel = (pitch - tonic) % 12\n    diatonic = {0: 'do', 2: 're', 4: 'mi', 5: 'fa', 7: 'sol', 9: 'la', 11: 'ti'}\n    if rel in diatonic:\n        return diatonic[rel]\n    if spelling == 'sharp':\n        return {1: 'di', 3: 'ri', 6: 'fi', 8: 'si', 10: 'li'}[rel]\n    return {1: 'ra', 3: 'me', 6: 'se', 8: 'le', 10: 'te'}[rel]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([0, 60, 'sharp'], 'do'), ([0, 62, 'flat'], 're'), ([0, 71, 'flat'], 'ti'), ([0, 66, 'sharp'], 'fi'), ([0, 66, 'flat'], 'se'), ([0, 65, 'weird'], None), ([0, 63, None], None), ([3, 1, 'sharp'], 'li')], [([0, 62, 'flat'], 're'), ([0, 67, 'sharp'], 'sol'), ([0, 71, 'flat'], 'ti'), ([0, 61, 'sharp'], 'di'), ([0, 65, 'weird'], None), ([0, 63, None], None), ([9, 57, 'flat'], 'do'), ([3, 1, 'sharp'], 'li')], [([0, 62, 'flat'], 're'), ([0, 67, 'sharp'], 'sol'), ([0, 71, 'flat'], 'ti'), ([0, 61, 'sharp'], 'di'), ([0, 61, 'flat'], 'ra'), ([0, 70, 'flat'], 'te'), ([0, 70, 'sharp'], 'li'), ([3, 1, 'sharp'], 'li')], [([0, 61, 'sharp'], 'di'), ([0, 61, 'flat'], 'ra'), ([0, 70, 'flat'], 'te'), ([0, 70, 'sharp'], 'li'), ([7, 66, 'sharp'], 'ti'), ([7, 64, 'flat'], 'la'), ([7, 60, 'sharp'], 'fa'), ([3, 1, 'sharp'], 'li')], [([0, 61, 'flat'], 'ra'), ([0, 70, 'sharp'], 'li'), ([7, 66, 'sharp'], 'ti'), ([7, 64, 'flat'], 'la'), ([7, 60, 'sharp'], 'fa'), ([2, 64, 'sharp'], 're'), ([2, 63, 'flat'], 'ra'), ([3, 1, 'sharp'], 'li')]]\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-movable-do-relative-degree-direction","generated_at":"2026-09-29T14:50:01.847333+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Ear-training and sight-singing apps label notes with movable-do syllables relative to the key.","repair":"Restore the relative degree direction step so that it reads `(pitch - tonic) % 12`.","root_cause":"The relative pitch class subtracts in the wrong order, mirroring every degree around the tonic.","sha256":"b343b2c00e87827c42c133c58cbc25650a5ae8b6e12dc033fff36323c2a249ad","title":"Movable-do chromatic solfege syllables: degree measured downward from the tonic · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":40.186,"exit_code":1,"observations":[{"actual":"do","check":"oracle 0","expected":"do","passed":true},{"actual":"re","check":"oracle 1","expected":"re","passed":true},{"actual":"ti","check":"oracle 2","expected":"ti","passed":true},{"actual":"fi","check":"oracle 3","expected":"fi","passed":true},{"actual":"se","check":"oracle 4","expected":"se","passed":true},{"actual":null,"check":"oracle 5","expected":null,"passed":true},{"actual":null,"check":"oracle 6","expected":null,"passed":true},{"actual":"re","check":"oracle 7","expected":"li","passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"oracle 0\", \"actual\": \"do\", \"expected\": \"do\", \"passed\": true}, {\"check\": \"oracle 1\", \"actual\": \"re\", \"expected\": \"re\", \"passed\": true}, {\"check\": \"oracle 2\", \"actual\": \"ti\", \"expected\": \"ti\", \"passed\": true}, {\"check\": \"oracle 3\", \"actual\": \"fi\", \"expected\": \"fi\", \"passed\": true}, {\"check\": \"oracle 4\", \"actual\": \"se\", \"expected\": \"se\", \"passed\": true}, {\"check\": \"oracle 5\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"oracle 6\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"oracle 7\", \"actual\": \"re\", \"expected\": \"li\", \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.583,"exit_code":1,"observations":[{"actual":"do","check":"oracle 0","expected":"do","passed":true},{"actual":"te","check":"oracle 1","expected":"re","passed":false},{"actual":"ra","check":"oracle 2","expected":"ti","passed":false},{"actual":"fi","check":"oracle 3","expected":"fi","passed":true},{"actual":"se","check":"oracle 4","expected":"se","passed":true},{"actual":null,"check":"oracle 5","expected":null,"passed":true},{"actual":null,"check":"oracle 6","expected":null,"passed":true},{"actual":"re","check":"oracle 7","expected":"li","passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"oracle 0\", \"actual\": \"do\", \"expected\": \"do\", \"passed\": true}, {\"check\": \"oracle 1\", \"actual\": \"te\", \"expected\": \"re\", \"passed\": false}, {\"check\": \"oracle 2\", \"actual\": \"ra\", \"expected\": \"ti\", \"passed\": false}, {\"check\": \"oracle 3\", \"actual\": \"fi\", \"expected\": \"fi\", \"passed\": true}, {\"check\": \"oracle 4\", \"actual\": \"se\", \"expected\": \"se\", \"passed\": true}, {\"check\": \"oracle 5\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"oracle 6\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"oracle 7\", \"actual\": \"re\", \"expected\": \"li\", \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":39.705,"exit_code":0,"observations":[{"actual":"do","check":"oracle 0","expected":"do","passed":true},{"actual":"re","check":"oracle 1","expected":"re","passed":true},{"actual":"ti","check":"oracle 2","expected":"ti","passed":true},{"actual":"fi","check":"oracle 3","expected":"fi","passed":true},{"actual":"se","check":"oracle 4","expected":"se","passed":true},{"actual":null,"check":"oracle 5","expected":null,"passed":true},{"actual":null,"check":"oracle 6","expected":null,"passed":true},{"actual":"li","check":"oracle 7","expected":"li","passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"oracle 0\", \"actual\": \"do\", \"expected\": \"do\", \"passed\": true}, {\"check\": \"oracle 1\", \"actual\": \"re\", \"expected\": \"re\", \"passed\": true}, {\"check\": \"oracle 2\", \"actual\": \"ti\", \"expected\": \"ti\", \"passed\": true}, {\"check\": \"oracle 3\", \"actual\": \"fi\", \"expected\": \"fi\", \"passed\": true}, {\"check\": \"oracle 4\", \"actual\": \"se\", \"expected\": \"se\", \"passed\": true}, {\"check\": \"oracle 5\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"oracle 6\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"oracle 7\", \"actual\": \"li\", \"expected\": \"li\", \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}