FAILURE MAP
← Case archive

FA-81211 / Music interval and transposition theory / Open access

Parallel fifths and octaves between two voices: contrary octaves by leap flagged as parallel · case 01

Contrary motion from an octave to a compound octave (C5 over C4 to G5 over G3) is reported as parallel octaves.

Verified by executionVariant 1 · 8 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The direction test exempts contrary leaps that differ by exactly an octave from the contrary-motion rule.

THE FAILURE

The direction test exempts contrary leaps that differ by exactly an octave from the contrary-motion rule.

Unsuccessful approach: Excusing only contrary moves with an octave-sized upper leap still reports contrary compound octaves.

Case contract

Input [upper, lower], equal-length lists of MIDI pitches. For each adjacent pair of positions i, i+1 report [i, "P5"] or [i, "P8"] when the interval (upper - lower) mod 12 is 7 or 0 at both positions (the same class), both voices move (no repeated note in either), and they move in the same direction. Return the list in order; unequal lengths return None.

Why this case matters

Counterpoint checkers and voice-leading validators flag forbidden parallel perfect intervals.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    if not isinstance(x, list) or len(x) != 2:
        return None
    up, lo = x
    if len(up) != len(lo):
        return None
    out = []
    for i in range(len(up) - 1):
        a = (up[i] - lo[i]) % 12
        b = (up[i + 1] - lo[i + 1]) % 12
        mu = up[i + 1] - up[i]
        ml = lo[i + 1] - lo[i]
        if a != b or a not in (0, 7):
            continue
        if mu == 0 or ml == 0:
            continue
        if mu * ml < 0 and abs(mu - ml) != 12:
            continue
        out.append([i, 'P8' if a == 0 else 'P5'])
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[([[67, 69], [60, 62]], [[0, 'P5']]), ([[72, 74], [60, 62]], [[0, 'P8']]), ([[79, 81], [60, 62]], [[0, 'P5']]), ([[67, 67], [60, 60]], []), ([[67, 69], [60, 60]], []), ([[72, 67], [60, 72]], []), ([[72, 79], [60, 55]], []), ([[60, 72], [48, 36]], [])], [([[67, 67], [60, 60]], []), ([[67, 69], [60, 60]], []), ([[72, 67], [60, 72]], []), ([[67, 72], [60, 65]], [[0, 'P5']]), ([[72, 79], [60, 60]], []), ([[60, 62], [67, 69]], []), ([[79, 74], [60, 67]], []), ([[60, 72], [48, 36]], [])], [([[72, 79], [60, 55]], []), ([[67, 72], [60, 65]], [[0, 'P5']]), ([[72, 79], [60, 60]], []), ([[60, 62], [67, 69]], []), ([[55, 57], [60, 62]], [[0, 'P5']]), ([[67, 69, 71], [60, 62, 64]], [[0, 'P5'], [1, 'P5']]), ([[67, 65], [60, 58]], [[0, 'P5']]), ([[60, 72], [48, 36]], [])], [([[55, 57], [60, 62]], [[0, 'P5']]), ([[67, 69, 71], [60, 62, 64]], [[0, 'P5'], [1, 'P5']]), ([[67, 65], [60, 58]], [[0, 'P5']]), ([[72, 72, 74], [60, 60, 62]], [[1, 'P8']]), ([[67, 72], [60, 60]], []), ([[64, 65], [60, 62]], []), ([[79, 74], [60, 67]], []), ([[60, 72], [48, 36]], [])], [([[72, 79], [60, 55]], []), ([[72, 72, 74], [60, 60, 62]], [[1, 'P8']]), ([[67, 72], [60, 60]], []), ([[64, 65], [60, 62]], []), ([[67], [60]], []), ([[], []], []), ([[67, 69], [60]], None), ([[60, 72], [48, 36]], [])]]
for i, (args, expected) in enumerate(fixtures[N-1]):
    check("oracle %d" % i, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
oracle 0[[0, 'P5']][[0, 'P5']]Passed
oracle 1[[0, 'P8']][[0, 'P8']]Passed
oracle 2[[0, 'P5']][[0, 'P5']]Passed
oracle 3[][]Passed
oracle 4[][]Passed
oracle 5[][]Passed
oracle 6[[0, 'P8']][]Failed
oracle 7[][]Passed

SHA-256 / bb0930e81e7740cfaa0a5a4c5e15d7000dbac51fa990fc6cfe162240b09f3c3b

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    if not isinstance(x, list) or len(x) != 2:
        return None
    up, lo = x
    if len(up) != len(lo):
        return None
    out = []
    for i in range(len(up) - 1):
        a = (up[i] - lo[i]) % 12
        b = (up[i + 1] - lo[i + 1]) % 12
        mu = up[i + 1] - up[i]
        ml = lo[i + 1] - lo[i]
        if a != b or a not in (0, 7):
            continue
        if mu == 0 or ml == 0:
            continue
        if mu != ml and (mu > 0) != (ml > 0) and abs(mu) < 12:
            continue
        out.append([i, 'P8' if a == 0 else 'P5'])
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[([[67, 69], [60, 62]], [[0, 'P5']]), ([[72, 74], [60, 62]], [[0, 'P8']]), ([[79, 81], [60, 62]], [[0, 'P5']]), ([[67, 67], [60, 60]], []), ([[67, 69], [60, 60]], []), ([[72, 67], [60, 72]], []), ([[72, 79], [60, 55]], []), ([[60, 72], [48, 36]], [])], [([[67, 67], [60, 60]], []), ([[67, 69], [60, 60]], []), ([[72, 67], [60, 72]], []), ([[67, 72], [60, 65]], [[0, 'P5']]), ([[72, 79], [60, 60]], []), ([[60, 62], [67, 69]], []), ([[79, 74], [60, 67]], []), ([[60, 72], [48, 36]], [])], [([[72, 79], [60, 55]], []), ([[67, 72], [60, 65]], [[0, 'P5']]), ([[72, 79], [60, 60]], []), ([[60, 62], [67, 69]], []), ([[55, 57], [60, 62]], [[0, 'P5']]), ([[67, 69, 71], [60, 62, 64]], [[0, 'P5'], [1, 'P5']]), ([[67, 65], [60, 58]], [[0, 'P5']]), ([[60, 72], [48, 36]], [])], [([[55, 57], [60, 62]], [[0, 'P5']]), ([[67, 69, 71], [60, 62, 64]], [[0, 'P5'], [1, 'P5']]), ([[67, 65], [60, 58]], [[0, 'P5']]), ([[72, 72, 74], [60, 60, 62]], [[1, 'P8']]), ([[67, 72], [60, 60]], []), ([[64, 65], [60, 62]], []), ([[79, 74], [60, 67]], []), ([[60, 72], [48, 36]], [])], [([[72, 79], [60, 55]], []), ([[72, 72, 74], [60, 60, 62]], [[1, 'P8']]), ([[67, 72], [60, 60]], []), ([[64, 65], [60, 62]], []), ([[67], [60]], []), ([[], []], []), ([[67, 69], [60]], None), ([[60, 72], [48, 36]], [])]]
for i, (args, expected) in enumerate(fixtures[N-1]):
    check("oracle %d" % i, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
oracle 0[[0, 'P5']][[0, 'P5']]Passed
oracle 1[[0, 'P8']][[0, 'P8']]Passed
oracle 2[[0, 'P5']][[0, 'P5']]Passed
oracle 3[][]Passed
oracle 4[][]Passed
oracle 5[][]Passed
oracle 6[][]Passed
oracle 7[[0, 'P8']][]Failed

SHA-256 / cd009d40d7d2bb90c4ec1afc5e0b34f8130dd4c94244c9515f923f9956c09767

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 8 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.

Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.

Member access is invitation-based. Sign in with your invited account to inspect the repair.

Sign in to the archive ↗

Verification & scope

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.

Observations recorded using Python 3.12.14 at 2026-09-29T14:50:00.926292+00:00.

Case digest / 2a227dfbd9be706e88ec444d999df609c37db65ec664829582baee367274482d