{"abstract":"A delta of exactly 127 swallows the following status byte into the delta.","category":"MIDI event timing","checks":8,"contract":"Input the bytes of a track body: each event is a variable-length delta then either a meta event (FF type len data...), a status byte (bit 7 set) with its data bytes, or data bytes reusing the previous channel status (running status). Program change (Cx) and channel pressure (Dx) take one data byte, other channel messages two. Meta events cancel running status. Return [absolute tick, status, data...] for channel events and [tick, \"meta\", type] for meta events, or None on truncation or data without a running status.","contract_signature":"x","evaluation_group":"w2-midi-event-timing-running-status-parse","failed_approach":"Comparing with <= 0x80 treats a continuation byte of exactly 0x80 as the last delta byte.","family":"w2-midi-event-timing-running-status-parse-delta-terminator","id":"FA-81416","implementations":{"attempt":{"sha256":"e56fd56e5ca230f2a29e5e72ee54e8c26359451ac29e01e611c000d93e149fa0","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    out = []\n    i = 0\n    tick = 0\n    running = None\n    while i < len(x):\n        delta = 0\n        while True:\n            if i >= len(x):\n                return None\n            b = x[i]\n            i += 1\n            delta = (delta << 7) | (b & 0x7F)\n            if b <= 0x80:\n                break\n        tick += delta\n        if i >= len(x):\n            return None\n        status = x[i]\n        if status == 0xFF:\n            if i + 2 >= len(x):\n                return None\n            kind = x[i + 1]\n            i += 3 + x[i + 2]\n            if i > len(x):\n                return None\n            running = None\n            out.append([tick, 'meta', kind])\n            continue\n        if status & 0x80:\n            i += 1\n            running = status\n        elif running is None:\n            return None\n        else:\n            status = running\n        size = 1 if (status & 0xF0) in (0xC0, 0xD0) else 2\n        if i + size > len(x):\n            return None\n        out.append([tick, status] + x[i:i + size])\n        i += size\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([0, 144, 60, 100, 10, 60, 0], [[0, 144, 60, 100], [10, 144, 60, 0]]), ([0, 192, 5, 0, 6], [[0, 192, 5], [0, 192, 6]]), ([0, 208, 64, 0, 50], [[0, 208, 64], [0, 208, 50]]), ([0, 144, 60, 100, 0, 255, 1, 0, 0, 62, 100], None), ([0, 144, 60, 100, 0, 255, 1, 1, 65, 0, 62, 100], None), ([0, 176, 7, 100, 20, 10, 90], [[0, 176, 7, 100], [20, 176, 10, 90]]), ([127, 144, 60, 1], [[127, 144, 60, 1]]), ([128, 0, 144, 60, 1], [[0, 144, 60, 1]])], [([0, 144, 60, 100, 0, 255, 1, 0, 0, 62, 100], None), ([0, 144, 60, 100, 0, 255, 1, 1, 65, 0, 62, 100], None), ([0, 176, 7, 100, 20, 10, 90], [[0, 176, 7, 100], [20, 176, 10, 90]]), ([127, 144, 60, 1], [[127, 144, 60, 1]]), ([128, 0, 144, 60, 1], [[0, 144, 60, 1]]), ([129, 0, 144, 60, 1], [[128, 144, 60, 1]]), ([0, 144, 60], None), ([0, 62, 100], None)], [([127, 144, 60, 1], [[127, 144, 60, 1]]), ([128, 0, 144, 60, 1], [[0, 144, 60, 1]]), ([129, 0, 144, 60, 1], [[128, 144, 60, 1]]), ([0, 144, 60], None), ([0, 62, 100], None), ([0, 192, 5, 7, 6, 0, 144, 64, 90], [[0, 192, 5], [7, 192, 6], [7, 144, 64, 90]]), ([0, 255, 47, 0], [[0, 'meta', 47]]), ([0, 255, 81, 3, 7, 161, 32, 0, 144, 60, 64], [[0, 'meta', 81], [0, 144, 60, 64]])], [([127, 144, 60, 1], [[127, 144, 60, 1]]), ([128, 0, 144, 60, 1], [[0, 144, 60, 1]]), ([0, 192, 5, 7, 6, 0, 144, 64, 90], [[0, 192, 5], [7, 192, 6], [7, 144, 64, 90]]), ([0, 255, 47, 0], [[0, 'meta', 47]]), ([0, 255, 81, 3, 7, 161, 32, 0, 144, 60, 64], [[0, 'meta', 81], [0, 144, 60, 64]]), ([0, 224, 0, 64, 16, 0, 65], [[0, 224, 0, 64], [16, 224, 0, 65]]), ([5, 144, 60, 100, 5, 128, 60, 0, 5, 62, 0], [[5, 144, 60, 100], [10, 128, 60, 0], [15, 128, 62, 0]]), ([0, 208, 10, 0, 20], [[0, 208, 10], [0, 208, 20]])], [([127, 144, 60, 1], [[127, 144, 60, 1]]), ([128, 0, 144, 60, 1], [[0, 144, 60, 1]]), ([0, 224, 0, 64, 16, 0, 65], [[0, 224, 0, 64], [16, 224, 0, 65]]), ([5, 144, 60, 100, 5, 128, 60, 0, 5, 62, 0], [[5, 144, 60, 100], [10, 128, 60, 0], [15, 128, 62, 0]]), ([0, 208, 10, 0, 20], [[0, 208, 10], [0, 208, 20]]), ([0, 255, 3], None), ([0, 255, 3, 5, 65], None), ([0, 144, 60, 100, 0, 192, 9, 3, 11], [[0, 144, 60, 100], [0, 192, 9], [3, 192, 11]])]]\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":"1966b0c0adf259e7a77f1f821396c3a03541c492f990f087c7a4c69cd166e882","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    out = []\n    i = 0\n    tick = 0\n    running = None\n    while i < len(x):\n        delta = 0\n        while True:\n            if i >= len(x):\n                return None\n            b = x[i]\n            i += 1\n            delta = (delta << 7) | (b & 0x7F)\n            if b < 0x7F:\n                break\n        tick += delta\n        if i >= len(x):\n            return None\n        status = x[i]\n        if status == 0xFF:\n            if i + 2 >= len(x):\n                return None\n            kind = x[i + 1]\n            i += 3 + x[i + 2]\n            if i > len(x):\n                return None\n            running = None\n            out.append([tick, 'meta', kind])\n            continue\n        if status & 0x80:\n            i += 1\n            running = status\n        elif running is None:\n            return None\n        else:\n            status = running\n        size = 1 if (status & 0xF0) in (0xC0, 0xD0) else 2\n        if i + size > len(x):\n            return None\n        out.append([tick, status] + x[i:i + size])\n        i += size\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([0, 144, 60, 100, 10, 60, 0], [[0, 144, 60, 100], [10, 144, 60, 0]]), ([0, 192, 5, 0, 6], [[0, 192, 5], [0, 192, 6]]), ([0, 208, 64, 0, 50], [[0, 208, 64], [0, 208, 50]]), ([0, 144, 60, 100, 0, 255, 1, 0, 0, 62, 100], None), ([0, 144, 60, 100, 0, 255, 1, 1, 65, 0, 62, 100], None), ([0, 176, 7, 100, 20, 10, 90], [[0, 176, 7, 100], [20, 176, 10, 90]]), ([127, 144, 60, 1], [[127, 144, 60, 1]]), ([128, 0, 144, 60, 1], [[0, 144, 60, 1]])], [([0, 144, 60, 100, 0, 255, 1, 0, 0, 62, 100], None), ([0, 144, 60, 100, 0, 255, 1, 1, 65, 0, 62, 100], None), ([0, 176, 7, 100, 20, 10, 90], [[0, 176, 7, 100], [20, 176, 10, 90]]), ([127, 144, 60, 1], [[127, 144, 60, 1]]), ([128, 0, 144, 60, 1], [[0, 144, 60, 1]]), ([129, 0, 144, 60, 1], [[128, 144, 60, 1]]), ([0, 144, 60], None), ([0, 62, 100], None)], [([127, 144, 60, 1], [[127, 144, 60, 1]]), ([128, 0, 144, 60, 1], [[0, 144, 60, 1]]), ([129, 0, 144, 60, 1], [[128, 144, 60, 1]]), ([0, 144, 60], None), ([0, 62, 100], None), ([0, 192, 5, 7, 6, 0, 144, 64, 90], [[0, 192, 5], [7, 192, 6], [7, 144, 64, 90]]), ([0, 255, 47, 0], [[0, 'meta', 47]]), ([0, 255, 81, 3, 7, 161, 32, 0, 144, 60, 64], [[0, 'meta', 81], [0, 144, 60, 64]])], [([127, 144, 60, 1], [[127, 144, 60, 1]]), ([128, 0, 144, 60, 1], [[0, 144, 60, 1]]), ([0, 192, 5, 7, 6, 0, 144, 64, 90], [[0, 192, 5], [7, 192, 6], [7, 144, 64, 90]]), ([0, 255, 47, 0], [[0, 'meta', 47]]), ([0, 255, 81, 3, 7, 161, 32, 0, 144, 60, 64], [[0, 'meta', 81], [0, 144, 60, 64]]), ([0, 224, 0, 64, 16, 0, 65], [[0, 224, 0, 64], [16, 224, 0, 65]]), ([5, 144, 60, 100, 5, 128, 60, 0, 5, 62, 0], [[5, 144, 60, 100], [10, 128, 60, 0], [15, 128, 62, 0]]), ([0, 208, 10, 0, 20], [[0, 208, 10], [0, 208, 20]])], [([127, 144, 60, 1], [[127, 144, 60, 1]]), ([128, 0, 144, 60, 1], [[0, 144, 60, 1]]), ([0, 224, 0, 64, 16, 0, 65], [[0, 224, 0, 64], [16, 224, 0, 65]]), ([5, 144, 60, 100, 5, 128, 60, 0, 5, 62, 0], [[5, 144, 60, 100], [10, 128, 60, 0], [15, 128, 62, 0]]), ([0, 208, 10, 0, 20], [[0, 208, 10], [0, 208, 20]]), ([0, 255, 3], None), ([0, 255, 3, 5, 65], None), ([0, 144, 60, 100, 0, 192, 9, 3, 11], [[0, 144, 60, 100], [0, 192, 9], [3, 192, 11]])]]\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-running-status-parse-delta-terminator","generated_at":"2026-09-29T14:50:02.765310+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 delta terminator test compares against 0x7F instead of testing the continuation bit, so 127 is misread.","sha256":"ef6ef3d285b0128866e486a63e853f0928aa6f3cb83f6e52b05faef05f7e02a4","title":"Track event parser with running status: delta byte 0x7F treated as continuation · 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":43.62,"exit_code":1,"observations":[{"actual":[[0,144,60,100],[10,144,60,0]],"check":"oracle 0","expected":[[0,144,60,100],[10,144,60,0]],"passed":true},{"actual":[[0,192,5],[0,192,6]],"check":"oracle 1","expected":[[0,192,5],[0,192,6]],"passed":true},{"actual":[[0,208,64],[0,208,50]],"check":"oracle 2","expected":[[0,208,64],[0,208,50]],"passed":true},{"actual":null,"check":"oracle 3","expected":null,"passed":true},{"actual":null,"check":"oracle 4","expected":null,"passed":true},{"actual":[[0,176,7,100],[20,176,10,90]],"check":"oracle 5","expected":[[0,176,7,100],[20,176,10,90]],"passed":true},{"actual":[[127,144,60,1]],"check":"oracle 6","expected":[[127,144,60,1]],"passed":true},{"actual":null,"check":"oracle 7","expected":[[0,144,60,1]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"oracle 0\", \"actual\": [[0, 144, 60, 100], [10, 144, 60, 0]], \"expected\": [[0, 144, 60, 100], [10, 144, 60, 0]], \"passed\": true}, {\"check\": \"oracle 1\", \"actual\": [[0, 192, 5], [0, 192, 6]], \"expected\": [[0, 192, 5], [0, 192, 6]], \"passed\": true}, {\"check\": \"oracle 2\", \"actual\": [[0, 208, 64], [0, 208, 50]], \"expected\": [[0, 208, 64], [0, 208, 50]], \"passed\": true}, {\"check\": \"oracle 3\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"oracle 4\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"oracle 5\", \"actual\": [[0, 176, 7, 100], [20, 176, 10, 90]], \"expected\": [[0, 176, 7, 100], [20, 176, 10, 90]], \"passed\": true}, {\"check\": \"oracle 6\", \"actual\": [[127, 144, 60, 1]], \"expected\": [[127, 144, 60, 1]], \"passed\": true}, {\"check\": \"oracle 7\", \"actual\": null, \"expected\": [[0, 144, 60, 1]], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":45.576,"exit_code":1,"observations":[{"actual":[[0,144,60,100],[10,144,60,0]],"check":"oracle 0","expected":[[0,144,60,100],[10,144,60,0]],"passed":true},{"actual":[[0,192,5],[0,192,6]],"check":"oracle 1","expected":[[0,192,5],[0,192,6]],"passed":true},{"actual":[[0,208,64],[0,208,50]],"check":"oracle 2","expected":[[0,208,64],[0,208,50]],"passed":true},{"actual":null,"check":"oracle 3","expected":null,"passed":true},{"actual":null,"check":"oracle 4","expected":null,"passed":true},{"actual":[[0,176,7,100],[20,176,10,90]],"check":"oracle 5","expected":[[0,176,7,100],[20,176,10,90]],"passed":true},{"actual":null,"check":"oracle 6","expected":[[127,144,60,1]],"passed":false},{"actual":[[0,144,60,1]],"check":"oracle 7","expected":[[0,144,60,1]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"oracle 0\", \"actual\": [[0, 144, 60, 100], [10, 144, 60, 0]], \"expected\": [[0, 144, 60, 100], [10, 144, 60, 0]], \"passed\": true}, {\"check\": \"oracle 1\", \"actual\": [[0, 192, 5], [0, 192, 6]], \"expected\": [[0, 192, 5], [0, 192, 6]], \"passed\": true}, {\"check\": \"oracle 2\", \"actual\": [[0, 208, 64], [0, 208, 50]], \"expected\": [[0, 208, 64], [0, 208, 50]], \"passed\": true}, {\"check\": \"oracle 3\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"oracle 4\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"oracle 5\", \"actual\": [[0, 176, 7, 100], [20, 176, 10, 90]], \"expected\": [[0, 176, 7, 100], [20, 176, 10, 90]], \"passed\": true}, {\"check\": \"oracle 6\", \"actual\": null, \"expected\": [[127, 144, 60, 1]], \"passed\": false}, {\"check\": \"oracle 7\", \"actual\": [[0, 144, 60, 1]], \"expected\": [[0, 144, 60, 1]], \"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."}}