{"abstract":"A minor reports three sharps and D minor two sharps instead of zero and one flat.","category":"Music interval and transposition theory","checks":8,"contract":"Input [tonic, mode] with tonic a letter optionally followed by one # or b, and mode major or minor. The signature is the letter position on the line of fifths (F -1, C 0, G 1, D 2, A 3, E 4, B 5) plus 7 per sharp and minus 7 per flat; minor keys use the relative major, three fifths flatward. Return the count (positive sharps, negative flats) or None if it lies outside -7..7 or the input is invalid.","contract_signature":"x","evaluation_group":"w2-music-interval-tonic-key-fifths","failed_approach":"Applying the offset only to natural-letter tonics leaves C# minor and Eb minor at their parallel-major signatures.","family":"w2-music-interval-tonic-key-fifths-relative-minor-direction","id":"FA-80966","implementations":{"attempt":{"sha256":"9bcc1e1fa4c6253858edf492729d27323be51c94283abdfdb9eb48190d4433cc","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    base = {'F': -1, 'C': 0, 'G': 1, 'D': 2, 'A': 3, 'E': 4, 'B': 5}\n    if not isinstance(x, list) or len(x) != 2:\n        return None\n    tonic, mode = x\n    if mode not in ('major', 'minor'):\n        return None\n    if not isinstance(tonic, str) or not tonic or tonic[0] not in base:\n        return None\n    rest = tonic[1:]\n    if rest not in ('', '#', 'b'):\n        return None\n    acc = {'': 0, '#': 1, 'b': -1}[rest]\n    fifths = base[tonic[0]] + 7 * acc\n    if mode == 'minor':\n        fifths -= 3 if acc == 0 else 0\n    if fifths < -7 or fifths > 7:\n        return None\n    return fifths\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[(['C', 'major'], 0), (['G', 'major'], 1), (['F', 'major'], -1), (['F#', 'major'], 6), (['A', 'minor'], 0), (['D', 'minor'], -1), (['C#', 'minor'], 4), (['G#', 'minor'], 5)], [(['F#', 'major'], 6), (['Gb', 'major'], -6), (['C#', 'major'], 7), (['Cb', 'major'], -7), (['E', 'minor'], 1), (['C#', 'minor'], 4), (['Eb', 'minor'], -6), (['D#', 'minor'], 6)], [(['Cb', 'major'], -7), (['Db', 'major'], -5), (['B', 'major'], 5), (['D', 'minor'], -1), (['Eb', 'minor'], -6), (['Ab', 'minor'], -7), (['A#', 'minor'], 7), (['Fb', 'major'], None)], [(['C#', 'minor'], 4), (['Ab', 'minor'], -7), (['G#', 'minor'], 5), (['Fb', 'major'], None), (['B#', 'major'], None), (['Bb', 'minor'], -5), (['C', 'dorian'], None), (['C', 'Major'], None)], [(['Eb', 'minor'], -6), (['G#', 'minor'], 5), (['D#', 'minor'], 6), (['C', 'Major'], None), (['H', 'major'], None), (['Cx', 'major'], None), (['E#', 'major'], None), (['Gb', 'minor'], None)]]\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":"90582b2c3d0c73261c77e6effcc04ebbca81792210ef796427d317154f832358","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    base = {'F': -1, 'C': 0, 'G': 1, 'D': 2, 'A': 3, 'E': 4, 'B': 5}\n    if not isinstance(x, list) or len(x) != 2:\n        return None\n    tonic, mode = x\n    if mode not in ('major', 'minor'):\n        return None\n    if not isinstance(tonic, str) or not tonic or tonic[0] not in base:\n        return None\n    rest = tonic[1:]\n    if rest not in ('', '#', 'b'):\n        return None\n    acc = {'': 0, '#': 1, 'b': -1}[rest]\n    fifths = base[tonic[0]] + 7 * acc\n    if mode == 'minor':\n        fifths += 3\n    if fifths < -7 or fifths > 7:\n        return None\n    return fifths\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[(['C', 'major'], 0), (['G', 'major'], 1), (['F', 'major'], -1), (['F#', 'major'], 6), (['A', 'minor'], 0), (['D', 'minor'], -1), (['C#', 'minor'], 4), (['G#', 'minor'], 5)], [(['F#', 'major'], 6), (['Gb', 'major'], -6), (['C#', 'major'], 7), (['Cb', 'major'], -7), (['E', 'minor'], 1), (['C#', 'minor'], 4), (['Eb', 'minor'], -6), (['D#', 'minor'], 6)], [(['Cb', 'major'], -7), (['Db', 'major'], -5), (['B', 'major'], 5), (['D', 'minor'], -1), (['Eb', 'minor'], -6), (['Ab', 'minor'], -7), (['A#', 'minor'], 7), (['Fb', 'major'], None)], [(['C#', 'minor'], 4), (['Ab', 'minor'], -7), (['G#', 'minor'], 5), (['Fb', 'major'], None), (['B#', 'major'], None), (['Bb', 'minor'], -5), (['C', 'dorian'], None), (['C', 'Major'], None)], [(['Eb', 'minor'], -6), (['G#', 'minor'], 5), (['D#', 'minor'], 6), (['C', 'Major'], None), (['H', 'major'], None), (['Cx', 'major'], None), (['E#', 'major'], None), (['Gb', 'minor'], None)]]\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-tonic-key-fifths-relative-minor-direction","generated_at":"2026-09-29T14:49:58.653076+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Pitch spelling and interval arithmetic decide the notes that notation, transposition and analysis tools display or play.","root_cause":"The relative-major offset for minor keys is applied three fifths sharpward instead of flatward.","sha256":"512905c494c063f7fdb72ca55197e50c6b8097bcd185437666593c42d7d40bf7","title":"Key signature size for a named tonic: minor key shifted sharpward · 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.81,"exit_code":1,"observations":[{"actual":0,"check":"oracle 0","expected":0,"passed":true},{"actual":1,"check":"oracle 1","expected":1,"passed":true},{"actual":-1,"check":"oracle 2","expected":-1,"passed":true},{"actual":6,"check":"oracle 3","expected":6,"passed":true},{"actual":0,"check":"oracle 4","expected":0,"passed":true},{"actual":-1,"check":"oracle 5","expected":-1,"passed":true},{"actual":7,"check":"oracle 6","expected":4,"passed":false},{"actual":null,"check":"oracle 7","expected":5,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"oracle 0\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"oracle 1\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"oracle 2\", \"actual\": -1, \"expected\": -1, \"passed\": true}, {\"check\": \"oracle 3\", \"actual\": 6, \"expected\": 6, \"passed\": true}, {\"check\": \"oracle 4\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"oracle 5\", \"actual\": -1, \"expected\": -1, \"passed\": true}, {\"check\": \"oracle 6\", \"actual\": 7, \"expected\": 4, \"passed\": false}, {\"check\": \"oracle 7\", \"actual\": null, \"expected\": 5, \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.089,"exit_code":1,"observations":[{"actual":0,"check":"oracle 0","expected":0,"passed":true},{"actual":1,"check":"oracle 1","expected":1,"passed":true},{"actual":-1,"check":"oracle 2","expected":-1,"passed":true},{"actual":6,"check":"oracle 3","expected":6,"passed":true},{"actual":6,"check":"oracle 4","expected":0,"passed":false},{"actual":5,"check":"oracle 5","expected":-1,"passed":false},{"actual":null,"check":"oracle 6","expected":4,"passed":false},{"actual":null,"check":"oracle 7","expected":5,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"oracle 0\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"oracle 1\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"oracle 2\", \"actual\": -1, \"expected\": -1, \"passed\": true}, {\"check\": \"oracle 3\", \"actual\": 6, \"expected\": 6, \"passed\": true}, {\"check\": \"oracle 4\", \"actual\": 6, \"expected\": 0, \"passed\": false}, {\"check\": \"oracle 5\", \"actual\": 5, \"expected\": -1, \"passed\": false}, {\"check\": \"oracle 6\", \"actual\": null, \"expected\": 4, \"passed\": false}, {\"check\": \"oracle 7\", \"actual\": null, \"expected\": 5, \"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."}}