{"abstract":"The event trace violates the cancel clear rule and produces incorrect keyboard state or command output.","category":"Keyboard interactions","checks":10,"contract":"Events [kind,key,owner]. Down arms a key for its owner; repeated down preserves the original owner. Up emits key only for matching key and owner then always disarms that physical key. Cancel clears all pending keys; owner-left clears that owner. Return emitted key-owner pairs and sorted pending pairs. Inputs are finite ordered event traces; return the stated deterministic state. Batch entries are independent. N varies the number of independent input transactions.","contract_signature":"cases","evaluation_group":"s3-keyboard-release-binding","failed_approach":"The partial repair changes this transition to pending.pop(key,None), which still violates the model contract on the explicit regression traces.","family":"s3-keyboard-interactions-release-binding-cancel-clear","id":"FA-31021","implementations":{"attempt":{"sha256":"72bab2aa23d30a3f2f3f06a03c5d340733e2e96aa8e0a693f98e25ef92e111c4","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(cases):\n    def run(c):\n        pending={}; emitted=[]; cancelled=0; unmatched=0\n        for kind,key,owner in c:\n            if kind=='down':\n                if key not in pending: pending[key]=owner\n            elif kind=='up':\n                if key in pending and pending[key]==owner:\n                    emitted.append([key,owner])\n                else: unmatched+=1\n                pending.pop(key,None)\n            elif kind=='cancel':\n                cancelled+=len(pending)\n                pending.pop(key,None)\n            elif kind=='owner-left':\n                dropped=[k for k,v in pending.items() if v==owner]\n                cancelled+=len(dropped)\n                for k in dropped: pending.pop(k)\n        return [emitted,sorted([[k,v] for k,v in pending.items()]),cancelled,unmatched]\n    return [run(c) for c in cases]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('release-binding scenario 0', solve([[]] * N), [[[], [], 0, 0]] * N)\ncheck('release-binding scenario 1', solve([[['down', 'A', 'one'], ['down', 'B', 'one'], ['cancel', '', '']]] * N), [[[], [], 2, 0]] * N)\ncheck('release-binding scenario 2', solve([[['up', 'A', 'one'], ['up', 'B', 'one']]] * N), [[[], [], 0, 2]] * N)\ncheck('release-binding scenario 3', solve([[['down', 'A', 'one'], ['down', 'A', 'two'], ['up', 'A', 'two']]] * N), [[[], [], 0, 1]] * N)\ncheck('release-binding scenario 4', solve([[['down', 'A', 'one'], ['up', 'A', 'one'], ['up', 'A', 'one']]] * N), [[[['A', 'one']], [], 0, 1]] * N)\ncheck('release-binding scenario 5', solve([[['down', 'A', 'one'], ['down', 'B', 'two'], ['up', 'A', 'one']]] * N), [[[['A', 'one']], [['B', 'two']], 0, 0]] * N)\ncheck('release-binding scenario 6', solve([[['down', 'A', 'one'], ['down', 'B', 'one'], ['cancel', '', ''], ['cancel', '', '']]] * N), [[[], [], 2, 0]] * N)\ncheck('release-binding scenario 7', solve([[['down', 'A', 'one'], ['down', 'B', 'one'], ['down', 'C', 'two'], ['owner-left', '', 'one']]] * N), [[[], [['C', 'two']], 2, 0]] * N)\ncheck('release-binding scenario 8', solve([[['down', 'A', 'one'], ['owner-left', '', 'two']]] * N), [[[], [['A', 'one']], 0, 0]] * N)\ncheck('release-binding scenario 9', solve([[['down', 'A', 'one'], ['cancel', '', ''], ['down', 'B', 'two'], ['cancel', '', '']]] * N), [[[], [], 2, 0]] * N)\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":"158555333708fb1f3fcde6fe4e724b97e3261f5050c76ecbb214829ca739e48a","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(cases):\n    def run(c):\n        pending={}; emitted=[]; cancelled=0; unmatched=0\n        for kind,key,owner in c:\n            if kind=='down':\n                if key not in pending: pending[key]=owner\n            elif kind=='up':\n                if key in pending and pending[key]==owner:\n                    emitted.append([key,owner])\n                else: unmatched+=1\n                pending.pop(key,None)\n            elif kind=='cancel':\n                cancelled+=len(pending)\n                pass\n            elif kind=='owner-left':\n                dropped=[k for k,v in pending.items() if v==owner]\n                cancelled+=len(dropped)\n                for k in dropped: pending.pop(k)\n        return [emitted,sorted([[k,v] for k,v in pending.items()]),cancelled,unmatched]\n    return [run(c) for c in cases]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('release-binding scenario 0', solve([[]] * N), [[[], [], 0, 0]] * N)\ncheck('release-binding scenario 1', solve([[['down', 'A', 'one'], ['down', 'B', 'one'], ['cancel', '', '']]] * N), [[[], [], 2, 0]] * N)\ncheck('release-binding scenario 2', solve([[['up', 'A', 'one'], ['up', 'B', 'one']]] * N), [[[], [], 0, 2]] * N)\ncheck('release-binding scenario 3', solve([[['down', 'A', 'one'], ['down', 'A', 'two'], ['up', 'A', 'two']]] * N), [[[], [], 0, 1]] * N)\ncheck('release-binding scenario 4', solve([[['down', 'A', 'one'], ['up', 'A', 'one'], ['up', 'A', 'one']]] * N), [[[['A', 'one']], [], 0, 1]] * N)\ncheck('release-binding scenario 5', solve([[['down', 'A', 'one'], ['down', 'B', 'two'], ['up', 'A', 'one']]] * N), [[[['A', 'one']], [['B', 'two']], 0, 0]] * N)\ncheck('release-binding scenario 6', solve([[['down', 'A', 'one'], ['down', 'B', 'one'], ['cancel', '', ''], ['cancel', '', '']]] * N), [[[], [], 2, 0]] * N)\ncheck('release-binding scenario 7', solve([[['down', 'A', 'one'], ['down', 'B', 'one'], ['down', 'C', 'two'], ['owner-left', '', 'one']]] * N), [[[], [['C', 'two']], 2, 0]] * N)\ncheck('release-binding scenario 8', solve([[['down', 'A', 'one'], ['owner-left', '', 'two']]] * N), [[[], [['A', 'one']], 0, 0]] * N)\ncheck('release-binding scenario 9', solve([[['down', 'A', 'one'], ['cancel', '', ''], ['down', 'B', 'two'], ['cancel', '', '']]] * N), [[[], [], 2, 0]] * N)\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":"Offline stipulated event model, not a browser implementation or web standard conformance claim. 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":"s3-keyboard-interactions-release-binding-cancel-clear","generated_at":"2026-09-29T14:41:58.374337+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Controlled keyboard event processing model for debugging application event logic.","root_cause":"Global cancellation leaves unrelated pending release commands alive.","sha256":"99d17c96b70468eb7f8fd147e86f13d8c0e4b40209a8d84a0c7818257b2fba13","title":"Release activated command binding: Global cancellation leaves unrelated pending release commands alive · 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.09,"exit_code":1,"observations":[{"actual":[[[],[],0,0]],"check":"release-binding scenario 0","expected":[[[],[],0,0]],"passed":true},{"actual":[[[],[["A","one"],["B","one"]],2,0]],"check":"release-binding scenario 1","expected":[[[],[],2,0]],"passed":false},{"actual":[[[],[],0,2]],"check":"release-binding scenario 2","expected":[[[],[],0,2]],"passed":true},{"actual":[[[],[],0,1]],"check":"release-binding scenario 3","expected":[[[],[],0,1]],"passed":true},{"actual":[[[["A","one"]],[],0,1]],"check":"release-binding scenario 4","expected":[[[["A","one"]],[],0,1]],"passed":true},{"actual":[[[["A","one"]],[["B","two"]],0,0]],"check":"release-binding scenario 5","expected":[[[["A","one"]],[["B","two"]],0,0]],"passed":true},{"actual":[[[],[["A","one"],["B","one"]],4,0]],"check":"release-binding scenario 6","expected":[[[],[],2,0]],"passed":false},{"actual":[[[],[["C","two"]],2,0]],"check":"release-binding scenario 7","expected":[[[],[["C","two"]],2,0]],"passed":true},{"actual":[[[],[["A","one"]],0,0]],"check":"release-binding scenario 8","expected":[[[],[["A","one"]],0,0]],"passed":true},{"actual":[[[],[["A","one"],["B","two"]],3,0]],"check":"release-binding scenario 9","expected":[[[],[],2,0]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"release-binding scenario 0\", \"actual\": [[[], [], 0, 0]], \"expected\": [[[], [], 0, 0]], \"passed\": true}, {\"check\": \"release-binding scenario 1\", \"actual\": [[[], [[\"A\", \"one\"], [\"B\", \"one\"]], 2, 0]], \"expected\": [[[], [], 2, 0]], \"passed\": false}, {\"check\": \"release-binding scenario 2\", \"actual\": [[[], [], 0, 2]], \"expected\": [[[], [], 0, 2]], \"passed\": true}, {\"check\": \"release-binding scenario 3\", \"actual\": [[[], [], 0, 1]], \"expected\": [[[], [], 0, 1]], \"passed\": true}, {\"check\": \"release-binding scenario 4\", \"actual\": [[[[\"A\", \"one\"]], [], 0, 1]], \"expected\": [[[[\"A\", \"one\"]], [], 0, 1]], \"passed\": true}, {\"check\": \"release-binding scenario 5\", \"actual\": [[[[\"A\", \"one\"]], [[\"B\", \"two\"]], 0, 0]], \"expected\": [[[[\"A\", \"one\"]], [[\"B\", \"two\"]], 0, 0]], \"passed\": true}, {\"check\": \"release-binding scenario 6\", \"actual\": [[[], [[\"A\", \"one\"], [\"B\", \"one\"]], 4, 0]], \"expected\": [[[], [], 2, 0]], \"passed\": false}, {\"check\": \"release-binding scenario 7\", \"actual\": [[[], [[\"C\", \"two\"]], 2, 0]], \"expected\": [[[], [[\"C\", \"two\"]], 2, 0]], \"passed\": true}, {\"check\": \"release-binding scenario 8\", \"actual\": [[[], [[\"A\", \"one\"]], 0, 0]], \"expected\": [[[], [[\"A\", \"one\"]], 0, 0]], \"passed\": true}, {\"check\": \"release-binding scenario 9\", \"actual\": [[[], [[\"A\", \"one\"], [\"B\", \"two\"]], 3, 0]], \"expected\": [[[], [], 2, 0]], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.247,"exit_code":1,"observations":[{"actual":[[[],[],0,0]],"check":"release-binding scenario 0","expected":[[[],[],0,0]],"passed":true},{"actual":[[[],[["A","one"],["B","one"]],2,0]],"check":"release-binding scenario 1","expected":[[[],[],2,0]],"passed":false},{"actual":[[[],[],0,2]],"check":"release-binding scenario 2","expected":[[[],[],0,2]],"passed":true},{"actual":[[[],[],0,1]],"check":"release-binding scenario 3","expected":[[[],[],0,1]],"passed":true},{"actual":[[[["A","one"]],[],0,1]],"check":"release-binding scenario 4","expected":[[[["A","one"]],[],0,1]],"passed":true},{"actual":[[[["A","one"]],[["B","two"]],0,0]],"check":"release-binding scenario 5","expected":[[[["A","one"]],[["B","two"]],0,0]],"passed":true},{"actual":[[[],[["A","one"],["B","one"]],4,0]],"check":"release-binding scenario 6","expected":[[[],[],2,0]],"passed":false},{"actual":[[[],[["C","two"]],2,0]],"check":"release-binding scenario 7","expected":[[[],[["C","two"]],2,0]],"passed":true},{"actual":[[[],[["A","one"]],0,0]],"check":"release-binding scenario 8","expected":[[[],[["A","one"]],0,0]],"passed":true},{"actual":[[[],[["A","one"],["B","two"]],3,0]],"check":"release-binding scenario 9","expected":[[[],[],2,0]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"release-binding scenario 0\", \"actual\": [[[], [], 0, 0]], \"expected\": [[[], [], 0, 0]], \"passed\": true}, {\"check\": \"release-binding scenario 1\", \"actual\": [[[], [[\"A\", \"one\"], [\"B\", \"one\"]], 2, 0]], \"expected\": [[[], [], 2, 0]], \"passed\": false}, {\"check\": \"release-binding scenario 2\", \"actual\": [[[], [], 0, 2]], \"expected\": [[[], [], 0, 2]], \"passed\": true}, {\"check\": \"release-binding scenario 3\", \"actual\": [[[], [], 0, 1]], \"expected\": [[[], [], 0, 1]], \"passed\": true}, {\"check\": \"release-binding scenario 4\", \"actual\": [[[[\"A\", \"one\"]], [], 0, 1]], \"expected\": [[[[\"A\", \"one\"]], [], 0, 1]], \"passed\": true}, {\"check\": \"release-binding scenario 5\", \"actual\": [[[[\"A\", \"one\"]], [[\"B\", \"two\"]], 0, 0]], \"expected\": [[[[\"A\", \"one\"]], [[\"B\", \"two\"]], 0, 0]], \"passed\": true}, {\"check\": \"release-binding scenario 6\", \"actual\": [[[], [[\"A\", \"one\"], [\"B\", \"one\"]], 4, 0]], \"expected\": [[[], [], 2, 0]], \"passed\": false}, {\"check\": \"release-binding scenario 7\", \"actual\": [[[], [[\"C\", \"two\"]], 2, 0]], \"expected\": [[[], [[\"C\", \"two\"]], 2, 0]], \"passed\": true}, {\"check\": \"release-binding scenario 8\", \"actual\": [[[], [[\"A\", \"one\"]], 0, 0]], \"expected\": [[[], [[\"A\", \"one\"]], 0, 0]], \"passed\": true}, {\"check\": \"release-binding scenario 9\", \"actual\": [[[], [[\"A\", \"one\"], [\"B\", \"two\"]], 3, 0]], \"expected\": [[[], [], 2, 0]], \"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."}}