{"abstract":"An augmented mediant in minor is labelled iii+ instead of III+.","category":"Music interval and transposition theory","checks":8,"contract":"Input [tonic_pc, mode, root_pc, quality] with mode major or minor (natural minor scale 0 2 3 5 7 8 10) and quality maj, min, dim or aug. Diatonic roots use their degree; in minor the leading tone (11 semitones) is degree VII with no prefix. Other roots in major are written b + the degree a semitone above; in minor # + the degree a semitone below. Numerals are uppercase for maj and aug, lowercase for min and dim, with suffix ° for dim and + for aug. Invalid input returns None.","evaluation_group":"w2-music-interval-roman-numeral","failed_approach":"Uppercasing everything except minor also uppercases diminished chords, e.g. VII° for the leading-tone chord.","family":"w2-music-interval-roman-numeral-numeral-case","id":"FA-81181","implementations":{"attempt":{"sha256":"b6adb4d947dedb4e43c2637ab56eee233871dd07ff2cd399c825628a0a4f0138","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    tonic, mode, root, quality = x\n    scales = {'major': [0, 2, 4, 5, 7, 9, 11], 'minor': [0, 2, 3, 5, 7, 8, 10]}\n    if mode not in scales or quality not in ('maj', 'min', 'dim', 'aug'):\n        return None\n    if not all(isinstance(v, int) for v in (tonic, root)):\n        return None\n    rel = (root - tonic) % 12\n    scale = scales[mode]\n    names = ['I', 'II', 'III', 'IV', 'V', 'VI', 'VII']\n    prefix = ''\n    if rel in scale:\n        deg = scale.index(rel)\n    elif mode == 'minor' and rel == 11:\n        deg = 6\n    elif mode == 'major':\n        prefix = 'b'\n        deg = scale.index((rel + 1) % 12)\n    else:\n        prefix = '#'\n        deg = scale.index((rel - 1) % 12)\n    numeral = names[deg] if quality != 'min' else names[deg].lower()\n    suffix = {'maj': '', 'min': '', 'dim': '°', 'aug': '+'}[quality]\n    return prefix + numeral + suffix\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([0, 'major', 7, 'maj'], 'V'), ([0, 'major', 2, 'min'], 'ii'), ([0, 'major', 11, 'dim'], 'vii°'), ([0, 'major', 8, 'maj'], 'bVI'), ([0, 'major', 10, 'maj'], 'bVII'), ([0, 'major', 1, 'maj'], 'bII'), ([9, 'minor', 3, 'dim'], '#iv°'), ([0, 'minor', 3, 'aug'], 'III+')], [([0, 'major', 10, 'maj'], 'bVII'), ([0, 'major', 1, 'maj'], 'bII'), ([0, 'major', 3, 'maj'], 'bIII'), ([0, 'major', 6, 'dim'], 'bv°'), ([9, 'minor', 4, 'maj'], 'V'), ([9, 'minor', 0, 'maj'], 'III'), ([0, 'minor', 11, 'dim'], 'vii°'), ([0, 'major', 0, 'aug'], 'I+')], [([9, 'minor', 4, 'maj'], 'V'), ([9, 'minor', 8, 'dim'], 'vii°'), ([9, 'minor', 0, 'maj'], 'III'), ([9, 'minor', 7, 'maj'], 'VII'), ([9, 'minor', 6, 'min'], '#vi'), ([9, 'minor', 1, 'maj'], '#III'), ([0, 'minor', 3, 'aug'], 'III+'), ([2, 'major', 1, 'dim'], 'vii°')], [([9, 'minor', 6, 'min'], '#vi'), ([9, 'minor', 1, 'maj'], '#III'), ([9, 'minor', 3, 'dim'], '#iv°'), ([0, 'minor', 9, 'min'], '#vi'), ([0, 'minor', 4, 'maj'], '#III'), ([7, 'major', 2, 'maj'], 'V'), ([0, 'major', 0, 'aug'], 'I+'), ([5, 'major', 4, 'dim'], 'vii°')], [([0, 'minor', 11, 'dim'], 'vii°'), ([0, 'minor', 4, 'maj'], '#III'), ([0, 'minor', 3, 'aug'], 'III+'), ([7, 'major', 2, 'maj'], 'V'), ([7, 'major', 0, 'maj'], 'IV'), ([0, 'lydian', 0, 'maj'], None), ([0, 'major', 0, 'sus'], None), ([5, 'minor', 4, 'dim'], 'vii°')]]\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":"8d01d2f225832d27f515c13d7cc1cbddd184be7de322d906e65e0036e826897f","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    tonic, mode, root, quality = x\n    scales = {'major': [0, 2, 4, 5, 7, 9, 11], 'minor': [0, 2, 3, 5, 7, 8, 10]}\n    if mode not in scales or quality not in ('maj', 'min', 'dim', 'aug'):\n        return None\n    if not all(isinstance(v, int) for v in (tonic, root)):\n        return None\n    rel = (root - tonic) % 12\n    scale = scales[mode]\n    names = ['I', 'II', 'III', 'IV', 'V', 'VI', 'VII']\n    prefix = ''\n    if rel in scale:\n        deg = scale.index(rel)\n    elif mode == 'minor' and rel == 11:\n        deg = 6\n    elif mode == 'major':\n        prefix = 'b'\n        deg = scale.index((rel + 1) % 12)\n    else:\n        prefix = '#'\n        deg = scale.index((rel - 1) % 12)\n    numeral = names[deg] if quality == 'maj' else names[deg].lower()\n    suffix = {'maj': '', 'min': '', 'dim': '°', 'aug': '+'}[quality]\n    return prefix + numeral + suffix\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([0, 'major', 7, 'maj'], 'V'), ([0, 'major', 2, 'min'], 'ii'), ([0, 'major', 11, 'dim'], 'vii°'), ([0, 'major', 8, 'maj'], 'bVI'), ([0, 'major', 10, 'maj'], 'bVII'), ([0, 'major', 1, 'maj'], 'bII'), ([9, 'minor', 3, 'dim'], '#iv°'), ([0, 'minor', 3, 'aug'], 'III+')], [([0, 'major', 10, 'maj'], 'bVII'), ([0, 'major', 1, 'maj'], 'bII'), ([0, 'major', 3, 'maj'], 'bIII'), ([0, 'major', 6, 'dim'], 'bv°'), ([9, 'minor', 4, 'maj'], 'V'), ([9, 'minor', 0, 'maj'], 'III'), ([0, 'minor', 11, 'dim'], 'vii°'), ([0, 'major', 0, 'aug'], 'I+')], [([9, 'minor', 4, 'maj'], 'V'), ([9, 'minor', 8, 'dim'], 'vii°'), ([9, 'minor', 0, 'maj'], 'III'), ([9, 'minor', 7, 'maj'], 'VII'), ([9, 'minor', 6, 'min'], '#vi'), ([9, 'minor', 1, 'maj'], '#III'), ([0, 'minor', 3, 'aug'], 'III+'), ([2, 'major', 1, 'dim'], 'vii°')], [([9, 'minor', 6, 'min'], '#vi'), ([9, 'minor', 1, 'maj'], '#III'), ([9, 'minor', 3, 'dim'], '#iv°'), ([0, 'minor', 9, 'min'], '#vi'), ([0, 'minor', 4, 'maj'], '#III'), ([7, 'major', 2, 'maj'], 'V'), ([0, 'major', 0, 'aug'], 'I+'), ([5, 'major', 4, 'dim'], 'vii°')], [([0, 'minor', 11, 'dim'], 'vii°'), ([0, 'minor', 4, 'maj'], '#III'), ([0, 'minor', 3, 'aug'], 'III+'), ([7, 'major', 2, 'maj'], 'V'), ([7, 'major', 0, 'maj'], 'IV'), ([0, 'lydian', 0, 'maj'], None), ([0, 'major', 0, 'sus'], None), ([5, 'minor', 4, 'dim'], 'vii°')]]\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":"b38234ecaeca0dcd789515c596f20a38aa91d7c28d7135ded037076bca9d0597","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    tonic, mode, root, quality = x\n    scales = {'major': [0, 2, 4, 5, 7, 9, 11], 'minor': [0, 2, 3, 5, 7, 8, 10]}\n    if mode not in scales or quality not in ('maj', 'min', 'dim', 'aug'):\n        return None\n    if not all(isinstance(v, int) for v in (tonic, root)):\n        return None\n    rel = (root - tonic) % 12\n    scale = scales[mode]\n    names = ['I', 'II', 'III', 'IV', 'V', 'VI', 'VII']\n    prefix = ''\n    if rel in scale:\n        deg = scale.index(rel)\n    elif mode == 'minor' and rel == 11:\n        deg = 6\n    elif mode == 'major':\n        prefix = 'b'\n        deg = scale.index((rel + 1) % 12)\n    else:\n        prefix = '#'\n        deg = scale.index((rel - 1) % 12)\n    numeral = names[deg] if quality in ('maj', 'aug') else names[deg].lower()\n    suffix = {'maj': '', 'min': '', 'dim': '°', 'aug': '+'}[quality]\n    return prefix + numeral + suffix\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([0, 'major', 7, 'maj'], 'V'), ([0, 'major', 2, 'min'], 'ii'), ([0, 'major', 11, 'dim'], 'vii°'), ([0, 'major', 8, 'maj'], 'bVI'), ([0, 'major', 10, 'maj'], 'bVII'), ([0, 'major', 1, 'maj'], 'bII'), ([9, 'minor', 3, 'dim'], '#iv°'), ([0, 'minor', 3, 'aug'], 'III+')], [([0, 'major', 10, 'maj'], 'bVII'), ([0, 'major', 1, 'maj'], 'bII'), ([0, 'major', 3, 'maj'], 'bIII'), ([0, 'major', 6, 'dim'], 'bv°'), ([9, 'minor', 4, 'maj'], 'V'), ([9, 'minor', 0, 'maj'], 'III'), ([0, 'minor', 11, 'dim'], 'vii°'), ([0, 'major', 0, 'aug'], 'I+')], [([9, 'minor', 4, 'maj'], 'V'), ([9, 'minor', 8, 'dim'], 'vii°'), ([9, 'minor', 0, 'maj'], 'III'), ([9, 'minor', 7, 'maj'], 'VII'), ([9, 'minor', 6, 'min'], '#vi'), ([9, 'minor', 1, 'maj'], '#III'), ([0, 'minor', 3, 'aug'], 'III+'), ([2, 'major', 1, 'dim'], 'vii°')], [([9, 'minor', 6, 'min'], '#vi'), ([9, 'minor', 1, 'maj'], '#III'), ([9, 'minor', 3, 'dim'], '#iv°'), ([0, 'minor', 9, 'min'], '#vi'), ([0, 'minor', 4, 'maj'], '#III'), ([7, 'major', 2, 'maj'], 'V'), ([0, 'major', 0, 'aug'], 'I+'), ([5, 'major', 4, 'dim'], 'vii°')], [([0, 'minor', 11, 'dim'], 'vii°'), ([0, 'minor', 4, 'maj'], '#III'), ([0, 'minor', 3, 'aug'], 'III+'), ([7, 'major', 2, 'maj'], 'V'), ([7, 'major', 0, 'maj'], 'IV'), ([0, 'lydian', 0, 'maj'], None), ([0, 'major', 0, 'sus'], None), ([5, 'minor', 4, 'dim'], 'vii°')]]\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-roman-numeral-numeral-case","generated_at":"2026-09-29T14:50:00.608980+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Harmonic analysis and ear-training tools label chords relative to the key.","repair":"Restore the numeral case step so that it reads `quality in ('maj', 'aug')`.","root_cause":"Only major quality selects an uppercase numeral; augmented is treated like a minor-type chord.","sha256":"8a9b2f98e0ed73e1bc60922ca329fdea306cbe4f9a6a5007521769e769041d6e","title":"Roman numeral label for a chord in a key: augmented chords written lowercase · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":40.314,"exit_code":1,"observations":[{"actual":"V","check":"oracle 0","expected":"V","passed":true},{"actual":"ii","check":"oracle 1","expected":"ii","passed":true},{"actual":"VII°","check":"oracle 2","expected":"vii°","passed":false},{"actual":"bVI","check":"oracle 3","expected":"bVI","passed":true},{"actual":"bVII","check":"oracle 4","expected":"bVII","passed":true},{"actual":"bII","check":"oracle 5","expected":"bII","passed":true},{"actual":"#IV°","check":"oracle 6","expected":"#iv°","passed":false},{"actual":"III+","check":"oracle 7","expected":"III+","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"oracle 0\", \"actual\": \"V\", \"expected\": \"V\", \"passed\": true}, {\"check\": \"oracle 1\", \"actual\": \"ii\", \"expected\": \"ii\", \"passed\": true}, {\"check\": \"oracle 2\", \"actual\": \"VII°\", \"expected\": \"vii°\", \"passed\": false}, {\"check\": \"oracle 3\", \"actual\": \"bVI\", \"expected\": \"bVI\", \"passed\": true}, {\"check\": \"oracle 4\", \"actual\": \"bVII\", \"expected\": \"bVII\", \"passed\": true}, {\"check\": \"oracle 5\", \"actual\": \"bII\", \"expected\": \"bII\", \"passed\": true}, {\"check\": \"oracle 6\", \"actual\": \"#IV°\", \"expected\": \"#iv°\", \"passed\": false}, {\"check\": \"oracle 7\", \"actual\": \"III+\", \"expected\": \"III+\", \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.749,"exit_code":1,"observations":[{"actual":"V","check":"oracle 0","expected":"V","passed":true},{"actual":"ii","check":"oracle 1","expected":"ii","passed":true},{"actual":"vii°","check":"oracle 2","expected":"vii°","passed":true},{"actual":"bVI","check":"oracle 3","expected":"bVI","passed":true},{"actual":"bVII","check":"oracle 4","expected":"bVII","passed":true},{"actual":"bII","check":"oracle 5","expected":"bII","passed":true},{"actual":"#iv°","check":"oracle 6","expected":"#iv°","passed":true},{"actual":"iii+","check":"oracle 7","expected":"III+","passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"oracle 0\", \"actual\": \"V\", \"expected\": \"V\", \"passed\": true}, {\"check\": \"oracle 1\", \"actual\": \"ii\", \"expected\": \"ii\", \"passed\": true}, {\"check\": \"oracle 2\", \"actual\": \"vii°\", \"expected\": \"vii°\", \"passed\": true}, {\"check\": \"oracle 3\", \"actual\": \"bVI\", \"expected\": \"bVI\", \"passed\": true}, {\"check\": \"oracle 4\", \"actual\": \"bVII\", \"expected\": \"bVII\", \"passed\": true}, {\"check\": \"oracle 5\", \"actual\": \"bII\", \"expected\": \"bII\", \"passed\": true}, {\"check\": \"oracle 6\", \"actual\": \"#iv°\", \"expected\": \"#iv°\", \"passed\": true}, {\"check\": \"oracle 7\", \"actual\": \"iii+\", \"expected\": \"III+\", \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":42.889,"exit_code":0,"observations":[{"actual":"V","check":"oracle 0","expected":"V","passed":true},{"actual":"ii","check":"oracle 1","expected":"ii","passed":true},{"actual":"vii°","check":"oracle 2","expected":"vii°","passed":true},{"actual":"bVI","check":"oracle 3","expected":"bVI","passed":true},{"actual":"bVII","check":"oracle 4","expected":"bVII","passed":true},{"actual":"bII","check":"oracle 5","expected":"bII","passed":true},{"actual":"#iv°","check":"oracle 6","expected":"#iv°","passed":true},{"actual":"III+","check":"oracle 7","expected":"III+","passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"oracle 0\", \"actual\": \"V\", \"expected\": \"V\", \"passed\": true}, {\"check\": \"oracle 1\", \"actual\": \"ii\", \"expected\": \"ii\", \"passed\": true}, {\"check\": \"oracle 2\", \"actual\": \"vii°\", \"expected\": \"vii°\", \"passed\": true}, {\"check\": \"oracle 3\", \"actual\": \"bVI\", \"expected\": \"bVI\", \"passed\": true}, {\"check\": \"oracle 4\", \"actual\": \"bVII\", \"expected\": \"bVII\", \"passed\": true}, {\"check\": \"oracle 5\", \"actual\": \"bII\", \"expected\": \"bII\", \"passed\": true}, {\"check\": \"oracle 6\", \"actual\": \"#iv°\", \"expected\": \"#iv°\", \"passed\": true}, {\"check\": \"oracle 7\", \"actual\": \"III+\", \"expected\": \"III+\", \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}