{"abstract":"A note truncated to nothing (or given with start equal to end) is still emitted with zero duration.","category":"MIDI event timing","checks":8,"contract":"Input [notes, mode] where notes are [start, end, pitch] in any order and mode is poly or mono. Sort by start then pitch. Each note ends no later than the start of the next note that starts strictly later and has the same pitch (poly) or any pitch (mono). Notes whose length becomes zero or negative are removed. Return the notes in sorted order; unknown mode returns None.","contract_signature":"x","evaluation_group":"w2-midi-event-timing-overlap-truncation","failed_approach":"Requiring more than one tick also discards legitimate one-tick notes.","family":"w2-midi-event-timing-overlap-truncation-zero-length-removal","id":"FA-81736","implementations":{"attempt":{"sha256":"3ebfe4ea8c8ffbf01fe2b6130e87d3de97d587983d0057b881677e122e989a2a","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) != 2:\n        return None\n    notes, mode = x\n    if mode not in ('poly', 'mono'):\n        return None\n    order = sorted(notes, key=lambda n: (n[0], n[2]))\n    out = []\n    for i, (s, e, p) in enumerate(order):\n        for s2, e2, p2 in order[i + 1:]:\n            if s2 > s and (mode == 'mono' or p2 == p):\n                e = min(e, s2)\n                break\n        if e > s + 1:\n            out.append([s, e, p])\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([[[0, 10, 60], [5, 15, 60]], 'poly'], [[0, 5, 60], [5, 15, 60]]), ([[[0, 10, 60], [5, 15, 62]], 'poly'], [[0, 10, 60], [5, 15, 62]]), ([[[0, 10, 60], [5, 15, 62]], 'mono'], [[0, 5, 60], [5, 15, 62]]), ([[[5, 15, 60], [0, 10, 60]], 'poly'], [[0, 5, 60], [5, 15, 60]]), ([[[0, 4, 60], [2, 3, 60]], 'poly'], [[0, 2, 60], [2, 3, 60]]), ([[[0, 10, 60], [0, 10, 64]], 'mono'], [[0, 10, 60], [0, 10, 64]]), ([[[3, 3, 60]], 'poly'], []), ([[[0, 2, 60], [1, 9, 60], [3, 5, 60]], 'poly'], [[0, 1, 60], [1, 3, 60], [3, 5, 60]])], [([[[5, 15, 60], [0, 10, 60]], 'poly'], [[0, 5, 60], [5, 15, 60]]), ([[[0, 10, 60], [0, 10, 64]], 'mono'], [[0, 10, 60], [0, 10, 64]]), ([[[0, 10, 60], [10, 20, 60]], 'poly'], [[0, 10, 60], [10, 20, 60]]), ([[[0, 5, 60], [5, 6, 62]], 'mono'], [[0, 5, 60], [5, 6, 62]]), ([[[3, 3, 60]], 'poly'], []), ([[[0, 10, 60]], 'legato'], None), ([[[0, 20, 60], [2, 4, 62], [6, 8, 64]], 'mono'], [[0, 2, 60], [2, 4, 62], [6, 8, 64]]), ([[[1, 2, 60], [2, 3, 60], [3, 4, 60]], 'poly'], [[1, 2, 60], [2, 3, 60], [3, 4, 60]])], [([[[0, 4, 60], [2, 3, 60]], 'poly'], [[0, 2, 60], [2, 3, 60]]), ([[[0, 5, 60], [5, 6, 62]], 'mono'], [[0, 5, 60], [5, 6, 62]]), ([[[0, 1, 60], [0, 8, 60], [1, 9, 60]], 'poly'], [[0, 1, 60], [0, 1, 60], [1, 9, 60]]), ([[[3, 3, 60]], 'poly'], []), ([[[0, 10, 60]], 'legato'], None), ([[[0, 20, 60], [2, 4, 62], [6, 8, 64]], 'mono'], [[0, 2, 60], [2, 4, 62], [6, 8, 64]]), ([[[0, 10, 62], [4, 6, 60]], 'mono'], [[0, 4, 62], [4, 6, 60]]), ([[[0, 9, 70], [1, 5, 72], [2, 4, 70]], 'poly'], [[0, 2, 70], [1, 5, 72], [2, 4, 70]])], [([[[0, 10, 60], [5, 15, 60]], 'poly'], [[0, 5, 60], [5, 15, 60]]), ([[[0, 4, 60], [2, 3, 60]], 'poly'], [[0, 2, 60], [2, 3, 60]]), ([[[0, 5, 60], [5, 6, 62]], 'mono'], [[0, 5, 60], [5, 6, 62]]), ([[[0, 1, 60], [0, 8, 60], [1, 9, 60]], 'poly'], [[0, 1, 60], [0, 1, 60], [1, 9, 60]]), ([[[3, 3, 60]], 'poly'], []), ([[[0, 2, 60], [1, 9, 60], [3, 5, 60]], 'poly'], [[0, 1, 60], [1, 3, 60], [3, 5, 60]]), ([[[1, 2, 60], [2, 3, 60], [3, 4, 60]], 'poly'], [[1, 2, 60], [2, 3, 60], [3, 4, 60]]), ([[[0, 9, 70], [1, 5, 72], [2, 4, 70]], 'poly'], [[0, 2, 70], [1, 5, 72], [2, 4, 70]])], [([[[0, 10, 60], [5, 15, 60]], 'poly'], [[0, 5, 60], [5, 15, 60]]), ([[[0, 10, 60], [5, 15, 62]], 'poly'], [[0, 10, 60], [5, 15, 62]]), ([[[0, 10, 60], [5, 15, 62]], 'mono'], [[0, 5, 60], [5, 15, 62]]), ([[[5, 15, 60], [0, 10, 60]], 'poly'], [[0, 5, 60], [5, 15, 60]]), ([[[0, 1, 60], [0, 8, 60], [1, 9, 60]], 'poly'], [[0, 1, 60], [0, 1, 60], [1, 9, 60]]), ([[[3, 3, 60]], 'poly'], []), ([[[0, 2, 60], [1, 9, 60], [3, 5, 60]], 'poly'], [[0, 1, 60], [1, 3, 60], [3, 5, 60]]), ([[[1, 2, 60], [2, 3, 60], [3, 4, 60]], 'poly'], [[1, 2, 60], [2, 3, 60], [3, 4, 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":"17f7bad9f39373728bff7e13672e33863d9e7c243c7cc64cedf0ba8337d5cc50","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) != 2:\n        return None\n    notes, mode = x\n    if mode not in ('poly', 'mono'):\n        return None\n    order = sorted(notes, key=lambda n: (n[0], n[2]))\n    out = []\n    for i, (s, e, p) in enumerate(order):\n        for s2, e2, p2 in order[i + 1:]:\n            if s2 > s and (mode == 'mono' or p2 == p):\n                e = min(e, s2)\n                break\n        if e >= s:\n            out.append([s, e, p])\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([[[0, 10, 60], [5, 15, 60]], 'poly'], [[0, 5, 60], [5, 15, 60]]), ([[[0, 10, 60], [5, 15, 62]], 'poly'], [[0, 10, 60], [5, 15, 62]]), ([[[0, 10, 60], [5, 15, 62]], 'mono'], [[0, 5, 60], [5, 15, 62]]), ([[[5, 15, 60], [0, 10, 60]], 'poly'], [[0, 5, 60], [5, 15, 60]]), ([[[0, 4, 60], [2, 3, 60]], 'poly'], [[0, 2, 60], [2, 3, 60]]), ([[[0, 10, 60], [0, 10, 64]], 'mono'], [[0, 10, 60], [0, 10, 64]]), ([[[3, 3, 60]], 'poly'], []), ([[[0, 2, 60], [1, 9, 60], [3, 5, 60]], 'poly'], [[0, 1, 60], [1, 3, 60], [3, 5, 60]])], [([[[5, 15, 60], [0, 10, 60]], 'poly'], [[0, 5, 60], [5, 15, 60]]), ([[[0, 10, 60], [0, 10, 64]], 'mono'], [[0, 10, 60], [0, 10, 64]]), ([[[0, 10, 60], [10, 20, 60]], 'poly'], [[0, 10, 60], [10, 20, 60]]), ([[[0, 5, 60], [5, 6, 62]], 'mono'], [[0, 5, 60], [5, 6, 62]]), ([[[3, 3, 60]], 'poly'], []), ([[[0, 10, 60]], 'legato'], None), ([[[0, 20, 60], [2, 4, 62], [6, 8, 64]], 'mono'], [[0, 2, 60], [2, 4, 62], [6, 8, 64]]), ([[[1, 2, 60], [2, 3, 60], [3, 4, 60]], 'poly'], [[1, 2, 60], [2, 3, 60], [3, 4, 60]])], [([[[0, 4, 60], [2, 3, 60]], 'poly'], [[0, 2, 60], [2, 3, 60]]), ([[[0, 5, 60], [5, 6, 62]], 'mono'], [[0, 5, 60], [5, 6, 62]]), ([[[0, 1, 60], [0, 8, 60], [1, 9, 60]], 'poly'], [[0, 1, 60], [0, 1, 60], [1, 9, 60]]), ([[[3, 3, 60]], 'poly'], []), ([[[0, 10, 60]], 'legato'], None), ([[[0, 20, 60], [2, 4, 62], [6, 8, 64]], 'mono'], [[0, 2, 60], [2, 4, 62], [6, 8, 64]]), ([[[0, 10, 62], [4, 6, 60]], 'mono'], [[0, 4, 62], [4, 6, 60]]), ([[[0, 9, 70], [1, 5, 72], [2, 4, 70]], 'poly'], [[0, 2, 70], [1, 5, 72], [2, 4, 70]])], [([[[0, 10, 60], [5, 15, 60]], 'poly'], [[0, 5, 60], [5, 15, 60]]), ([[[0, 4, 60], [2, 3, 60]], 'poly'], [[0, 2, 60], [2, 3, 60]]), ([[[0, 5, 60], [5, 6, 62]], 'mono'], [[0, 5, 60], [5, 6, 62]]), ([[[0, 1, 60], [0, 8, 60], [1, 9, 60]], 'poly'], [[0, 1, 60], [0, 1, 60], [1, 9, 60]]), ([[[3, 3, 60]], 'poly'], []), ([[[0, 2, 60], [1, 9, 60], [3, 5, 60]], 'poly'], [[0, 1, 60], [1, 3, 60], [3, 5, 60]]), ([[[1, 2, 60], [2, 3, 60], [3, 4, 60]], 'poly'], [[1, 2, 60], [2, 3, 60], [3, 4, 60]]), ([[[0, 9, 70], [1, 5, 72], [2, 4, 70]], 'poly'], [[0, 2, 70], [1, 5, 72], [2, 4, 70]])], [([[[0, 10, 60], [5, 15, 60]], 'poly'], [[0, 5, 60], [5, 15, 60]]), ([[[0, 10, 60], [5, 15, 62]], 'poly'], [[0, 10, 60], [5, 15, 62]]), ([[[0, 10, 60], [5, 15, 62]], 'mono'], [[0, 5, 60], [5, 15, 62]]), ([[[5, 15, 60], [0, 10, 60]], 'poly'], [[0, 5, 60], [5, 15, 60]]), ([[[0, 1, 60], [0, 8, 60], [1, 9, 60]], 'poly'], [[0, 1, 60], [0, 1, 60], [1, 9, 60]]), ([[[3, 3, 60]], 'poly'], []), ([[[0, 2, 60], [1, 9, 60], [3, 5, 60]], 'poly'], [[0, 1, 60], [1, 3, 60], [3, 5, 60]]), ([[[1, 2, 60], [2, 3, 60], [3, 4, 60]], 'poly'], [[1, 2, 60], [2, 3, 60], [3, 4, 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-overlap-truncation-zero-length-removal","generated_at":"2026-09-29T14:50:05.716336+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 survivor test keeps notes whose end equals their start.","sha256":"9cdc11a87ec369e019b959ec95a6047ae4d36d70f153fe8c51e9a7deb4f91a5b","title":"Same-pitch and monophonic overlap truncation: zero-length notes kept · 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.273,"exit_code":1,"observations":[{"actual":[[0,5,60],[5,15,60]],"check":"oracle 0","expected":[[0,5,60],[5,15,60]],"passed":true},{"actual":[[0,10,60],[5,15,62]],"check":"oracle 1","expected":[[0,10,60],[5,15,62]],"passed":true},{"actual":[[0,5,60],[5,15,62]],"check":"oracle 2","expected":[[0,5,60],[5,15,62]],"passed":true},{"actual":[[0,5,60],[5,15,60]],"check":"oracle 3","expected":[[0,5,60],[5,15,60]],"passed":true},{"actual":[[0,2,60]],"check":"oracle 4","expected":[[0,2,60],[2,3,60]],"passed":false},{"actual":[[0,10,60],[0,10,64]],"check":"oracle 5","expected":[[0,10,60],[0,10,64]],"passed":true},{"actual":[],"check":"oracle 6","expected":[],"passed":true},{"actual":[[1,3,60],[3,5,60]],"check":"oracle 7","expected":[[0,1,60],[1,3,60],[3,5,60]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"oracle 0\", \"actual\": [[0, 5, 60], [5, 15, 60]], \"expected\": [[0, 5, 60], [5, 15, 60]], \"passed\": true}, {\"check\": \"oracle 1\", \"actual\": [[0, 10, 60], [5, 15, 62]], \"expected\": [[0, 10, 60], [5, 15, 62]], \"passed\": true}, {\"check\": \"oracle 2\", \"actual\": [[0, 5, 60], [5, 15, 62]], \"expected\": [[0, 5, 60], [5, 15, 62]], \"passed\": true}, {\"check\": \"oracle 3\", \"actual\": [[0, 5, 60], [5, 15, 60]], \"expected\": [[0, 5, 60], [5, 15, 60]], \"passed\": true}, {\"check\": \"oracle 4\", \"actual\": [[0, 2, 60]], \"expected\": [[0, 2, 60], [2, 3, 60]], \"passed\": false}, {\"check\": \"oracle 5\", \"actual\": [[0, 10, 60], [0, 10, 64]], \"expected\": [[0, 10, 60], [0, 10, 64]], \"passed\": true}, {\"check\": \"oracle 6\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"oracle 7\", \"actual\": [[1, 3, 60], [3, 5, 60]], \"expected\": [[0, 1, 60], [1, 3, 60], [3, 5, 60]], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.389,"exit_code":1,"observations":[{"actual":[[0,5,60],[5,15,60]],"check":"oracle 0","expected":[[0,5,60],[5,15,60]],"passed":true},{"actual":[[0,10,60],[5,15,62]],"check":"oracle 1","expected":[[0,10,60],[5,15,62]],"passed":true},{"actual":[[0,5,60],[5,15,62]],"check":"oracle 2","expected":[[0,5,60],[5,15,62]],"passed":true},{"actual":[[0,5,60],[5,15,60]],"check":"oracle 3","expected":[[0,5,60],[5,15,60]],"passed":true},{"actual":[[0,2,60],[2,3,60]],"check":"oracle 4","expected":[[0,2,60],[2,3,60]],"passed":true},{"actual":[[0,10,60],[0,10,64]],"check":"oracle 5","expected":[[0,10,60],[0,10,64]],"passed":true},{"actual":[[3,3,60]],"check":"oracle 6","expected":[],"passed":false},{"actual":[[0,1,60],[1,3,60],[3,5,60]],"check":"oracle 7","expected":[[0,1,60],[1,3,60],[3,5,60]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"oracle 0\", \"actual\": [[0, 5, 60], [5, 15, 60]], \"expected\": [[0, 5, 60], [5, 15, 60]], \"passed\": true}, {\"check\": \"oracle 1\", \"actual\": [[0, 10, 60], [5, 15, 62]], \"expected\": [[0, 10, 60], [5, 15, 62]], \"passed\": true}, {\"check\": \"oracle 2\", \"actual\": [[0, 5, 60], [5, 15, 62]], \"expected\": [[0, 5, 60], [5, 15, 62]], \"passed\": true}, {\"check\": \"oracle 3\", \"actual\": [[0, 5, 60], [5, 15, 60]], \"expected\": [[0, 5, 60], [5, 15, 60]], \"passed\": true}, {\"check\": \"oracle 4\", \"actual\": [[0, 2, 60], [2, 3, 60]], \"expected\": [[0, 2, 60], [2, 3, 60]], \"passed\": true}, {\"check\": \"oracle 5\", \"actual\": [[0, 10, 60], [0, 10, 64]], \"expected\": [[0, 10, 60], [0, 10, 64]], \"passed\": true}, {\"check\": \"oracle 6\", \"actual\": [[3, 3, 60]], \"expected\": [], \"passed\": false}, {\"check\": \"oracle 7\", \"actual\": [[0, 1, 60], [1, 3, 60], [3, 5, 60]], \"expected\": [[0, 1, 60], [1, 3, 60], [3, 5, 60]], \"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."}}