{"abstract":"The octave is returned as \"2\" and the double octave as \"4\" instead of \"2/1\" and \"4/1\".","category":"Music interval and transposition theory","checks":8,"contract":"Input an integer semitone count (negative = descending). Ascending ratios use the table 1/1 16/15 9/8 6/5 5/4 4/3 45/32 3/2 8/5 5/3 9/5 15/8 per pitch class, times 2 per octave. A descending interval is the reciprocal of the ascending one of the same size. Return \"p/q\" in lowest terms (always with a denominator); non-integers and booleans return None.","evaluation_group":"w2-music-interval-just-ratio","failed_approach":"Appending \"/1\" only above unity still renders the unison as \"1\".","family":"w2-music-interval-just-ratio-ratio-rendering","id":"FA-81096","implementations":{"attempt":{"sha256":"4d3a8581eb4d0ed718f4af6ba35837113f3d90cf4fedd62c718657cffaded275","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(x):\n    table = ['1/1', '16/15', '9/8', '6/5', '5/4', '4/3', '45/32', '3/2', '8/5', '5/3', '9/5', '15/8']\n    if not isinstance(x, int) or isinstance(x, bool):\n        return None\n    n = abs(x)\n    r = Fraction(table[n % 12]) * 2 ** (n // 12)\n    if x < 0:\n        r = 1 / r\n    return str(r) + ('/1' if r.denominator == 1 and r > 1 else '')\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[(0, '1/1'), (1, '16/15'), (2, '9/8'), (3, '6/5'), (4, '5/4'), (5, '4/3'), (6, '45/32'), (19, '3/1')], [(0, '1/1'), (4, '5/4'), (5, '4/3'), (6, '45/32'), (7, '3/2'), (8, '8/5'), (12, '2/1'), (24, '4/1')], [(0, '1/1'), (7, '3/2'), (8, '8/5'), (9, '5/3'), (10, '9/5'), (11, '15/8'), (19, '3/1'), (36, '8/1')], [(0, '1/1'), (10, '9/5'), (11, '15/8'), (13, '32/15'), (24, '4/1'), (-1, '15/16'), (-2, '8/9'), (-3, '5/6')], [(0, '1/1'), (12, '2/1'), (-1, '15/16'), (-2, '8/9'), (-3, '5/6'), (-5, '3/4'), (-6, '32/45'), (36, '8/1')]]\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":"4c470e6d178b520bb4b4bdd232d93a14a64c61b499624d79d770982aca671ef1","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(x):\n    table = ['1/1', '16/15', '9/8', '6/5', '5/4', '4/3', '45/32', '3/2', '8/5', '5/3', '9/5', '15/8']\n    if not isinstance(x, int) or isinstance(x, bool):\n        return None\n    n = abs(x)\n    r = Fraction(table[n % 12]) * 2 ** (n // 12)\n    if x < 0:\n        r = 1 / r\n    return str(r)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[(0, '1/1'), (1, '16/15'), (2, '9/8'), (3, '6/5'), (4, '5/4'), (5, '4/3'), (6, '45/32'), (19, '3/1')], [(0, '1/1'), (4, '5/4'), (5, '4/3'), (6, '45/32'), (7, '3/2'), (8, '8/5'), (12, '2/1'), (24, '4/1')], [(0, '1/1'), (7, '3/2'), (8, '8/5'), (9, '5/3'), (10, '9/5'), (11, '15/8'), (19, '3/1'), (36, '8/1')], [(0, '1/1'), (10, '9/5'), (11, '15/8'), (13, '32/15'), (24, '4/1'), (-1, '15/16'), (-2, '8/9'), (-3, '5/6')], [(0, '1/1'), (12, '2/1'), (-1, '15/16'), (-2, '8/9'), (-3, '5/6'), (-5, '3/4'), (-6, '32/45'), (36, '8/1')]]\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":"f51a645ca58b0e8ed86eb3a79d0da84481414eb74f9d7d2e771edb0074e5e16a","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(x):\n    table = ['1/1', '16/15', '9/8', '6/5', '5/4', '4/3', '45/32', '3/2', '8/5', '5/3', '9/5', '15/8']\n    if not isinstance(x, int) or isinstance(x, bool):\n        return None\n    n = abs(x)\n    r = Fraction(table[n % 12]) * 2 ** (n // 12)\n    if x < 0:\n        r = 1 / r\n    return str(r.numerator) + '/' + str(r.denominator)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[(0, '1/1'), (1, '16/15'), (2, '9/8'), (3, '6/5'), (4, '5/4'), (5, '4/3'), (6, '45/32'), (19, '3/1')], [(0, '1/1'), (4, '5/4'), (5, '4/3'), (6, '45/32'), (7, '3/2'), (8, '8/5'), (12, '2/1'), (24, '4/1')], [(0, '1/1'), (7, '3/2'), (8, '8/5'), (9, '5/3'), (10, '9/5'), (11, '15/8'), (19, '3/1'), (36, '8/1')], [(0, '1/1'), (10, '9/5'), (11, '15/8'), (13, '32/15'), (24, '4/1'), (-1, '15/16'), (-2, '8/9'), (-3, '5/6')], [(0, '1/1'), (12, '2/1'), (-1, '15/16'), (-2, '8/9'), (-3, '5/6'), (-5, '3/4'), (-6, '32/45'), (36, '8/1')]]\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-just-ratio-ratio-rendering","generated_at":"2026-09-29T14:49:59.892852+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Tuning tables and retuning tools convert interval sizes to exact frequency ratios.","repair":"Restore the ratio rendering step so that it reads `str(r.numerator) + '/' + str(r.denominator)`.","root_cause":"The Fraction default string form drops the denominator of whole-number ratios.","sha256":"e3321382b54b5cc2ff1cbee106de89f990c78eed0683556748abbd67ed4cf481","title":"Five-limit just ratio for a semitone interval: integer ratios rendered without denominator · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":43.506,"exit_code":1,"observations":[{"actual":"1","check":"oracle 0","expected":"1/1","passed":false},{"actual":"16/15","check":"oracle 1","expected":"16/15","passed":true},{"actual":"9/8","check":"oracle 2","expected":"9/8","passed":true},{"actual":"6/5","check":"oracle 3","expected":"6/5","passed":true},{"actual":"5/4","check":"oracle 4","expected":"5/4","passed":true},{"actual":"4/3","check":"oracle 5","expected":"4/3","passed":true},{"actual":"45/32","check":"oracle 6","expected":"45/32","passed":true},{"actual":"3/1","check":"oracle 7","expected":"3/1","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"oracle 0\", \"actual\": \"1\", \"expected\": \"1/1\", \"passed\": false}, {\"check\": \"oracle 1\", \"actual\": \"16/15\", \"expected\": \"16/15\", \"passed\": true}, {\"check\": \"oracle 2\", \"actual\": \"9/8\", \"expected\": \"9/8\", \"passed\": true}, {\"check\": \"oracle 3\", \"actual\": \"6/5\", \"expected\": \"6/5\", \"passed\": true}, {\"check\": \"oracle 4\", \"actual\": \"5/4\", \"expected\": \"5/4\", \"passed\": true}, {\"check\": \"oracle 5\", \"actual\": \"4/3\", \"expected\": \"4/3\", \"passed\": true}, {\"check\": \"oracle 6\", \"actual\": \"45/32\", \"expected\": \"45/32\", \"passed\": true}, {\"check\": \"oracle 7\", \"actual\": \"3/1\", \"expected\": \"3/1\", \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.578,"exit_code":1,"observations":[{"actual":"1","check":"oracle 0","expected":"1/1","passed":false},{"actual":"16/15","check":"oracle 1","expected":"16/15","passed":true},{"actual":"9/8","check":"oracle 2","expected":"9/8","passed":true},{"actual":"6/5","check":"oracle 3","expected":"6/5","passed":true},{"actual":"5/4","check":"oracle 4","expected":"5/4","passed":true},{"actual":"4/3","check":"oracle 5","expected":"4/3","passed":true},{"actual":"45/32","check":"oracle 6","expected":"45/32","passed":true},{"actual":"3","check":"oracle 7","expected":"3/1","passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"oracle 0\", \"actual\": \"1\", \"expected\": \"1/1\", \"passed\": false}, {\"check\": \"oracle 1\", \"actual\": \"16/15\", \"expected\": \"16/15\", \"passed\": true}, {\"check\": \"oracle 2\", \"actual\": \"9/8\", \"expected\": \"9/8\", \"passed\": true}, {\"check\": \"oracle 3\", \"actual\": \"6/5\", \"expected\": \"6/5\", \"passed\": true}, {\"check\": \"oracle 4\", \"actual\": \"5/4\", \"expected\": \"5/4\", \"passed\": true}, {\"check\": \"oracle 5\", \"actual\": \"4/3\", \"expected\": \"4/3\", \"passed\": true}, {\"check\": \"oracle 6\", \"actual\": \"45/32\", \"expected\": \"45/32\", \"passed\": true}, {\"check\": \"oracle 7\", \"actual\": \"3\", \"expected\": \"3/1\", \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":40.459,"exit_code":0,"observations":[{"actual":"1/1","check":"oracle 0","expected":"1/1","passed":true},{"actual":"16/15","check":"oracle 1","expected":"16/15","passed":true},{"actual":"9/8","check":"oracle 2","expected":"9/8","passed":true},{"actual":"6/5","check":"oracle 3","expected":"6/5","passed":true},{"actual":"5/4","check":"oracle 4","expected":"5/4","passed":true},{"actual":"4/3","check":"oracle 5","expected":"4/3","passed":true},{"actual":"45/32","check":"oracle 6","expected":"45/32","passed":true},{"actual":"3/1","check":"oracle 7","expected":"3/1","passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"oracle 0\", \"actual\": \"1/1\", \"expected\": \"1/1\", \"passed\": true}, {\"check\": \"oracle 1\", \"actual\": \"16/15\", \"expected\": \"16/15\", \"passed\": true}, {\"check\": \"oracle 2\", \"actual\": \"9/8\", \"expected\": \"9/8\", \"passed\": true}, {\"check\": \"oracle 3\", \"actual\": \"6/5\", \"expected\": \"6/5\", \"passed\": true}, {\"check\": \"oracle 4\", \"actual\": \"5/4\", \"expected\": \"5/4\", \"passed\": true}, {\"check\": \"oracle 5\", \"actual\": \"4/3\", \"expected\": \"4/3\", \"passed\": true}, {\"check\": \"oracle 6\", \"actual\": \"45/32\", \"expected\": \"45/32\", \"passed\": true}, {\"check\": \"oracle 7\", \"actual\": \"3/1\", \"expected\": \"3/1\", \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}