{"abstract":"A one-tick note converted to a coarser resolution ends on the same tick it starts, so it is inaudible.","category":"MIDI event timing","checks":8,"contract":"Input [events, source_ppq, target_ppq] with events [tick, kind, note] in time order. Each tick maps to tick*target/source rounded half up. A note-off (matched FIFO to the earliest open note-on of the same note) whose original length was positive but whose converted tick is not after its note-on is moved to note-on + 1. Invalid resolutions return None.","contract_signature":"x","evaluation_group":"w2-midi-event-timing-ppq-rescale","failed_approach":"Dropping the original-length condition also lengthens notes that were zero-length in the source.","family":"w2-midi-event-timing-ppq-rescale-minimum-length-guard","id":"FA-81701","implementations":{"attempt":{"sha256":"3ee6e67d12fcd444e045c15d3b5014676fe0c00fb5e301dc81f5655115b1eeee","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    if not isinstance(x, list) or len(x) != 3:\n        return None\n    events, src, dst = x\n    if src <= 0 or dst <= 0:\n        return None\n    out = []\n    open_on = {}\n    for tick, kind, note in events:\n        t = (2 * tick * dst + src) // (2 * src)\n        if kind == 'on':\n            open_on.setdefault(note, []).append((tick, t))\n        elif open_on.get(note):\n            otick, ot = open_on[note].pop(0)\n            if t <= ot:\n                t = ot + 1\n        out.append([t, kind, note])\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([[[0, 'on', 60], [480, 'off', 60]], 480, 96], [[0, 'on', 60], [96, 'off', 60]]), ([[[0, 'on', 60], [1, 'off', 60]], 480, 96], [[0, 'on', 60], [1, 'off', 60]]), ([[[1, 'on', 60], [3, 'off', 60]], 2, 1], [[1, 'on', 60], [2, 'off', 60]]), ([[[0, 'on', 60], [0, 'off', 60]], 480, 96], [[0, 'on', 60], [0, 'off', 60]]), ([[[1, 'on', 60]], 2, 1], [[1, 'on', 60]]), ([[[3, 'on', 60]], 2, 1], [[2, 'on', 60]]), ([[[0, 'on', 60], [2, 'on', 60], [3, 'off', 60], [9, 'off', 60]], 8, 2], [[0, 'on', 60], [1, 'on', 60], [1, 'off', 60], [2, 'off', 60]]), ([[[12, 'on', 61], [13, 'off', 61]], 24, 1], [[1, 'on', 61], [2, 'off', 61]])], [([[[0, 'on', 60], [0, 'off', 60]], 480, 96], [[0, 'on', 60], [0, 'off', 60]]), ([[[5, 'on', 60], [7, 'off', 60]], 10, 1], [[1, 'on', 60], [2, 'off', 60]]), ([[[3, 'on', 60]], 2, 1], [[2, 'on', 60]]), ([[[0, 'on', 60], [2, 'on', 60], [3, 'off', 60], [9, 'off', 60]], 8, 2], [[0, 'on', 60], [1, 'on', 60], [1, 'off', 60], [2, 'off', 60]]), ([[[0, 'on', 60], [100, 'off', 60]], 96, 480], [[0, 'on', 60], [500, 'off', 60]]), ([[[7, 'on', 62], [250, 'off', 62]], 480, 96], [[1, 'on', 62], [50, 'off', 62]]), ([[[0, 'on', 60]], 0, 96], None), ([[[0, 'on', 60], [1, 'on', 60], [2, 'off', 60], [3, 'off', 60]], 10, 1], [[0, 'on', 60], [0, 'on', 60], [1, 'off', 60], [1, 'off', 60]])], [([[[0, 'on', 60], [1, 'off', 60]], 480, 96], [[0, 'on', 60], [1, 'off', 60]]), ([[[0, 'on', 60], [0, 'off', 60]], 480, 96], [[0, 'on', 60], [0, 'off', 60]]), ([[[5, 'on', 60], [7, 'off', 60]], 10, 1], [[1, 'on', 60], [2, 'off', 60]]), ([[[7, 'on', 62], [250, 'off', 62]], 480, 96], [[1, 'on', 62], [50, 'off', 62]]), ([[[0, 'on', 60]], 0, 96], None), ([[[0, 'on', 60], [5, 'on', 60], [6, 'off', 60], [40, 'off', 60]], 10, 1], [[0, 'on', 60], [1, 'on', 60], [1, 'off', 60], [4, 'off', 60]]), ([[[12, 'on', 61], [13, 'off', 61]], 24, 1], [[1, 'on', 61], [2, 'off', 61]]), ([[[3, 'on', 64], [5, 'off', 64]], 6, 4], [[2, 'on', 64], [3, 'off', 64]])], [([[[0, 'on', 60], [480, 'off', 60]], 480, 96], [[0, 'on', 60], [96, 'off', 60]]), ([[[0, 'on', 60], [1, 'off', 60]], 480, 96], [[0, 'on', 60], [1, 'off', 60]]), ([[[1, 'on', 60], [3, 'off', 60]], 2, 1], [[1, 'on', 60], [2, 'off', 60]]), ([[[0, 'on', 60], [0, 'off', 60]], 480, 96], [[0, 'on', 60], [0, 'off', 60]]), ([[[5, 'on', 60], [7, 'off', 60]], 10, 1], [[1, 'on', 60], [2, 'off', 60]]), ([[[12, 'on', 61], [13, 'off', 61]], 24, 1], [[1, 'on', 61], [2, 'off', 61]]), ([[[3, 'on', 64], [5, 'off', 64]], 6, 4], [[2, 'on', 64], [3, 'off', 64]]), ([[[0, 'on', 60], [1, 'on', 60], [2, 'off', 60], [3, 'off', 60]], 10, 1], [[0, 'on', 60], [0, 'on', 60], [1, 'off', 60], [1, 'off', 60]])], [([[[0, 'on', 60], [480, 'off', 60]], 480, 96], [[0, 'on', 60], [96, 'off', 60]]), ([[[0, 'on', 60], [1, 'off', 60]], 480, 96], [[0, 'on', 60], [1, 'off', 60]]), ([[[1, 'on', 60], [3, 'off', 60]], 2, 1], [[1, 'on', 60], [2, 'off', 60]]), ([[[0, 'on', 60], [0, 'off', 60]], 480, 96], [[0, 'on', 60], [0, 'off', 60]]), ([[[5, 'on', 60], [7, 'off', 60]], 10, 1], [[1, 'on', 60], [2, 'off', 60]]), ([[[1, 'on', 60]], 2, 1], [[1, 'on', 60]]), ([[[12, 'on', 61], [13, 'off', 61]], 24, 1], [[1, 'on', 61], [2, 'off', 61]]), ([[[0, 'on', 60], [1, 'on', 60], [2, 'off', 60], [3, 'off', 60]], 10, 1], [[0, 'on', 60], [0, 'on', 60], [1, 'off', 60], [1, 'off', 60]])]]\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":"8adfe960b46f8b40b7c831f33891b0fca250694804cce74d3d2399a356d01a64","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    if not isinstance(x, list) or len(x) != 3:\n        return None\n    events, src, dst = x\n    if src <= 0 or dst <= 0:\n        return None\n    out = []\n    open_on = {}\n    for tick, kind, note in events:\n        t = (2 * tick * dst + src) // (2 * src)\n        if kind == 'on':\n            open_on.setdefault(note, []).append((tick, t))\n        elif open_on.get(note):\n            otick, ot = open_on[note].pop(0)\n            if tick > otick and t < ot:\n                t = ot + 1\n        out.append([t, kind, note])\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([[[0, 'on', 60], [480, 'off', 60]], 480, 96], [[0, 'on', 60], [96, 'off', 60]]), ([[[0, 'on', 60], [1, 'off', 60]], 480, 96], [[0, 'on', 60], [1, 'off', 60]]), ([[[1, 'on', 60], [3, 'off', 60]], 2, 1], [[1, 'on', 60], [2, 'off', 60]]), ([[[0, 'on', 60], [0, 'off', 60]], 480, 96], [[0, 'on', 60], [0, 'off', 60]]), ([[[1, 'on', 60]], 2, 1], [[1, 'on', 60]]), ([[[3, 'on', 60]], 2, 1], [[2, 'on', 60]]), ([[[0, 'on', 60], [2, 'on', 60], [3, 'off', 60], [9, 'off', 60]], 8, 2], [[0, 'on', 60], [1, 'on', 60], [1, 'off', 60], [2, 'off', 60]]), ([[[12, 'on', 61], [13, 'off', 61]], 24, 1], [[1, 'on', 61], [2, 'off', 61]])], [([[[0, 'on', 60], [0, 'off', 60]], 480, 96], [[0, 'on', 60], [0, 'off', 60]]), ([[[5, 'on', 60], [7, 'off', 60]], 10, 1], [[1, 'on', 60], [2, 'off', 60]]), ([[[3, 'on', 60]], 2, 1], [[2, 'on', 60]]), ([[[0, 'on', 60], [2, 'on', 60], [3, 'off', 60], [9, 'off', 60]], 8, 2], [[0, 'on', 60], [1, 'on', 60], [1, 'off', 60], [2, 'off', 60]]), ([[[0, 'on', 60], [100, 'off', 60]], 96, 480], [[0, 'on', 60], [500, 'off', 60]]), ([[[7, 'on', 62], [250, 'off', 62]], 480, 96], [[1, 'on', 62], [50, 'off', 62]]), ([[[0, 'on', 60]], 0, 96], None), ([[[0, 'on', 60], [1, 'on', 60], [2, 'off', 60], [3, 'off', 60]], 10, 1], [[0, 'on', 60], [0, 'on', 60], [1, 'off', 60], [1, 'off', 60]])], [([[[0, 'on', 60], [1, 'off', 60]], 480, 96], [[0, 'on', 60], [1, 'off', 60]]), ([[[0, 'on', 60], [0, 'off', 60]], 480, 96], [[0, 'on', 60], [0, 'off', 60]]), ([[[5, 'on', 60], [7, 'off', 60]], 10, 1], [[1, 'on', 60], [2, 'off', 60]]), ([[[7, 'on', 62], [250, 'off', 62]], 480, 96], [[1, 'on', 62], [50, 'off', 62]]), ([[[0, 'on', 60]], 0, 96], None), ([[[0, 'on', 60], [5, 'on', 60], [6, 'off', 60], [40, 'off', 60]], 10, 1], [[0, 'on', 60], [1, 'on', 60], [1, 'off', 60], [4, 'off', 60]]), ([[[12, 'on', 61], [13, 'off', 61]], 24, 1], [[1, 'on', 61], [2, 'off', 61]]), ([[[3, 'on', 64], [5, 'off', 64]], 6, 4], [[2, 'on', 64], [3, 'off', 64]])], [([[[0, 'on', 60], [480, 'off', 60]], 480, 96], [[0, 'on', 60], [96, 'off', 60]]), ([[[0, 'on', 60], [1, 'off', 60]], 480, 96], [[0, 'on', 60], [1, 'off', 60]]), ([[[1, 'on', 60], [3, 'off', 60]], 2, 1], [[1, 'on', 60], [2, 'off', 60]]), ([[[0, 'on', 60], [0, 'off', 60]], 480, 96], [[0, 'on', 60], [0, 'off', 60]]), ([[[5, 'on', 60], [7, 'off', 60]], 10, 1], [[1, 'on', 60], [2, 'off', 60]]), ([[[12, 'on', 61], [13, 'off', 61]], 24, 1], [[1, 'on', 61], [2, 'off', 61]]), ([[[3, 'on', 64], [5, 'off', 64]], 6, 4], [[2, 'on', 64], [3, 'off', 64]]), ([[[0, 'on', 60], [1, 'on', 60], [2, 'off', 60], [3, 'off', 60]], 10, 1], [[0, 'on', 60], [0, 'on', 60], [1, 'off', 60], [1, 'off', 60]])], [([[[0, 'on', 60], [480, 'off', 60]], 480, 96], [[0, 'on', 60], [96, 'off', 60]]), ([[[0, 'on', 60], [1, 'off', 60]], 480, 96], [[0, 'on', 60], [1, 'off', 60]]), ([[[1, 'on', 60], [3, 'off', 60]], 2, 1], [[1, 'on', 60], [2, 'off', 60]]), ([[[0, 'on', 60], [0, 'off', 60]], 480, 96], [[0, 'on', 60], [0, 'off', 60]]), ([[[5, 'on', 60], [7, 'off', 60]], 10, 1], [[1, 'on', 60], [2, 'off', 60]]), ([[[1, 'on', 60]], 2, 1], [[1, 'on', 60]]), ([[[12, 'on', 61], [13, 'off', 61]], 24, 1], [[1, 'on', 61], [2, 'off', 61]]), ([[[0, 'on', 60], [1, 'on', 60], [2, 'off', 60], [3, 'off', 60]], 10, 1], [[0, 'on', 60], [0, 'on', 60], [1, 'off', 60], [1, 'off', 60]])]]\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-ppq-rescale-minimum-length-guard","generated_at":"2026-09-29T14:50:05.385412+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":"The collision test only fires when the off lands before the on, not on the same tick.","sha256":"9d76f956cbf009dc6a8bea7a35ef96c5d54bef0ace4dd0165195fc2373d35481","title":"Tick resolution conversion preserving note length: short notes collapse to zero length · 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.092,"exit_code":1,"observations":[{"actual":[[0,"on",60],[96,"off",60]],"check":"oracle 0","expected":[[0,"on",60],[96,"off",60]],"passed":true},{"actual":[[0,"on",60],[1,"off",60]],"check":"oracle 1","expected":[[0,"on",60],[1,"off",60]],"passed":true},{"actual":[[1,"on",60],[2,"off",60]],"check":"oracle 2","expected":[[1,"on",60],[2,"off",60]],"passed":true},{"actual":[[0,"on",60],[1,"off",60]],"check":"oracle 3","expected":[[0,"on",60],[0,"off",60]],"passed":false},{"actual":[[1,"on",60]],"check":"oracle 4","expected":[[1,"on",60]],"passed":true},{"actual":[[2,"on",60]],"check":"oracle 5","expected":[[2,"on",60]],"passed":true},{"actual":[[0,"on",60],[1,"on",60],[1,"off",60],[2,"off",60]],"check":"oracle 6","expected":[[0,"on",60],[1,"on",60],[1,"off",60],[2,"off",60]],"passed":true},{"actual":[[1,"on",61],[2,"off",61]],"check":"oracle 7","expected":[[1,"on",61],[2,"off",61]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"oracle 0\", \"actual\": [[0, \"on\", 60], [96, \"off\", 60]], \"expected\": [[0, \"on\", 60], [96, \"off\", 60]], \"passed\": true}, {\"check\": \"oracle 1\", \"actual\": [[0, \"on\", 60], [1, \"off\", 60]], \"expected\": [[0, \"on\", 60], [1, \"off\", 60]], \"passed\": true}, {\"check\": \"oracle 2\", \"actual\": [[1, \"on\", 60], [2, \"off\", 60]], \"expected\": [[1, \"on\", 60], [2, \"off\", 60]], \"passed\": true}, {\"check\": \"oracle 3\", \"actual\": [[0, \"on\", 60], [1, \"off\", 60]], \"expected\": [[0, \"on\", 60], [0, \"off\", 60]], \"passed\": false}, {\"check\": \"oracle 4\", \"actual\": [[1, \"on\", 60]], \"expected\": [[1, \"on\", 60]], \"passed\": true}, {\"check\": \"oracle 5\", \"actual\": [[2, \"on\", 60]], \"expected\": [[2, \"on\", 60]], \"passed\": true}, {\"check\": \"oracle 6\", \"actual\": [[0, \"on\", 60], [1, \"on\", 60], [1, \"off\", 60], [2, \"off\", 60]], \"expected\": [[0, \"on\", 60], [1, \"on\", 60], [1, \"off\", 60], [2, \"off\", 60]], \"passed\": true}, {\"check\": \"oracle 7\", \"actual\": [[1, \"on\", 61], [2, \"off\", 61]], \"expected\": [[1, \"on\", 61], [2, \"off\", 61]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":38.591,"exit_code":1,"observations":[{"actual":[[0,"on",60],[96,"off",60]],"check":"oracle 0","expected":[[0,"on",60],[96,"off",60]],"passed":true},{"actual":[[0,"on",60],[0,"off",60]],"check":"oracle 1","expected":[[0,"on",60],[1,"off",60]],"passed":false},{"actual":[[1,"on",60],[2,"off",60]],"check":"oracle 2","expected":[[1,"on",60],[2,"off",60]],"passed":true},{"actual":[[0,"on",60],[0,"off",60]],"check":"oracle 3","expected":[[0,"on",60],[0,"off",60]],"passed":true},{"actual":[[1,"on",60]],"check":"oracle 4","expected":[[1,"on",60]],"passed":true},{"actual":[[2,"on",60]],"check":"oracle 5","expected":[[2,"on",60]],"passed":true},{"actual":[[0,"on",60],[1,"on",60],[1,"off",60],[2,"off",60]],"check":"oracle 6","expected":[[0,"on",60],[1,"on",60],[1,"off",60],[2,"off",60]],"passed":true},{"actual":[[1,"on",61],[1,"off",61]],"check":"oracle 7","expected":[[1,"on",61],[2,"off",61]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"oracle 0\", \"actual\": [[0, \"on\", 60], [96, \"off\", 60]], \"expected\": [[0, \"on\", 60], [96, \"off\", 60]], \"passed\": true}, {\"check\": \"oracle 1\", \"actual\": [[0, \"on\", 60], [0, \"off\", 60]], \"expected\": [[0, \"on\", 60], [1, \"off\", 60]], \"passed\": false}, {\"check\": \"oracle 2\", \"actual\": [[1, \"on\", 60], [2, \"off\", 60]], \"expected\": [[1, \"on\", 60], [2, \"off\", 60]], \"passed\": true}, {\"check\": \"oracle 3\", \"actual\": [[0, \"on\", 60], [0, \"off\", 60]], \"expected\": [[0, \"on\", 60], [0, \"off\", 60]], \"passed\": true}, {\"check\": \"oracle 4\", \"actual\": [[1, \"on\", 60]], \"expected\": [[1, \"on\", 60]], \"passed\": true}, {\"check\": \"oracle 5\", \"actual\": [[2, \"on\", 60]], \"expected\": [[2, \"on\", 60]], \"passed\": true}, {\"check\": \"oracle 6\", \"actual\": [[0, \"on\", 60], [1, \"on\", 60], [1, \"off\", 60], [2, \"off\", 60]], \"expected\": [[0, \"on\", 60], [1, \"on\", 60], [1, \"off\", 60], [2, \"off\", 60]], \"passed\": true}, {\"check\": \"oracle 7\", \"actual\": [[1, \"on\", 61], [1, \"off\", 61]], \"expected\": [[1, \"on\", 61], [2, \"off\", 61]], \"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."}}