FA-81616 / MIDI event timing / Open access
Format 1 to format 0 track merge: end-of-track placed before the last event · case 01
When end-of-track markers precede the last merged event, the final delta goes negative.
ROOT CAUSE
The final end time is not raised to at least the last emitted event.
VERIFIED REPAIR
Restore the end marker floor step so that it reads `end = max(end, prev)`.
Unsuccessful approach: Adding a tick of padding changes every correctly placed end-of-track.
Case contract
Input a list of tracks, each a list of [delta, event]. The event "eot" marks end of track and is not copied. Merge all events by absolute time; ties go to the lower track index, then original order. Output [delta, event] pairs followed by one final [delta, "eot"] at the latest end-of-track or last event time.
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
events = []
end = 0
for ti, track in enumerate(x):
tick = 0
for seq, (delta, ev) in enumerate(track):
tick += delta
if ev == 'eot':
end = max(end, tick)
continue
events.append((tick, ti, seq, ev))
events.sort()
out = []
prev = 0
for tick, ti, seq, ev in events:
out.append([tick - prev, ev])
prev = tick
out.append([end - prev, 'eot'])
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[([[[0, 'a'], [10, 'b'], [0, 'eot']], [[5, 'c'], [20, 'eot']]], [[0, 'a'], [5, 'c'], [5, 'b'], [15, 'eot']]), ([[[0, 'tempo'], [0, 'eot']], [[0, 'n1'], [480, 'n2'], [0, 'eot']]], [[0, 'tempo'], [0, 'n1'], [480, 'n2'], [0, 'eot']]), ([[[10, 'z'], [0, 'eot']], [[10, 'a'], [0, 'eot']]], [[10, 'z'], [0, 'a'], [0, 'eot']]), ([[[0, 'x'], [100, 'eot']], [[50, 'y'], [0, 'eot']]], [[0, 'x'], [50, 'y'], [50, 'eot']]), ([[[0, 'x'], [5, 'eot']], [[50, 'y'], [0, 'eot']]], [[0, 'x'], [50, 'y'], [0, 'eot']]), ([[[3, 'p'], [3, 'q']], [[4, 'r']]], [[3, 'p'], [1, 'r'], [2, 'q'], [0, 'eot']]), ([[[0, 'eot']]], [[0, 'eot']]), ([], [[0, 'eot']])], [([[[0, 'tempo'], [0, 'eot']], [[0, 'n1'], [480, 'n2'], [0, 'eot']]], [[0, 'tempo'], [0, 'n1'], [480, 'n2'], [0, 'eot']]), ([[[0, 'x'], [100, 'eot']], [[50, 'y'], [0, 'eot']]], [[0, 'x'], [50, 'y'], [50, 'eot']]), ([[[0, 'x'], [5, 'eot']], [[50, 'y'], [0, 'eot']]], [[0, 'x'], [50, 'y'], [0, 'eot']]), ([[[3, 'p'], [3, 'q']], [[4, 'r']]], [[3, 'p'], [1, 'r'], [2, 'q'], [0, 'eot']]), ([[[0, 'eot']]], [[0, 'eot']]), ([], [[0, 'eot']]), ([[[5, 'm'], [5, 'n'], [0, 'eot']], [[5, 'k'], [0, 'eot']], [[7, 'j'], [30, 'eot']]], [[5, 'm'], [0, 'k'], [2, 'j'], [3, 'n'], [27, 'eot']]), ([[[0, 'b'], [0, 'a'], [0, 'eot']], [[0, 'c'], [0, 'eot']]], [[0, 'b'], [0, 'a'], [0, 'c'], [0, 'eot']])], [([[[0, 'a'], [10, 'b'], [0, 'eot']], [[5, 'c'], [20, 'eot']]], [[0, 'a'], [5, 'c'], [5, 'b'], [15, 'eot']]), ([[[10, 'z'], [0, 'eot']], [[10, 'a'], [0, 'eot']]], [[10, 'z'], [0, 'a'], [0, 'eot']]), ([[[3, 'p'], [3, 'q']], [[4, 'r']]], [[3, 'p'], [1, 'r'], [2, 'q'], [0, 'eot']]), ([[[0, 'eot']]], [[0, 'eot']]), ([], [[0, 'eot']]), ([[[5, 'm'], [5, 'n'], [0, 'eot']], [[5, 'k'], [0, 'eot']], [[7, 'j'], [30, 'eot']]], [[5, 'm'], [0, 'k'], [2, 'j'], [3, 'n'], [27, 'eot']]), ([[[0, 'b'], [0, 'a'], [0, 'eot']], [[0, 'c'], [0, 'eot']]], [[0, 'b'], [0, 'a'], [0, 'c'], [0, 'eot']]), ([[[20, 'late'], [0, 'eot']], [[1, 'early'], [2, 'eot']]], [[1, 'early'], [19, 'late'], [0, 'eot']])], [([[[0, 'a'], [10, 'b'], [0, 'eot']], [[5, 'c'], [20, 'eot']]], [[0, 'a'], [5, 'c'], [5, 'b'], [15, 'eot']]), ([[[0, 'tempo'], [0, 'eot']], [[0, 'n1'], [480, 'n2'], [0, 'eot']]], [[0, 'tempo'], [0, 'n1'], [480, 'n2'], [0, 'eot']]), ([[[10, 'z'], [0, 'eot']], [[10, 'a'], [0, 'eot']]], [[10, 'z'], [0, 'a'], [0, 'eot']]), ([[[0, 'x'], [100, 'eot']], [[50, 'y'], [0, 'eot']]], [[0, 'x'], [50, 'y'], [50, 'eot']]), ([[[3, 'p'], [3, 'q']], [[4, 'r']]], [[3, 'p'], [1, 'r'], [2, 'q'], [0, 'eot']]), ([[[0, 'eot']]], [[0, 'eot']]), ([[[0, 'b'], [0, 'a'], [0, 'eot']], [[0, 'c'], [0, 'eot']]], [[0, 'b'], [0, 'a'], [0, 'c'], [0, 'eot']]), ([[[20, 'late'], [0, 'eot']], [[1, 'early'], [2, 'eot']]], [[1, 'early'], [19, 'late'], [0, 'eot']])], [([[[0, 'tempo'], [0, 'eot']], [[0, 'n1'], [480, 'n2'], [0, 'eot']]], [[0, 'tempo'], [0, 'n1'], [480, 'n2'], [0, 'eot']]), ([[[10, 'z'], [0, 'eot']], [[10, 'a'], [0, 'eot']]], [[10, 'z'], [0, 'a'], [0, 'eot']]), ([[[0, 'x'], [100, 'eot']], [[50, 'y'], [0, 'eot']]], [[0, 'x'], [50, 'y'], [50, 'eot']]), ([[[0, 'x'], [5, 'eot']], [[50, 'y'], [0, 'eot']]], [[0, 'x'], [50, 'y'], [0, 'eot']]), ([[[3, 'p'], [3, 'q']], [[4, 'r']]], [[3, 'p'], [1, 'r'], [2, 'q'], [0, 'eot']]), ([[[0, 'eot']]], [[0, 'eot']]), ([], [[0, 'eot']]), ([[[5, 'm'], [5, 'n'], [0, 'eot']], [[5, 'k'], [0, 'eot']], [[7, 'j'], [30, 'eot']]], [[5, 'm'], [0, 'k'], [2, 'j'], [3, 'n'], [27, 'eot']])]]
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 | [[0, 'a'], [5, 'c'], [5, 'b'], [15, 'eot']] | [[0, 'a'], [5, 'c'], [5, 'b'], [15, 'eot']] | Passed |
| oracle 1 | [[0, 'tempo'], [0, 'n1'], [480, 'n2'], [0, 'eot']] | [[0, 'tempo'], [0, 'n1'], [480, 'n2'], [0, 'eot']] | Passed |
| oracle 2 | [[10, 'z'], [0, 'a'], [0, 'eot']] | [[10, 'z'], [0, 'a'], [0, 'eot']] | Passed |
| oracle 3 | [[0, 'x'], [50, 'y'], [50, 'eot']] | [[0, 'x'], [50, 'y'], [50, 'eot']] | Passed |
| oracle 4 | [[0, 'x'], [50, 'y'], [0, 'eot']] | [[0, 'x'], [50, 'y'], [0, 'eot']] | Passed |
| oracle 5 | [[3, 'p'], [1, 'r'], [2, 'q'], [-6, 'eot']] | [[3, 'p'], [1, 'r'], [2, 'q'], [0, 'eot']] | Failed |
| oracle 6 | [[0, 'eot']] | [[0, 'eot']] | Passed |
| oracle 7 | [[0, 'eot']] | [[0, 'eot']] | Passed |
SHA-256 / 74314c7681eecc66870af85b2b3f473d284cc73959fb23100409c965df3600a5
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
events = []
end = 0
for ti, track in enumerate(x):
tick = 0
for seq, (delta, ev) in enumerate(track):
tick += delta
if ev == 'eot':
end = max(end, tick)
continue
events.append((tick, ti, seq, ev))
events.sort()
out = []
prev = 0
for tick, ti, seq, ev in events:
out.append([tick - prev, ev])
prev = tick
end = max(end, prev) + 1
out.append([end - prev, 'eot'])
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[([[[0, 'a'], [10, 'b'], [0, 'eot']], [[5, 'c'], [20, 'eot']]], [[0, 'a'], [5, 'c'], [5, 'b'], [15, 'eot']]), ([[[0, 'tempo'], [0, 'eot']], [[0, 'n1'], [480, 'n2'], [0, 'eot']]], [[0, 'tempo'], [0, 'n1'], [480, 'n2'], [0, 'eot']]), ([[[10, 'z'], [0, 'eot']], [[10, 'a'], [0, 'eot']]], [[10, 'z'], [0, 'a'], [0, 'eot']]), ([[[0, 'x'], [100, 'eot']], [[50, 'y'], [0, 'eot']]], [[0, 'x'], [50, 'y'], [50, 'eot']]), ([[[0, 'x'], [5, 'eot']], [[50, 'y'], [0, 'eot']]], [[0, 'x'], [50, 'y'], [0, 'eot']]), ([[[3, 'p'], [3, 'q']], [[4, 'r']]], [[3, 'p'], [1, 'r'], [2, 'q'], [0, 'eot']]), ([[[0, 'eot']]], [[0, 'eot']]), ([], [[0, 'eot']])], [([[[0, 'tempo'], [0, 'eot']], [[0, 'n1'], [480, 'n2'], [0, 'eot']]], [[0, 'tempo'], [0, 'n1'], [480, 'n2'], [0, 'eot']]), ([[[0, 'x'], [100, 'eot']], [[50, 'y'], [0, 'eot']]], [[0, 'x'], [50, 'y'], [50, 'eot']]), ([[[0, 'x'], [5, 'eot']], [[50, 'y'], [0, 'eot']]], [[0, 'x'], [50, 'y'], [0, 'eot']]), ([[[3, 'p'], [3, 'q']], [[4, 'r']]], [[3, 'p'], [1, 'r'], [2, 'q'], [0, 'eot']]), ([[[0, 'eot']]], [[0, 'eot']]), ([], [[0, 'eot']]), ([[[5, 'm'], [5, 'n'], [0, 'eot']], [[5, 'k'], [0, 'eot']], [[7, 'j'], [30, 'eot']]], [[5, 'm'], [0, 'k'], [2, 'j'], [3, 'n'], [27, 'eot']]), ([[[0, 'b'], [0, 'a'], [0, 'eot']], [[0, 'c'], [0, 'eot']]], [[0, 'b'], [0, 'a'], [0, 'c'], [0, 'eot']])], [([[[0, 'a'], [10, 'b'], [0, 'eot']], [[5, 'c'], [20, 'eot']]], [[0, 'a'], [5, 'c'], [5, 'b'], [15, 'eot']]), ([[[10, 'z'], [0, 'eot']], [[10, 'a'], [0, 'eot']]], [[10, 'z'], [0, 'a'], [0, 'eot']]), ([[[3, 'p'], [3, 'q']], [[4, 'r']]], [[3, 'p'], [1, 'r'], [2, 'q'], [0, 'eot']]), ([[[0, 'eot']]], [[0, 'eot']]), ([], [[0, 'eot']]), ([[[5, 'm'], [5, 'n'], [0, 'eot']], [[5, 'k'], [0, 'eot']], [[7, 'j'], [30, 'eot']]], [[5, 'm'], [0, 'k'], [2, 'j'], [3, 'n'], [27, 'eot']]), ([[[0, 'b'], [0, 'a'], [0, 'eot']], [[0, 'c'], [0, 'eot']]], [[0, 'b'], [0, 'a'], [0, 'c'], [0, 'eot']]), ([[[20, 'late'], [0, 'eot']], [[1, 'early'], [2, 'eot']]], [[1, 'early'], [19, 'late'], [0, 'eot']])], [([[[0, 'a'], [10, 'b'], [0, 'eot']], [[5, 'c'], [20, 'eot']]], [[0, 'a'], [5, 'c'], [5, 'b'], [15, 'eot']]), ([[[0, 'tempo'], [0, 'eot']], [[0, 'n1'], [480, 'n2'], [0, 'eot']]], [[0, 'tempo'], [0, 'n1'], [480, 'n2'], [0, 'eot']]), ([[[10, 'z'], [0, 'eot']], [[10, 'a'], [0, 'eot']]], [[10, 'z'], [0, 'a'], [0, 'eot']]), ([[[0, 'x'], [100, 'eot']], [[50, 'y'], [0, 'eot']]], [[0, 'x'], [50, 'y'], [50, 'eot']]), ([[[3, 'p'], [3, 'q']], [[4, 'r']]], [[3, 'p'], [1, 'r'], [2, 'q'], [0, 'eot']]), ([[[0, 'eot']]], [[0, 'eot']]), ([[[0, 'b'], [0, 'a'], [0, 'eot']], [[0, 'c'], [0, 'eot']]], [[0, 'b'], [0, 'a'], [0, 'c'], [0, 'eot']]), ([[[20, 'late'], [0, 'eot']], [[1, 'early'], [2, 'eot']]], [[1, 'early'], [19, 'late'], [0, 'eot']])], [([[[0, 'tempo'], [0, 'eot']], [[0, 'n1'], [480, 'n2'], [0, 'eot']]], [[0, 'tempo'], [0, 'n1'], [480, 'n2'], [0, 'eot']]), ([[[10, 'z'], [0, 'eot']], [[10, 'a'], [0, 'eot']]], [[10, 'z'], [0, 'a'], [0, 'eot']]), ([[[0, 'x'], [100, 'eot']], [[50, 'y'], [0, 'eot']]], [[0, 'x'], [50, 'y'], [50, 'eot']]), ([[[0, 'x'], [5, 'eot']], [[50, 'y'], [0, 'eot']]], [[0, 'x'], [50, 'y'], [0, 'eot']]), ([[[3, 'p'], [3, 'q']], [[4, 'r']]], [[3, 'p'], [1, 'r'], [2, 'q'], [0, 'eot']]), ([[[0, 'eot']]], [[0, 'eot']]), ([], [[0, 'eot']]), ([[[5, 'm'], [5, 'n'], [0, 'eot']], [[5, 'k'], [0, 'eot']], [[7, 'j'], [30, 'eot']]], [[5, 'm'], [0, 'k'], [2, 'j'], [3, 'n'], [27, 'eot']])]]
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 | [[0, 'a'], [5, 'c'], [5, 'b'], [16, 'eot']] | [[0, 'a'], [5, 'c'], [5, 'b'], [15, 'eot']] | Failed |
| oracle 1 | [[0, 'tempo'], [0, 'n1'], [480, 'n2'], [1, 'eot']] | [[0, 'tempo'], [0, 'n1'], [480, 'n2'], [0, 'eot']] | Failed |
| oracle 2 | [[10, 'z'], [0, 'a'], [1, 'eot']] | [[10, 'z'], [0, 'a'], [0, 'eot']] | Failed |
| oracle 3 | [[0, 'x'], [50, 'y'], [51, 'eot']] | [[0, 'x'], [50, 'y'], [50, 'eot']] | Failed |
| oracle 4 | [[0, 'x'], [50, 'y'], [1, 'eot']] | [[0, 'x'], [50, 'y'], [0, 'eot']] | Failed |
| oracle 5 | [[3, 'p'], [1, 'r'], [2, 'q'], [1, 'eot']] | [[3, 'p'], [1, 'r'], [2, 'q'], [0, 'eot']] | Failed |
| oracle 6 | [[1, 'eot']] | [[0, 'eot']] | Failed |
| oracle 7 | [[1, 'eot']] | [[0, 'eot']] | Failed |
SHA-256 / f7e0491965b9bd2c8fb2ddda71c79d031fe7d4c034a62137c434f83dd5d140eb
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
events = []
end = 0
for ti, track in enumerate(x):
tick = 0
for seq, (delta, ev) in enumerate(track):
tick += delta
if ev == 'eot':
end = max(end, tick)
continue
events.append((tick, ti, seq, ev))
events.sort()
out = []
prev = 0
for tick, ti, seq, ev in events:
out.append([tick - prev, ev])
prev = tick
end = max(end, prev)
out.append([end - prev, 'eot'])
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[([[[0, 'a'], [10, 'b'], [0, 'eot']], [[5, 'c'], [20, 'eot']]], [[0, 'a'], [5, 'c'], [5, 'b'], [15, 'eot']]), ([[[0, 'tempo'], [0, 'eot']], [[0, 'n1'], [480, 'n2'], [0, 'eot']]], [[0, 'tempo'], [0, 'n1'], [480, 'n2'], [0, 'eot']]), ([[[10, 'z'], [0, 'eot']], [[10, 'a'], [0, 'eot']]], [[10, 'z'], [0, 'a'], [0, 'eot']]), ([[[0, 'x'], [100, 'eot']], [[50, 'y'], [0, 'eot']]], [[0, 'x'], [50, 'y'], [50, 'eot']]), ([[[0, 'x'], [5, 'eot']], [[50, 'y'], [0, 'eot']]], [[0, 'x'], [50, 'y'], [0, 'eot']]), ([[[3, 'p'], [3, 'q']], [[4, 'r']]], [[3, 'p'], [1, 'r'], [2, 'q'], [0, 'eot']]), ([[[0, 'eot']]], [[0, 'eot']]), ([], [[0, 'eot']])], [([[[0, 'tempo'], [0, 'eot']], [[0, 'n1'], [480, 'n2'], [0, 'eot']]], [[0, 'tempo'], [0, 'n1'], [480, 'n2'], [0, 'eot']]), ([[[0, 'x'], [100, 'eot']], [[50, 'y'], [0, 'eot']]], [[0, 'x'], [50, 'y'], [50, 'eot']]), ([[[0, 'x'], [5, 'eot']], [[50, 'y'], [0, 'eot']]], [[0, 'x'], [50, 'y'], [0, 'eot']]), ([[[3, 'p'], [3, 'q']], [[4, 'r']]], [[3, 'p'], [1, 'r'], [2, 'q'], [0, 'eot']]), ([[[0, 'eot']]], [[0, 'eot']]), ([], [[0, 'eot']]), ([[[5, 'm'], [5, 'n'], [0, 'eot']], [[5, 'k'], [0, 'eot']], [[7, 'j'], [30, 'eot']]], [[5, 'm'], [0, 'k'], [2, 'j'], [3, 'n'], [27, 'eot']]), ([[[0, 'b'], [0, 'a'], [0, 'eot']], [[0, 'c'], [0, 'eot']]], [[0, 'b'], [0, 'a'], [0, 'c'], [0, 'eot']])], [([[[0, 'a'], [10, 'b'], [0, 'eot']], [[5, 'c'], [20, 'eot']]], [[0, 'a'], [5, 'c'], [5, 'b'], [15, 'eot']]), ([[[10, 'z'], [0, 'eot']], [[10, 'a'], [0, 'eot']]], [[10, 'z'], [0, 'a'], [0, 'eot']]), ([[[3, 'p'], [3, 'q']], [[4, 'r']]], [[3, 'p'], [1, 'r'], [2, 'q'], [0, 'eot']]), ([[[0, 'eot']]], [[0, 'eot']]), ([], [[0, 'eot']]), ([[[5, 'm'], [5, 'n'], [0, 'eot']], [[5, 'k'], [0, 'eot']], [[7, 'j'], [30, 'eot']]], [[5, 'm'], [0, 'k'], [2, 'j'], [3, 'n'], [27, 'eot']]), ([[[0, 'b'], [0, 'a'], [0, 'eot']], [[0, 'c'], [0, 'eot']]], [[0, 'b'], [0, 'a'], [0, 'c'], [0, 'eot']]), ([[[20, 'late'], [0, 'eot']], [[1, 'early'], [2, 'eot']]], [[1, 'early'], [19, 'late'], [0, 'eot']])], [([[[0, 'a'], [10, 'b'], [0, 'eot']], [[5, 'c'], [20, 'eot']]], [[0, 'a'], [5, 'c'], [5, 'b'], [15, 'eot']]), ([[[0, 'tempo'], [0, 'eot']], [[0, 'n1'], [480, 'n2'], [0, 'eot']]], [[0, 'tempo'], [0, 'n1'], [480, 'n2'], [0, 'eot']]), ([[[10, 'z'], [0, 'eot']], [[10, 'a'], [0, 'eot']]], [[10, 'z'], [0, 'a'], [0, 'eot']]), ([[[0, 'x'], [100, 'eot']], [[50, 'y'], [0, 'eot']]], [[0, 'x'], [50, 'y'], [50, 'eot']]), ([[[3, 'p'], [3, 'q']], [[4, 'r']]], [[3, 'p'], [1, 'r'], [2, 'q'], [0, 'eot']]), ([[[0, 'eot']]], [[0, 'eot']]), ([[[0, 'b'], [0, 'a'], [0, 'eot']], [[0, 'c'], [0, 'eot']]], [[0, 'b'], [0, 'a'], [0, 'c'], [0, 'eot']]), ([[[20, 'late'], [0, 'eot']], [[1, 'early'], [2, 'eot']]], [[1, 'early'], [19, 'late'], [0, 'eot']])], [([[[0, 'tempo'], [0, 'eot']], [[0, 'n1'], [480, 'n2'], [0, 'eot']]], [[0, 'tempo'], [0, 'n1'], [480, 'n2'], [0, 'eot']]), ([[[10, 'z'], [0, 'eot']], [[10, 'a'], [0, 'eot']]], [[10, 'z'], [0, 'a'], [0, 'eot']]), ([[[0, 'x'], [100, 'eot']], [[50, 'y'], [0, 'eot']]], [[0, 'x'], [50, 'y'], [50, 'eot']]), ([[[0, 'x'], [5, 'eot']], [[50, 'y'], [0, 'eot']]], [[0, 'x'], [50, 'y'], [0, 'eot']]), ([[[3, 'p'], [3, 'q']], [[4, 'r']]], [[3, 'p'], [1, 'r'], [2, 'q'], [0, 'eot']]), ([[[0, 'eot']]], [[0, 'eot']]), ([], [[0, 'eot']]), ([[[5, 'm'], [5, 'n'], [0, 'eot']], [[5, 'k'], [0, 'eot']], [[7, 'j'], [30, 'eot']]], [[5, 'm'], [0, 'k'], [2, 'j'], [3, 'n'], [27, 'eot']])]]
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 | [[0, 'a'], [5, 'c'], [5, 'b'], [15, 'eot']] | [[0, 'a'], [5, 'c'], [5, 'b'], [15, 'eot']] | Passed |
| oracle 1 | [[0, 'tempo'], [0, 'n1'], [480, 'n2'], [0, 'eot']] | [[0, 'tempo'], [0, 'n1'], [480, 'n2'], [0, 'eot']] | Passed |
| oracle 2 | [[10, 'z'], [0, 'a'], [0, 'eot']] | [[10, 'z'], [0, 'a'], [0, 'eot']] | Passed |
| oracle 3 | [[0, 'x'], [50, 'y'], [50, 'eot']] | [[0, 'x'], [50, 'y'], [50, 'eot']] | Passed |
| oracle 4 | [[0, 'x'], [50, 'y'], [0, 'eot']] | [[0, 'x'], [50, 'y'], [0, 'eot']] | Passed |
| oracle 5 | [[3, 'p'], [1, 'r'], [2, 'q'], [0, 'eot']] | [[3, 'p'], [1, 'r'], [2, 'q'], [0, 'eot']] | Passed |
| oracle 6 | [[0, 'eot']] | [[0, 'eot']] | Passed |
| oracle 7 | [[0, 'eot']] | [[0, 'eot']] | Passed |
SHA-256 / e7bf8ce693209e6d31dfb7d0174c95d24e78c09947b83976873c35550ae56682
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:04.485135+00:00.
Case digest / 296ed6a2f14b34eb894c26565b3be0c74e0ac4b7eaba45c61dd90aa3aeed0197