{"abstract":"A track whose first event is at tick 5 is serialised with a first delta of 0, removing the opening rest.","category":"MIDI event timing","checks":8,"contract":"Input a list of [tick, kind, note] with kind on or off in any order. Emit events sorted by tick; at equal ticks note-offs precede note-ons, and otherwise input order is kept. Each output is [delta from the previous emitted event (the first from tick 0), kind, note]. A negative tick returns None.","contract_signature":"x","evaluation_group":"w2-midi-event-timing-delta-serialise","failed_approach":"Measuring from the first listed event can even produce a negative first delta for unsorted input.","family":"w2-midi-event-timing-delta-serialise-initial-delta-origin","id":"FA-81466","implementations":{"attempt":{"sha256":"7b55ffb2bf2d885458a74760de2498d6e7c38e8bcdb786a76616576e2c005eaa","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    if not isinstance(x, list):\n        return None\n    for e in x:\n        if e[0] < 0:\n            return None\n    order = sorted(range(len(x)), key=lambda i: (x[i][0], 0 if x[i][1] == 'off' else 1, i))\n    out = []\n    prev = x[0][0] if x else 0\n    for i in order:\n        tick, kind, note = x[i]\n        out.append([tick - prev, kind, note])\n        prev = tick\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([[0, 'on', 60], [10, 'off', 60]], [[0, 'on', 60], [10, 'off', 60]]), ([[10, 'on', 62], [10, 'off', 60], [0, 'on', 60]], [[0, 'on', 60], [10, 'off', 60], [0, 'on', 62]]), ([[5, 'on', 60], [15, 'off', 60]], [[5, 'on', 60], [10, 'off', 60]]), ([[0, 'on', 60], [0, 'on', 64], [0, 'off', 59]], [[0, 'off', 59], [0, 'on', 60], [0, 'on', 64]]), ([[3, 'on', 1], [3, 'on', 2], [3, 'on', 3]], [[3, 'on', 1], [0, 'on', 2], [0, 'on', 3]]), ([], []), ([[7, 'off', 60], [7, 'on', 60], [7, 'off', 61]], [[7, 'off', 60], [0, 'off', 61], [0, 'on', 60]]), ([[-1, 'on', 60]], None)], [([[10, 'on', 62], [10, 'off', 60], [0, 'on', 60]], [[0, 'on', 60], [10, 'off', 60], [0, 'on', 62]]), ([[5, 'on', 60], [15, 'off', 60]], [[5, 'on', 60], [10, 'off', 60]]), ([[20, 'on', 64], [0, 'on', 60], [20, 'off', 60]], [[0, 'on', 60], [20, 'off', 60], [0, 'on', 64]]), ([[3, 'on', 1], [3, 'on', 2], [3, 'on', 3]], [[3, 'on', 1], [0, 'on', 2], [0, 'on', 3]]), ([[7, 'off', 60], [7, 'on', 60], [7, 'off', 61]], [[7, 'off', 60], [0, 'off', 61], [0, 'on', 60]]), ([[100, 'on', 60], [50, 'on', 61], [75, 'off', 61]], [[50, 'on', 61], [25, 'off', 61], [25, 'on', 60]]), ([[-1, 'on', 60]], None), ([[30, 'on', 60], [30, 'off', 60], [40, 'off', 60]], [[30, 'off', 60], [0, 'on', 60], [10, 'off', 60]])], [([[0, 'on', 60], [10, 'off', 60]], [[0, 'on', 60], [10, 'off', 60]]), ([[20, 'on', 64], [0, 'on', 60], [20, 'off', 60]], [[0, 'on', 60], [20, 'off', 60], [0, 'on', 64]]), ([[0, 'on', 60], [0, 'on', 64], [0, 'off', 59]], [[0, 'off', 59], [0, 'on', 60], [0, 'on', 64]]), ([[3, 'on', 1], [3, 'on', 2], [3, 'on', 3]], [[3, 'on', 1], [0, 'on', 2], [0, 'on', 3]]), ([[7, 'off', 60], [7, 'on', 60], [7, 'off', 61]], [[7, 'off', 60], [0, 'off', 61], [0, 'on', 60]]), ([[100, 'on', 60], [50, 'on', 61], [75, 'off', 61]], [[50, 'on', 61], [25, 'off', 61], [25, 'on', 60]]), ([[30, 'on', 60], [30, 'off', 60], [40, 'off', 60]], [[30, 'off', 60], [0, 'on', 60], [10, 'off', 60]]), ([[12, 'on', 70]], [[12, 'on', 70]])], [([[0, 'on', 60], [10, 'off', 60]], [[0, 'on', 60], [10, 'off', 60]]), ([[0, 'on', 60], [0, 'on', 64], [0, 'off', 59]], [[0, 'off', 59], [0, 'on', 60], [0, 'on', 64]]), ([[3, 'on', 1], [3, 'on', 2], [3, 'on', 3]], [[3, 'on', 1], [0, 'on', 2], [0, 'on', 3]]), ([], []), ([[100, 'on', 60], [50, 'on', 61], [75, 'off', 61]], [[50, 'on', 61], [25, 'off', 61], [25, 'on', 60]]), ([[-1, 'on', 60]], None), ([[30, 'on', 60], [30, 'off', 60], [40, 'off', 60]], [[30, 'off', 60], [0, 'on', 60], [10, 'off', 60]]), ([[12, 'on', 70]], [[12, 'on', 70]])], [([[0, 'on', 60], [10, 'off', 60]], [[0, 'on', 60], [10, 'off', 60]]), ([[5, 'on', 60], [15, 'off', 60]], [[5, 'on', 60], [10, 'off', 60]]), ([[0, 'on', 60], [0, 'on', 64], [0, 'off', 59]], [[0, 'off', 59], [0, 'on', 60], [0, 'on', 64]]), ([], []), ([[7, 'off', 60], [7, 'on', 60], [7, 'off', 61]], [[7, 'off', 60], [0, 'off', 61], [0, 'on', 60]]), ([[-1, 'on', 60]], None), ([[30, 'on', 60], [30, 'off', 60], [40, 'off', 60]], [[30, 'off', 60], [0, 'on', 60], [10, 'off', 60]]), ([[12, 'on', 70]], [[12, 'on', 70]])]]\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":"c630143d9d1825be6af774b669ac03b7dd9b2b9213540e293b46a9906350eaef","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    if not isinstance(x, list):\n        return None\n    for e in x:\n        if e[0] < 0:\n            return None\n    order = sorted(range(len(x)), key=lambda i: (x[i][0], 0 if x[i][1] == 'off' else 1, i))\n    out = []\n    prev = min(e[0] for e in x) if x else 0\n    for i in order:\n        tick, kind, note = x[i]\n        out.append([tick - prev, kind, note])\n        prev = tick\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([[0, 'on', 60], [10, 'off', 60]], [[0, 'on', 60], [10, 'off', 60]]), ([[10, 'on', 62], [10, 'off', 60], [0, 'on', 60]], [[0, 'on', 60], [10, 'off', 60], [0, 'on', 62]]), ([[5, 'on', 60], [15, 'off', 60]], [[5, 'on', 60], [10, 'off', 60]]), ([[0, 'on', 60], [0, 'on', 64], [0, 'off', 59]], [[0, 'off', 59], [0, 'on', 60], [0, 'on', 64]]), ([[3, 'on', 1], [3, 'on', 2], [3, 'on', 3]], [[3, 'on', 1], [0, 'on', 2], [0, 'on', 3]]), ([], []), ([[7, 'off', 60], [7, 'on', 60], [7, 'off', 61]], [[7, 'off', 60], [0, 'off', 61], [0, 'on', 60]]), ([[-1, 'on', 60]], None)], [([[10, 'on', 62], [10, 'off', 60], [0, 'on', 60]], [[0, 'on', 60], [10, 'off', 60], [0, 'on', 62]]), ([[5, 'on', 60], [15, 'off', 60]], [[5, 'on', 60], [10, 'off', 60]]), ([[20, 'on', 64], [0, 'on', 60], [20, 'off', 60]], [[0, 'on', 60], [20, 'off', 60], [0, 'on', 64]]), ([[3, 'on', 1], [3, 'on', 2], [3, 'on', 3]], [[3, 'on', 1], [0, 'on', 2], [0, 'on', 3]]), ([[7, 'off', 60], [7, 'on', 60], [7, 'off', 61]], [[7, 'off', 60], [0, 'off', 61], [0, 'on', 60]]), ([[100, 'on', 60], [50, 'on', 61], [75, 'off', 61]], [[50, 'on', 61], [25, 'off', 61], [25, 'on', 60]]), ([[-1, 'on', 60]], None), ([[30, 'on', 60], [30, 'off', 60], [40, 'off', 60]], [[30, 'off', 60], [0, 'on', 60], [10, 'off', 60]])], [([[0, 'on', 60], [10, 'off', 60]], [[0, 'on', 60], [10, 'off', 60]]), ([[20, 'on', 64], [0, 'on', 60], [20, 'off', 60]], [[0, 'on', 60], [20, 'off', 60], [0, 'on', 64]]), ([[0, 'on', 60], [0, 'on', 64], [0, 'off', 59]], [[0, 'off', 59], [0, 'on', 60], [0, 'on', 64]]), ([[3, 'on', 1], [3, 'on', 2], [3, 'on', 3]], [[3, 'on', 1], [0, 'on', 2], [0, 'on', 3]]), ([[7, 'off', 60], [7, 'on', 60], [7, 'off', 61]], [[7, 'off', 60], [0, 'off', 61], [0, 'on', 60]]), ([[100, 'on', 60], [50, 'on', 61], [75, 'off', 61]], [[50, 'on', 61], [25, 'off', 61], [25, 'on', 60]]), ([[30, 'on', 60], [30, 'off', 60], [40, 'off', 60]], [[30, 'off', 60], [0, 'on', 60], [10, 'off', 60]]), ([[12, 'on', 70]], [[12, 'on', 70]])], [([[0, 'on', 60], [10, 'off', 60]], [[0, 'on', 60], [10, 'off', 60]]), ([[0, 'on', 60], [0, 'on', 64], [0, 'off', 59]], [[0, 'off', 59], [0, 'on', 60], [0, 'on', 64]]), ([[3, 'on', 1], [3, 'on', 2], [3, 'on', 3]], [[3, 'on', 1], [0, 'on', 2], [0, 'on', 3]]), ([], []), ([[100, 'on', 60], [50, 'on', 61], [75, 'off', 61]], [[50, 'on', 61], [25, 'off', 61], [25, 'on', 60]]), ([[-1, 'on', 60]], None), ([[30, 'on', 60], [30, 'off', 60], [40, 'off', 60]], [[30, 'off', 60], [0, 'on', 60], [10, 'off', 60]]), ([[12, 'on', 70]], [[12, 'on', 70]])], [([[0, 'on', 60], [10, 'off', 60]], [[0, 'on', 60], [10, 'off', 60]]), ([[5, 'on', 60], [15, 'off', 60]], [[5, 'on', 60], [10, 'off', 60]]), ([[0, 'on', 60], [0, 'on', 64], [0, 'off', 59]], [[0, 'off', 59], [0, 'on', 60], [0, 'on', 64]]), ([], []), ([[7, 'off', 60], [7, 'on', 60], [7, 'off', 61]], [[7, 'off', 60], [0, 'off', 61], [0, 'on', 60]]), ([[-1, 'on', 60]], None), ([[30, 'on', 60], [30, 'off', 60], [40, 'off', 60]], [[30, 'off', 60], [0, 'on', 60], [10, 'off', 60]]), ([[12, 'on', 70]], [[12, 'on', 70]])]]\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 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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"w2-midi-event-timing-delta-serialise-initial-delta-origin","generated_at":"2026-09-29T14:50:03.181115+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"MIDI sequencers, file readers and synth drivers depend on exact event ordering and tick/time arithmetic.","root_cause":"Deltas are measured from the earliest event instead of from tick 0.","sha256":"def7ce811b9d97d3b6d354934f784a33fae45ad5049089b16479bbfd250fc89c","title":"Absolute events to delta-time serialisation: leading silence dropped · 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":40.505,"exit_code":1,"observations":[{"actual":[[0,"on",60],[10,"off",60]],"check":"oracle 0","expected":[[0,"on",60],[10,"off",60]],"passed":true},{"actual":[[-10,"on",60],[10,"off",60],[0,"on",62]],"check":"oracle 1","expected":[[0,"on",60],[10,"off",60],[0,"on",62]],"passed":false},{"actual":[[0,"on",60],[10,"off",60]],"check":"oracle 2","expected":[[5,"on",60],[10,"off",60]],"passed":false},{"actual":[[0,"off",59],[0,"on",60],[0,"on",64]],"check":"oracle 3","expected":[[0,"off",59],[0,"on",60],[0,"on",64]],"passed":true},{"actual":[[0,"on",1],[0,"on",2],[0,"on",3]],"check":"oracle 4","expected":[[3,"on",1],[0,"on",2],[0,"on",3]],"passed":false},{"actual":[],"check":"oracle 5","expected":[],"passed":true},{"actual":[[0,"off",60],[0,"off",61],[0,"on",60]],"check":"oracle 6","expected":[[7,"off",60],[0,"off",61],[0,"on",60]],"passed":false},{"actual":null,"check":"oracle 7","expected":null,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"oracle 0\", \"actual\": [[0, \"on\", 60], [10, \"off\", 60]], \"expected\": [[0, \"on\", 60], [10, \"off\", 60]], \"passed\": true}, {\"check\": \"oracle 1\", \"actual\": [[-10, \"on\", 60], [10, \"off\", 60], [0, \"on\", 62]], \"expected\": [[0, \"on\", 60], [10, \"off\", 60], [0, \"on\", 62]], \"passed\": false}, {\"check\": \"oracle 2\", \"actual\": [[0, \"on\", 60], [10, \"off\", 60]], \"expected\": [[5, \"on\", 60], [10, \"off\", 60]], \"passed\": false}, {\"check\": \"oracle 3\", \"actual\": [[0, \"off\", 59], [0, \"on\", 60], [0, \"on\", 64]], \"expected\": [[0, \"off\", 59], [0, \"on\", 60], [0, \"on\", 64]], \"passed\": true}, {\"check\": \"oracle 4\", \"actual\": [[0, \"on\", 1], [0, \"on\", 2], [0, \"on\", 3]], \"expected\": [[3, \"on\", 1], [0, \"on\", 2], [0, \"on\", 3]], \"passed\": false}, {\"check\": \"oracle 5\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"oracle 6\", \"actual\": [[0, \"off\", 60], [0, \"off\", 61], [0, \"on\", 60]], \"expected\": [[7, \"off\", 60], [0, \"off\", 61], [0, \"on\", 60]], \"passed\": false}, {\"check\": \"oracle 7\", \"actual\": null, \"expected\": null, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":38.529,"exit_code":1,"observations":[{"actual":[[0,"on",60],[10,"off",60]],"check":"oracle 0","expected":[[0,"on",60],[10,"off",60]],"passed":true},{"actual":[[0,"on",60],[10,"off",60],[0,"on",62]],"check":"oracle 1","expected":[[0,"on",60],[10,"off",60],[0,"on",62]],"passed":true},{"actual":[[0,"on",60],[10,"off",60]],"check":"oracle 2","expected":[[5,"on",60],[10,"off",60]],"passed":false},{"actual":[[0,"off",59],[0,"on",60],[0,"on",64]],"check":"oracle 3","expected":[[0,"off",59],[0,"on",60],[0,"on",64]],"passed":true},{"actual":[[0,"on",1],[0,"on",2],[0,"on",3]],"check":"oracle 4","expected":[[3,"on",1],[0,"on",2],[0,"on",3]],"passed":false},{"actual":[],"check":"oracle 5","expected":[],"passed":true},{"actual":[[0,"off",60],[0,"off",61],[0,"on",60]],"check":"oracle 6","expected":[[7,"off",60],[0,"off",61],[0,"on",60]],"passed":false},{"actual":null,"check":"oracle 7","expected":null,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"oracle 0\", \"actual\": [[0, \"on\", 60], [10, \"off\", 60]], \"expected\": [[0, \"on\", 60], [10, \"off\", 60]], \"passed\": true}, {\"check\": \"oracle 1\", \"actual\": [[0, \"on\", 60], [10, \"off\", 60], [0, \"on\", 62]], \"expected\": [[0, \"on\", 60], [10, \"off\", 60], [0, \"on\", 62]], \"passed\": true}, {\"check\": \"oracle 2\", \"actual\": [[0, \"on\", 60], [10, \"off\", 60]], \"expected\": [[5, \"on\", 60], [10, \"off\", 60]], \"passed\": false}, {\"check\": \"oracle 3\", \"actual\": [[0, \"off\", 59], [0, \"on\", 60], [0, \"on\", 64]], \"expected\": [[0, \"off\", 59], [0, \"on\", 60], [0, \"on\", 64]], \"passed\": true}, {\"check\": \"oracle 4\", \"actual\": [[0, \"on\", 1], [0, \"on\", 2], [0, \"on\", 3]], \"expected\": [[3, \"on\", 1], [0, \"on\", 2], [0, \"on\", 3]], \"passed\": false}, {\"check\": \"oracle 5\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"oracle 6\", \"actual\": [[0, \"off\", 60], [0, \"off\", 61], [0, \"on\", 60]], \"expected\": [[7, \"off\", 60], [0, \"off\", 61], [0, \"on\", 60]], \"passed\": false}, {\"check\": \"oracle 7\", \"actual\": null, \"expected\": null, \"passed\": true}], \"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."}}