FA-81661 / MIDI event timing / Open access
Sustain pedal note-off deferral: controller value 64 treated as pedal up · case 01
A pedal sending exactly 64 does not sustain: notes end at their note-off.
ROOT CAUSE
The pedal-down test is strict, excluding the documented threshold value 64.
VERIFIED REPAIR
Restore the pedal threshold step so that it reads `value >= 64`.
Unsuccessful approach: Treating any nonzero value as down sustains on half-pedal values below 64.
Case contract
Input time-ordered events [tick, kind, value]: kind on/off with a note number, or cc64 with a controller value (pedal down when value >= 64). A note-off while the pedal is down is deferred until the pedal goes up. Re-striking a note that is still sounding ends the previous instance at the new tick. Notes still sounding at the end end at the last event tick. Return sorted [note, start, end] triples.
Why this case matters
MIDI sequencers, file readers and synth drivers depend on exact event ordering and tick/time arithmetic.
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):
return None
down = False
sounding = {}
held = set()
done = []
last = 0
for tick, kind, value in x:
last = max(last, tick)
if kind == 'cc64':
now_down = value > 64
if down and not now_down:
for n in sorted(held):
done.append([n, sounding.pop(n), tick])
held = set()
down = now_down
elif kind == 'on':
if value in sounding:
done.append([value, sounding.pop(value), tick])
held.discard(value)
sounding[value] = tick
elif kind == 'off':
if value not in sounding:
continue
if down:
held.add(value)
else:
done.append([value, sounding.pop(value), tick])
else:
return None
for n in sorted(sounding):
done.append([n, sounding[n], last])
done.sort()
return done
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[([[0, 'on', 60], [10, 'off', 60]], [[60, 0, 10]]), ([[0, 'cc64', 127], [0, 'on', 60], [10, 'off', 60], [20, 'cc64', 0]], [[60, 0, 20]]), ([[0, 'cc64', 64], [0, 'on', 60], [10, 'off', 60], [20, 'cc64', 63]], [[60, 0, 20]]), ([[0, 'cc64', 63], [0, 'on', 60], [10, 'off', 60], [20, 'cc64', 0]], [[60, 0, 10]]), ([[0, 'cc64', 100], [0, 'on', 60], [5, 'off', 60], [8, 'on', 60], [12, 'cc64', 0], [30, 'off', 60]], [[60, 0, 8], [60, 8, 30]]), ([[0, 'cc64', 100], [0, 'on', 60], [1, 'on', 64], [5, 'off', 60], [6, 'off', 64], [8, 'on', 60], [12, 'cc64', 0]], [[60, 0, 8], [60, 8, 12], [64, 1, 12]]), ([[0, 'on', 60], [5, 'on', 60], [9, 'off', 60]], [[60, 0, 5], [60, 5, 9]]), ([[0, 'cc64', 1], [0, 'on', 60], [3, 'off', 60], [9, 'cc64', 0]], [[60, 0, 3]])], [([[0, 'cc64', 64], [0, 'on', 60], [10, 'off', 60], [20, 'cc64', 63]], [[60, 0, 20]]), ([[0, 'cc64', 63], [0, 'on', 60], [10, 'off', 60], [20, 'cc64', 0]], [[60, 0, 10]]), ([[0, 'cc64', 100], [0, 'on', 60], [1, 'on', 64], [5, 'off', 60], [6, 'off', 64], [8, 'on', 60], [12, 'cc64', 0]], [[60, 0, 8], [60, 8, 12], [64, 1, 12]]), ([[0, 'on', 60], [5, 'on', 60], [9, 'off', 60]], [[60, 0, 5], [60, 5, 9]]), ([[0, 'on', 60], [0, 'on', 64], [7, 'off', 64]], [[60, 0, 7], [64, 0, 7]]), ([[0, 'cc64', 127], [0, 'on', 60], [4, 'off', 60], [9, 'on', 62]], [[60, 0, 9], [62, 9, 9]]), ([[0, 'cc64', 1], [0, 'on', 60], [3, 'off', 60], [9, 'cc64', 0]], [[60, 0, 3]]), ([[0, 'pb', 0]], None)], [([[0, 'cc64', 64], [0, 'on', 60], [10, 'off', 60], [20, 'cc64', 63]], [[60, 0, 20]]), ([[0, 'cc64', 63], [0, 'on', 60], [10, 'off', 60], [20, 'cc64', 0]], [[60, 0, 10]]), ([[0, 'cc64', 127], [0, 'on', 60], [4, 'off', 60], [9, 'on', 62]], [[60, 0, 9], [62, 9, 9]]), ([[0, 'cc64', 1], [0, 'on', 60], [3, 'off', 60], [9, 'cc64', 0]], [[60, 0, 3]]), ([[0, 'pb', 0]], None), ([], []), ([[0, 'cc64', 127], [1, 'on', 50], [2, 'on', 52], [3, 'off', 50], [4, 'off', 52], [5, 'on', 50], [9, 'off', 50], [12, 'cc64', 0]], [[50, 1, 5], [50, 5, 12], [52, 2, 12]]), ([[0, 'cc64', 127], [1, 'on', 50], [2, 'on', 52], [3, 'off', 50], [4, 'off', 52], [5, 'on', 50], [9, 'off', 50], [12, 'cc64', 0], [15, 'on', 70], [16, 'off', 70]], [[50, 1, 5], [50, 5, 12], [52, 2, 12], [70, 15, 16]])], [([[0, 'on', 60], [10, 'off', 60]], [[60, 0, 10]]), ([[0, 'cc64', 127], [0, 'on', 60], [10, 'off', 60], [20, 'cc64', 0]], [[60, 0, 20]]), ([[0, 'cc64', 64], [0, 'on', 60], [10, 'off', 60], [20, 'cc64', 63]], [[60, 0, 20]]), ([[0, 'cc64', 63], [0, 'on', 60], [10, 'off', 60], [20, 'cc64', 0]], [[60, 0, 10]]), ([[0, 'cc64', 100], [0, 'on', 60], [5, 'off', 60], [8, 'on', 60], [12, 'cc64', 0], [30, 'off', 60]], [[60, 0, 8], [60, 8, 30]]), ([[0, 'cc64', 1], [0, 'on', 60], [3, 'off', 60], [9, 'cc64', 0]], [[60, 0, 3]]), ([[0, 'cc64', 127], [1, 'on', 50], [2, 'on', 52], [3, 'off', 50], [4, 'off', 52], [5, 'on', 50], [9, 'off', 50], [12, 'cc64', 0]], [[50, 1, 5], [50, 5, 12], [52, 2, 12]]), ([[0, 'cc64', 127], [1, 'on', 50], [2, 'on', 52], [3, 'off', 50], [4, 'off', 52], [5, 'on', 50], [9, 'off', 50], [12, 'cc64', 0], [15, 'on', 70], [16, 'off', 70]], [[50, 1, 5], [50, 5, 12], [52, 2, 12], [70, 15, 16]])], [([[0, 'on', 60], [10, 'off', 60]], [[60, 0, 10]]), ([[0, 'cc64', 127], [0, 'on', 60], [10, 'off', 60], [20, 'cc64', 0]], [[60, 0, 20]]), ([[0, 'cc64', 64], [0, 'on', 60], [10, 'off', 60], [20, 'cc64', 63]], [[60, 0, 20]]), ([[0, 'cc64', 63], [0, 'on', 60], [10, 'off', 60], [20, 'cc64', 0]], [[60, 0, 10]]), ([[0, 'cc64', 100], [0, 'on', 60], [5, 'off', 60], [8, 'on', 60], [12, 'cc64', 0], [30, 'off', 60]], [[60, 0, 8], [60, 8, 30]]), ([[0, 'cc64', 100], [0, 'on', 60], [1, 'on', 64], [5, 'off', 60], [6, 'off', 64], [8, 'on', 60], [12, 'cc64', 0]], [[60, 0, 8], [60, 8, 12], [64, 1, 12]]), ([[0, 'on', 60], [5, 'on', 60], [9, 'off', 60]], [[60, 0, 5], [60, 5, 9]]), ([[0, 'cc64', 1], [0, 'on', 60], [3, 'off', 60], [9, 'cc64', 0]], [[60, 0, 3]])]]
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| oracle 0 | [[60, 0, 10]] | [[60, 0, 10]] | Passed |
| oracle 1 | [[60, 0, 20]] | [[60, 0, 20]] | Passed |
| oracle 2 | [[60, 0, 10]] | [[60, 0, 20]] | Failed |
| oracle 3 | [[60, 0, 10]] | [[60, 0, 10]] | Passed |
| oracle 4 | [[60, 0, 8], [60, 8, 30]] | [[60, 0, 8], [60, 8, 30]] | Passed |
| oracle 5 | [[60, 0, 8], [60, 8, 12], [64, 1, 12]] | [[60, 0, 8], [60, 8, 12], [64, 1, 12]] | Passed |
| oracle 6 | [[60, 0, 5], [60, 5, 9]] | [[60, 0, 5], [60, 5, 9]] | Passed |
| oracle 7 | [[60, 0, 3]] | [[60, 0, 3]] | Passed |
SHA-256 / a7161a0da5895a2c932da38f66739248319a372801cb289bc7eff03336a1ea16
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):
return None
down = False
sounding = {}
held = set()
done = []
last = 0
for tick, kind, value in x:
last = max(last, tick)
if kind == 'cc64':
now_down = value >= 1
if down and not now_down:
for n in sorted(held):
done.append([n, sounding.pop(n), tick])
held = set()
down = now_down
elif kind == 'on':
if value in sounding:
done.append([value, sounding.pop(value), tick])
held.discard(value)
sounding[value] = tick
elif kind == 'off':
if value not in sounding:
continue
if down:
held.add(value)
else:
done.append([value, sounding.pop(value), tick])
else:
return None
for n in sorted(sounding):
done.append([n, sounding[n], last])
done.sort()
return done
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[([[0, 'on', 60], [10, 'off', 60]], [[60, 0, 10]]), ([[0, 'cc64', 127], [0, 'on', 60], [10, 'off', 60], [20, 'cc64', 0]], [[60, 0, 20]]), ([[0, 'cc64', 64], [0, 'on', 60], [10, 'off', 60], [20, 'cc64', 63]], [[60, 0, 20]]), ([[0, 'cc64', 63], [0, 'on', 60], [10, 'off', 60], [20, 'cc64', 0]], [[60, 0, 10]]), ([[0, 'cc64', 100], [0, 'on', 60], [5, 'off', 60], [8, 'on', 60], [12, 'cc64', 0], [30, 'off', 60]], [[60, 0, 8], [60, 8, 30]]), ([[0, 'cc64', 100], [0, 'on', 60], [1, 'on', 64], [5, 'off', 60], [6, 'off', 64], [8, 'on', 60], [12, 'cc64', 0]], [[60, 0, 8], [60, 8, 12], [64, 1, 12]]), ([[0, 'on', 60], [5, 'on', 60], [9, 'off', 60]], [[60, 0, 5], [60, 5, 9]]), ([[0, 'cc64', 1], [0, 'on', 60], [3, 'off', 60], [9, 'cc64', 0]], [[60, 0, 3]])], [([[0, 'cc64', 64], [0, 'on', 60], [10, 'off', 60], [20, 'cc64', 63]], [[60, 0, 20]]), ([[0, 'cc64', 63], [0, 'on', 60], [10, 'off', 60], [20, 'cc64', 0]], [[60, 0, 10]]), ([[0, 'cc64', 100], [0, 'on', 60], [1, 'on', 64], [5, 'off', 60], [6, 'off', 64], [8, 'on', 60], [12, 'cc64', 0]], [[60, 0, 8], [60, 8, 12], [64, 1, 12]]), ([[0, 'on', 60], [5, 'on', 60], [9, 'off', 60]], [[60, 0, 5], [60, 5, 9]]), ([[0, 'on', 60], [0, 'on', 64], [7, 'off', 64]], [[60, 0, 7], [64, 0, 7]]), ([[0, 'cc64', 127], [0, 'on', 60], [4, 'off', 60], [9, 'on', 62]], [[60, 0, 9], [62, 9, 9]]), ([[0, 'cc64', 1], [0, 'on', 60], [3, 'off', 60], [9, 'cc64', 0]], [[60, 0, 3]]), ([[0, 'pb', 0]], None)], [([[0, 'cc64', 64], [0, 'on', 60], [10, 'off', 60], [20, 'cc64', 63]], [[60, 0, 20]]), ([[0, 'cc64', 63], [0, 'on', 60], [10, 'off', 60], [20, 'cc64', 0]], [[60, 0, 10]]), ([[0, 'cc64', 127], [0, 'on', 60], [4, 'off', 60], [9, 'on', 62]], [[60, 0, 9], [62, 9, 9]]), ([[0, 'cc64', 1], [0, 'on', 60], [3, 'off', 60], [9, 'cc64', 0]], [[60, 0, 3]]), ([[0, 'pb', 0]], None), ([], []), ([[0, 'cc64', 127], [1, 'on', 50], [2, 'on', 52], [3, 'off', 50], [4, 'off', 52], [5, 'on', 50], [9, 'off', 50], [12, 'cc64', 0]], [[50, 1, 5], [50, 5, 12], [52, 2, 12]]), ([[0, 'cc64', 127], [1, 'on', 50], [2, 'on', 52], [3, 'off', 50], [4, 'off', 52], [5, 'on', 50], [9, 'off', 50], [12, 'cc64', 0], [15, 'on', 70], [16, 'off', 70]], [[50, 1, 5], [50, 5, 12], [52, 2, 12], [70, 15, 16]])], [([[0, 'on', 60], [10, 'off', 60]], [[60, 0, 10]]), ([[0, 'cc64', 127], [0, 'on', 60], [10, 'off', 60], [20, 'cc64', 0]], [[60, 0, 20]]), ([[0, 'cc64', 64], [0, 'on', 60], [10, 'off', 60], [20, 'cc64', 63]], [[60, 0, 20]]), ([[0, 'cc64', 63], [0, 'on', 60], [10, 'off', 60], [20, 'cc64', 0]], [[60, 0, 10]]), ([[0, 'cc64', 100], [0, 'on', 60], [5, 'off', 60], [8, 'on', 60], [12, 'cc64', 0], [30, 'off', 60]], [[60, 0, 8], [60, 8, 30]]), ([[0, 'cc64', 1], [0, 'on', 60], [3, 'off', 60], [9, 'cc64', 0]], [[60, 0, 3]]), ([[0, 'cc64', 127], [1, 'on', 50], [2, 'on', 52], [3, 'off', 50], [4, 'off', 52], [5, 'on', 50], [9, 'off', 50], [12, 'cc64', 0]], [[50, 1, 5], [50, 5, 12], [52, 2, 12]]), ([[0, 'cc64', 127], [1, 'on', 50], [2, 'on', 52], [3, 'off', 50], [4, 'off', 52], [5, 'on', 50], [9, 'off', 50], [12, 'cc64', 0], [15, 'on', 70], [16, 'off', 70]], [[50, 1, 5], [50, 5, 12], [52, 2, 12], [70, 15, 16]])], [([[0, 'on', 60], [10, 'off', 60]], [[60, 0, 10]]), ([[0, 'cc64', 127], [0, 'on', 60], [10, 'off', 60], [20, 'cc64', 0]], [[60, 0, 20]]), ([[0, 'cc64', 64], [0, 'on', 60], [10, 'off', 60], [20, 'cc64', 63]], [[60, 0, 20]]), ([[0, 'cc64', 63], [0, 'on', 60], [10, 'off', 60], [20, 'cc64', 0]], [[60, 0, 10]]), ([[0, 'cc64', 100], [0, 'on', 60], [5, 'off', 60], [8, 'on', 60], [12, 'cc64', 0], [30, 'off', 60]], [[60, 0, 8], [60, 8, 30]]), ([[0, 'cc64', 100], [0, 'on', 60], [1, 'on', 64], [5, 'off', 60], [6, 'off', 64], [8, 'on', 60], [12, 'cc64', 0]], [[60, 0, 8], [60, 8, 12], [64, 1, 12]]), ([[0, 'on', 60], [5, 'on', 60], [9, 'off', 60]], [[60, 0, 5], [60, 5, 9]]), ([[0, 'cc64', 1], [0, 'on', 60], [3, 'off', 60], [9, 'cc64', 0]], [[60, 0, 3]])]]
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| oracle 0 | [[60, 0, 10]] | [[60, 0, 10]] | Passed |
| oracle 1 | [[60, 0, 20]] | [[60, 0, 20]] | Passed |
| oracle 2 | [[60, 0, 20]] | [[60, 0, 20]] | Passed |
| oracle 3 | [[60, 0, 20]] | [[60, 0, 10]] | Failed |
| oracle 4 | [[60, 0, 8], [60, 8, 30]] | [[60, 0, 8], [60, 8, 30]] | Passed |
| oracle 5 | [[60, 0, 8], [60, 8, 12], [64, 1, 12]] | [[60, 0, 8], [60, 8, 12], [64, 1, 12]] | Passed |
| oracle 6 | [[60, 0, 5], [60, 5, 9]] | [[60, 0, 5], [60, 5, 9]] | Passed |
| oracle 7 | [[60, 0, 9]] | [[60, 0, 3]] | Failed |
SHA-256 / 96a9cd9d4b0ae7b7c337dc77a4170ec0cf2fc26d53e66e0052ee821368d7b539
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
if not isinstance(x, list):
return None
down = False
sounding = {}
held = set()
done = []
last = 0
for tick, kind, value in x:
last = max(last, tick)
if kind == 'cc64':
now_down = value >= 64
if down and not now_down:
for n in sorted(held):
done.append([n, sounding.pop(n), tick])
held = set()
down = now_down
elif kind == 'on':
if value in sounding:
done.append([value, sounding.pop(value), tick])
held.discard(value)
sounding[value] = tick
elif kind == 'off':
if value not in sounding:
continue
if down:
held.add(value)
else:
done.append([value, sounding.pop(value), tick])
else:
return None
for n in sorted(sounding):
done.append([n, sounding[n], last])
done.sort()
return done
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[([[0, 'on', 60], [10, 'off', 60]], [[60, 0, 10]]), ([[0, 'cc64', 127], [0, 'on', 60], [10, 'off', 60], [20, 'cc64', 0]], [[60, 0, 20]]), ([[0, 'cc64', 64], [0, 'on', 60], [10, 'off', 60], [20, 'cc64', 63]], [[60, 0, 20]]), ([[0, 'cc64', 63], [0, 'on', 60], [10, 'off', 60], [20, 'cc64', 0]], [[60, 0, 10]]), ([[0, 'cc64', 100], [0, 'on', 60], [5, 'off', 60], [8, 'on', 60], [12, 'cc64', 0], [30, 'off', 60]], [[60, 0, 8], [60, 8, 30]]), ([[0, 'cc64', 100], [0, 'on', 60], [1, 'on', 64], [5, 'off', 60], [6, 'off', 64], [8, 'on', 60], [12, 'cc64', 0]], [[60, 0, 8], [60, 8, 12], [64, 1, 12]]), ([[0, 'on', 60], [5, 'on', 60], [9, 'off', 60]], [[60, 0, 5], [60, 5, 9]]), ([[0, 'cc64', 1], [0, 'on', 60], [3, 'off', 60], [9, 'cc64', 0]], [[60, 0, 3]])], [([[0, 'cc64', 64], [0, 'on', 60], [10, 'off', 60], [20, 'cc64', 63]], [[60, 0, 20]]), ([[0, 'cc64', 63], [0, 'on', 60], [10, 'off', 60], [20, 'cc64', 0]], [[60, 0, 10]]), ([[0, 'cc64', 100], [0, 'on', 60], [1, 'on', 64], [5, 'off', 60], [6, 'off', 64], [8, 'on', 60], [12, 'cc64', 0]], [[60, 0, 8], [60, 8, 12], [64, 1, 12]]), ([[0, 'on', 60], [5, 'on', 60], [9, 'off', 60]], [[60, 0, 5], [60, 5, 9]]), ([[0, 'on', 60], [0, 'on', 64], [7, 'off', 64]], [[60, 0, 7], [64, 0, 7]]), ([[0, 'cc64', 127], [0, 'on', 60], [4, 'off', 60], [9, 'on', 62]], [[60, 0, 9], [62, 9, 9]]), ([[0, 'cc64', 1], [0, 'on', 60], [3, 'off', 60], [9, 'cc64', 0]], [[60, 0, 3]]), ([[0, 'pb', 0]], None)], [([[0, 'cc64', 64], [0, 'on', 60], [10, 'off', 60], [20, 'cc64', 63]], [[60, 0, 20]]), ([[0, 'cc64', 63], [0, 'on', 60], [10, 'off', 60], [20, 'cc64', 0]], [[60, 0, 10]]), ([[0, 'cc64', 127], [0, 'on', 60], [4, 'off', 60], [9, 'on', 62]], [[60, 0, 9], [62, 9, 9]]), ([[0, 'cc64', 1], [0, 'on', 60], [3, 'off', 60], [9, 'cc64', 0]], [[60, 0, 3]]), ([[0, 'pb', 0]], None), ([], []), ([[0, 'cc64', 127], [1, 'on', 50], [2, 'on', 52], [3, 'off', 50], [4, 'off', 52], [5, 'on', 50], [9, 'off', 50], [12, 'cc64', 0]], [[50, 1, 5], [50, 5, 12], [52, 2, 12]]), ([[0, 'cc64', 127], [1, 'on', 50], [2, 'on', 52], [3, 'off', 50], [4, 'off', 52], [5, 'on', 50], [9, 'off', 50], [12, 'cc64', 0], [15, 'on', 70], [16, 'off', 70]], [[50, 1, 5], [50, 5, 12], [52, 2, 12], [70, 15, 16]])], [([[0, 'on', 60], [10, 'off', 60]], [[60, 0, 10]]), ([[0, 'cc64', 127], [0, 'on', 60], [10, 'off', 60], [20, 'cc64', 0]], [[60, 0, 20]]), ([[0, 'cc64', 64], [0, 'on', 60], [10, 'off', 60], [20, 'cc64', 63]], [[60, 0, 20]]), ([[0, 'cc64', 63], [0, 'on', 60], [10, 'off', 60], [20, 'cc64', 0]], [[60, 0, 10]]), ([[0, 'cc64', 100], [0, 'on', 60], [5, 'off', 60], [8, 'on', 60], [12, 'cc64', 0], [30, 'off', 60]], [[60, 0, 8], [60, 8, 30]]), ([[0, 'cc64', 1], [0, 'on', 60], [3, 'off', 60], [9, 'cc64', 0]], [[60, 0, 3]]), ([[0, 'cc64', 127], [1, 'on', 50], [2, 'on', 52], [3, 'off', 50], [4, 'off', 52], [5, 'on', 50], [9, 'off', 50], [12, 'cc64', 0]], [[50, 1, 5], [50, 5, 12], [52, 2, 12]]), ([[0, 'cc64', 127], [1, 'on', 50], [2, 'on', 52], [3, 'off', 50], [4, 'off', 52], [5, 'on', 50], [9, 'off', 50], [12, 'cc64', 0], [15, 'on', 70], [16, 'off', 70]], [[50, 1, 5], [50, 5, 12], [52, 2, 12], [70, 15, 16]])], [([[0, 'on', 60], [10, 'off', 60]], [[60, 0, 10]]), ([[0, 'cc64', 127], [0, 'on', 60], [10, 'off', 60], [20, 'cc64', 0]], [[60, 0, 20]]), ([[0, 'cc64', 64], [0, 'on', 60], [10, 'off', 60], [20, 'cc64', 63]], [[60, 0, 20]]), ([[0, 'cc64', 63], [0, 'on', 60], [10, 'off', 60], [20, 'cc64', 0]], [[60, 0, 10]]), ([[0, 'cc64', 100], [0, 'on', 60], [5, 'off', 60], [8, 'on', 60], [12, 'cc64', 0], [30, 'off', 60]], [[60, 0, 8], [60, 8, 30]]), ([[0, 'cc64', 100], [0, 'on', 60], [1, 'on', 64], [5, 'off', 60], [6, 'off', 64], [8, 'on', 60], [12, 'cc64', 0]], [[60, 0, 8], [60, 8, 12], [64, 1, 12]]), ([[0, 'on', 60], [5, 'on', 60], [9, 'off', 60]], [[60, 0, 5], [60, 5, 9]]), ([[0, 'cc64', 1], [0, 'on', 60], [3, 'off', 60], [9, 'cc64', 0]], [[60, 0, 3]])]]
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| oracle 0 | [[60, 0, 10]] | [[60, 0, 10]] | Passed |
| oracle 1 | [[60, 0, 20]] | [[60, 0, 20]] | Passed |
| oracle 2 | [[60, 0, 20]] | [[60, 0, 20]] | Passed |
| oracle 3 | [[60, 0, 10]] | [[60, 0, 10]] | Passed |
| oracle 4 | [[60, 0, 8], [60, 8, 30]] | [[60, 0, 8], [60, 8, 30]] | Passed |
| oracle 5 | [[60, 0, 8], [60, 8, 12], [64, 1, 12]] | [[60, 0, 8], [60, 8, 12], [64, 1, 12]] | Passed |
| oracle 6 | [[60, 0, 5], [60, 5, 9]] | [[60, 0, 5], [60, 5, 9]] | Passed |
| oracle 7 | [[60, 0, 3]] | [[60, 0, 3]] | Passed |
SHA-256 / 0837c05d163bfb87e999fa8e74b11d91f8df1775f76b2c613575c8bf534b6c9c
Verification & scope
A deterministic bounded teaching model with a stipulated toy contract; it is not a complete Standard MIDI File or MIDI 1.0/2.0 implementation. 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:05.070608+00:00.
Case digest / e87edb163829f656171f03d688241978b198a872c735eb1389495f7cfca4eac3