{"abstract":"A strength of 0 (no-op quantise) is rejected instead of returning the input unchanged.","category":"MIDI event timing","checks":8,"contract":"Input [ticks, grid, strength] with grid > 0 and strength 0..100 percent. Each tick moves toward its nearest grid line (exact halves go to the later line) by strength percent of the distance, with the displacement truncated toward zero. Invalid parameters return None.","contract_signature":"x","evaluation_group":"w2-midi-event-timing-grid-quantize","failed_approach":"Excluding the upper endpoint instead rejects full-strength quantisation.","family":"w2-midi-event-timing-grid-quantize-strength-range","id":"FA-81551","implementations":{"attempt":{"sha256":"e06749cb8436d9042f336b03ce8fab8152371c080a9dc2693264341914a8ff98","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    ticks, grid, strength = x\n    if grid <= 0 or not 0 <= strength < 100:\n        return None\n    out = []\n    for t in ticks:\n        target = (2 * t + grid) // (2 * grid) * grid\n        move = (target - t) * strength\n        step = abs(move) // 100\n        out.append(t + step if move >= 0 else t - step)\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([[0, 10, 50, 110, 120], 120, 100], [0, 0, 0, 120, 120]), ([[10, 110], 120, 50], [5, 115]), ([[10, 110], 120, 75], [3, 117]), ([[7, 113], 120, 33], [5, 115]), ([[5, 115], 120, 0], [5, 115]), ([[5, 115], 120, 100], [0, 120]), ([[5], 120, 101], None), ([[5], 0, 50], None)], [([[60, 180], 120, 100], [120, 240]), ([[5, 115], 120, 0], [5, 115]), ([[5], 120, 101], None), ([[5], 0, 50], None), ([[5], 120, -1], None), ([[239, 241], 240, 50], [239, 241]), ([[1, 2, 3, 4], 3, 50], [1, 2, 3, 4]), ([[45, 75], 30, 100], [60, 90])], [([[0, 10, 50, 110, 120], 120, 100], [0, 0, 0, 120, 120]), ([[59, 61], 120, 100], [0, 120]), ([[5, 115], 120, 0], [5, 115]), ([[239, 241], 240, 50], [239, 241]), ([[1, 2, 3, 4], 3, 50], [1, 2, 3, 4]), ([[44, 76], 30, 90], [32, 88]), ([[1000, 1030], 120, 80], [968, 1070]), ([[125], 120, 99], [121])], [([[0, 10, 50, 110, 120], 120, 100], [0, 0, 0, 120, 120]), ([[60, 180], 120, 100], [120, 240]), ([[59, 61], 120, 100], [0, 120]), ([[5, 115], 120, 0], [5, 115]), ([[5, 115], 120, 100], [0, 120]), ([[45, 75], 30, 100], [60, 90]), ([[1000, 1030], 120, 80], [968, 1070]), ([[125], 120, 99], [121])], [([[60, 180], 120, 100], [120, 240]), ([[59, 61], 120, 100], [0, 120]), ([[10, 110], 120, 50], [5, 115]), ([[10, 110], 120, 75], [3, 117]), ([[7, 113], 120, 33], [5, 115]), ([[5, 115], 120, 0], [5, 115]), ([[5, 115], 120, 100], [0, 120]), ([[45, 75], 30, 100], [60, 90])]]\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":"8766e90c1fbd790efa722195ac0fb9f3fca0ed8ecfa5026a5d709c0d6fdd3fad","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    ticks, grid, strength = x\n    if grid <= 0 or not 0 < strength <= 100:\n        return None\n    out = []\n    for t in ticks:\n        target = (2 * t + grid) // (2 * grid) * grid\n        move = (target - t) * strength\n        step = abs(move) // 100\n        out.append(t + step if move >= 0 else t - step)\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([[0, 10, 50, 110, 120], 120, 100], [0, 0, 0, 120, 120]), ([[10, 110], 120, 50], [5, 115]), ([[10, 110], 120, 75], [3, 117]), ([[7, 113], 120, 33], [5, 115]), ([[5, 115], 120, 0], [5, 115]), ([[5, 115], 120, 100], [0, 120]), ([[5], 120, 101], None), ([[5], 0, 50], None)], [([[60, 180], 120, 100], [120, 240]), ([[5, 115], 120, 0], [5, 115]), ([[5], 120, 101], None), ([[5], 0, 50], None), ([[5], 120, -1], None), ([[239, 241], 240, 50], [239, 241]), ([[1, 2, 3, 4], 3, 50], [1, 2, 3, 4]), ([[45, 75], 30, 100], [60, 90])], [([[0, 10, 50, 110, 120], 120, 100], [0, 0, 0, 120, 120]), ([[59, 61], 120, 100], [0, 120]), ([[5, 115], 120, 0], [5, 115]), ([[239, 241], 240, 50], [239, 241]), ([[1, 2, 3, 4], 3, 50], [1, 2, 3, 4]), ([[44, 76], 30, 90], [32, 88]), ([[1000, 1030], 120, 80], [968, 1070]), ([[125], 120, 99], [121])], [([[0, 10, 50, 110, 120], 120, 100], [0, 0, 0, 120, 120]), ([[60, 180], 120, 100], [120, 240]), ([[59, 61], 120, 100], [0, 120]), ([[5, 115], 120, 0], [5, 115]), ([[5, 115], 120, 100], [0, 120]), ([[45, 75], 30, 100], [60, 90]), ([[1000, 1030], 120, 80], [968, 1070]), ([[125], 120, 99], [121])], [([[60, 180], 120, 100], [120, 240]), ([[59, 61], 120, 100], [0, 120]), ([[10, 110], 120, 50], [5, 115]), ([[10, 110], 120, 75], [3, 117]), ([[7, 113], 120, 33], [5, 115]), ([[5, 115], 120, 0], [5, 115]), ([[5, 115], 120, 100], [0, 120]), ([[45, 75], 30, 100], [60, 90])]]\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-grid-quantize-strength-range","generated_at":"2026-09-29T14:50:03.968334+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 strength range excludes its lower endpoint.","sha256":"7283daed46da51814b5da64faf4927371fdd209d2ce2393e703054694a6e93a7","title":"Strength-weighted grid quantisation: zero strength rejected · 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":39.655,"exit_code":1,"observations":[{"actual":null,"check":"oracle 0","expected":[0,0,0,120,120],"passed":false},{"actual":[5,115],"check":"oracle 1","expected":[5,115],"passed":true},{"actual":[3,117],"check":"oracle 2","expected":[3,117],"passed":true},{"actual":[5,115],"check":"oracle 3","expected":[5,115],"passed":true},{"actual":[5,115],"check":"oracle 4","expected":[5,115],"passed":true},{"actual":null,"check":"oracle 5","expected":[0,120],"passed":false},{"actual":null,"check":"oracle 6","expected":null,"passed":true},{"actual":null,"check":"oracle 7","expected":null,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"oracle 0\", \"actual\": null, \"expected\": [0, 0, 0, 120, 120], \"passed\": false}, {\"check\": \"oracle 1\", \"actual\": [5, 115], \"expected\": [5, 115], \"passed\": true}, {\"check\": \"oracle 2\", \"actual\": [3, 117], \"expected\": [3, 117], \"passed\": true}, {\"check\": \"oracle 3\", \"actual\": [5, 115], \"expected\": [5, 115], \"passed\": true}, {\"check\": \"oracle 4\", \"actual\": [5, 115], \"expected\": [5, 115], \"passed\": true}, {\"check\": \"oracle 5\", \"actual\": null, \"expected\": [0, 120], \"passed\": false}, {\"check\": \"oracle 6\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"oracle 7\", \"actual\": null, \"expected\": null, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":38.646,"exit_code":1,"observations":[{"actual":[0,0,0,120,120],"check":"oracle 0","expected":[0,0,0,120,120],"passed":true},{"actual":[5,115],"check":"oracle 1","expected":[5,115],"passed":true},{"actual":[3,117],"check":"oracle 2","expected":[3,117],"passed":true},{"actual":[5,115],"check":"oracle 3","expected":[5,115],"passed":true},{"actual":null,"check":"oracle 4","expected":[5,115],"passed":false},{"actual":[0,120],"check":"oracle 5","expected":[0,120],"passed":true},{"actual":null,"check":"oracle 6","expected":null,"passed":true},{"actual":null,"check":"oracle 7","expected":null,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"oracle 0\", \"actual\": [0, 0, 0, 120, 120], \"expected\": [0, 0, 0, 120, 120], \"passed\": true}, {\"check\": \"oracle 1\", \"actual\": [5, 115], \"expected\": [5, 115], \"passed\": true}, {\"check\": \"oracle 2\", \"actual\": [3, 117], \"expected\": [3, 117], \"passed\": true}, {\"check\": \"oracle 3\", \"actual\": [5, 115], \"expected\": [5, 115], \"passed\": true}, {\"check\": \"oracle 4\", \"actual\": null, \"expected\": [5, 115], \"passed\": false}, {\"check\": \"oracle 5\", \"actual\": [0, 120], \"expected\": [0, 120], \"passed\": true}, {\"check\": \"oracle 6\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"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."}}