{"abstract":"The event trace violates the blur reset rule and produces incorrect keyboard state or command output.","category":"Keyboard interactions","checks":8,"contract":"Events are [kind,device,code,location]. Down inserts a unique physical token; up removes exactly that token; disconnect clears that device; blur clears all. Track maximum simultaneous held count, accepted presses, releases, orphan ups and sorted held tokens. Inputs are finite ordered event traces; return the stated deterministic state. Batch entries are independent. N varies the number of independent input transactions.","evaluation_group":"s3-keyboard-physical-registry","failed_approach":"The partial repair changes this transition to held={x for x in held if x[2]==0}, which still violates the model contract on the explicit regression traces.","family":"s3-keyboard-interactions-physical-registry-blur-reset","id":"FA-30886","implementations":{"attempt":{"sha256":"e9c844b45d7830f663f04e114ca046efdd0cd3b6f89cb4354e90b618c97d0d98","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(cases):\n    def run(c):\n        held=set(); peak=0; presses=0; releases=0; orphan=0\n        for kind,device,code,location in c:\n            token=(device,code,location)\n            if kind=='down':\n                fresh=token not in held\n                if fresh: presses+=1\n                held.add(token)\n                peak=max(peak,len(held))\n            elif kind=='up':\n                if token in held:\n                    held.remove(token)\n                    releases+=1\n                else: orphan+=1\n            elif kind=='disconnect':\n                held={x for x in held if x[0]!=device}\n            elif kind=='blur':\n                held={x for x in held if x[2]==0}\n        return [sorted([list(x) for x in held]),peak,presses,releases,orphan]\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('physical-registry scenario 0', solve([[]] * N), [[[], 0, 0, 0, 0]] * N)\ncheck('physical-registry scenario 1', solve([[['up', 'a', 'A', 0], ['up', 'a', 'B', 0]]] * N), [[[], 0, 0, 0, 2]] * N)\ncheck('physical-registry scenario 2', solve([[['down', 'a', 'A', 0], ['down', 'a', 'A', 0], ['down', 'a', 'A', 0]]] * N), [[[['a', 'A', 0]], 1, 1, 0, 0]] * N)\ncheck('physical-registry scenario 3', solve([[['down', 'a', 'A', 0], ['down', 'b', 'A', 0], ['up', 'a', 'A', 0]]] * N), [[[['b', 'A', 0]], 2, 2, 1, 0]] * N)\ncheck('physical-registry scenario 4', solve([[['down', 'a', 'S', 1], ['down', 'a', 'S', 3], ['up', 'a', 'S', 1]]] * N), [[[['a', 'S', 3]], 2, 2, 1, 0]] * N)\ncheck('physical-registry scenario 5', solve([[['down', 'a', 'A', 0], ['down', 'a', 'B', 0], ['up', 'a', 'A', 0], ['down', 'a', 'C', 0], ['up', 'a', 'B', 0], ['up', 'a', 'C', 0], ['down', 'a', 'D', 0]]] * N), [[[['a', 'D', 0]], 2, 4, 3, 0]] * N)\ncheck('physical-registry scenario 6', solve([[['down', 'a', 'A', 0], ['down', 'b', 'B', 0], ['disconnect', 'a', '', 0]]] * N), [[[['b', 'B', 0]], 2, 2, 0, 0]] * N)\ncheck('physical-registry scenario 7', solve([[['down', 'a', 'A', 0], ['down', 'a', 'B', 1], ['blur', '', '', 0]]] * N), [[[], 2, 2, 0, 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":"5d94c09f460624a5851874f202988b888fdeaabcf9506d4a5ebe7f6ebdd63659","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(cases):\n    def run(c):\n        held=set(); peak=0; presses=0; releases=0; orphan=0\n        for kind,device,code,location in c:\n            token=(device,code,location)\n            if kind=='down':\n                fresh=token not in held\n                if fresh: presses+=1\n                held.add(token)\n                peak=max(peak,len(held))\n            elif kind=='up':\n                if token in held:\n                    held.remove(token)\n                    releases+=1\n                else: orphan+=1\n            elif kind=='disconnect':\n                held={x for x in held if x[0]!=device}\n            elif kind=='blur':\n                pass\n        return [sorted([list(x) for x in held]),peak,presses,releases,orphan]\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('physical-registry scenario 0', solve([[]] * N), [[[], 0, 0, 0, 0]] * N)\ncheck('physical-registry scenario 1', solve([[['up', 'a', 'A', 0], ['up', 'a', 'B', 0]]] * N), [[[], 0, 0, 0, 2]] * N)\ncheck('physical-registry scenario 2', solve([[['down', 'a', 'A', 0], ['down', 'a', 'A', 0], ['down', 'a', 'A', 0]]] * N), [[[['a', 'A', 0]], 1, 1, 0, 0]] * N)\ncheck('physical-registry scenario 3', solve([[['down', 'a', 'A', 0], ['down', 'b', 'A', 0], ['up', 'a', 'A', 0]]] * N), [[[['b', 'A', 0]], 2, 2, 1, 0]] * N)\ncheck('physical-registry scenario 4', solve([[['down', 'a', 'S', 1], ['down', 'a', 'S', 3], ['up', 'a', 'S', 1]]] * N), [[[['a', 'S', 3]], 2, 2, 1, 0]] * N)\ncheck('physical-registry scenario 5', solve([[['down', 'a', 'A', 0], ['down', 'a', 'B', 0], ['up', 'a', 'A', 0], ['down', 'a', 'C', 0], ['up', 'a', 'B', 0], ['up', 'a', 'C', 0], ['down', 'a', 'D', 0]]] * N), [[[['a', 'D', 0]], 2, 4, 3, 0]] * N)\ncheck('physical-registry scenario 6', solve([[['down', 'a', 'A', 0], ['down', 'b', 'B', 0], ['disconnect', 'a', '', 0]]] * N), [[[['b', 'B', 0]], 2, 2, 0, 0]] * N)\ncheck('physical-registry scenario 7', solve([[['down', 'a', 'A', 0], ['down', 'a', 'B', 1], ['blur', '', '', 0]]] * N), [[[], 2, 2, 0, 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"},"fixed":{"sha256":"592cef79bd0ae8b0ac9411ebd78f708c26e1f71da8d8cc5fcd554bea01d1b1cd","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(cases):\n    def run(c):\n        held=set(); peak=0; presses=0; releases=0; orphan=0\n        for kind,device,code,location in c:\n            token=(device,code,location)\n            if kind=='down':\n                fresh=token not in held\n                if fresh: presses+=1\n                held.add(token)\n                peak=max(peak,len(held))\n            elif kind=='up':\n                if token in held:\n                    held.remove(token)\n                    releases+=1\n                else: orphan+=1\n            elif kind=='disconnect':\n                held={x for x in held if x[0]!=device}\n            elif kind=='blur':\n                held.clear()\n        return [sorted([list(x) for x in held]),peak,presses,releases,orphan]\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('physical-registry scenario 0', solve([[]] * N), [[[], 0, 0, 0, 0]] * N)\ncheck('physical-registry scenario 1', solve([[['up', 'a', 'A', 0], ['up', 'a', 'B', 0]]] * N), [[[], 0, 0, 0, 2]] * N)\ncheck('physical-registry scenario 2', solve([[['down', 'a', 'A', 0], ['down', 'a', 'A', 0], ['down', 'a', 'A', 0]]] * N), [[[['a', 'A', 0]], 1, 1, 0, 0]] * N)\ncheck('physical-registry scenario 3', solve([[['down', 'a', 'A', 0], ['down', 'b', 'A', 0], ['up', 'a', 'A', 0]]] * N), [[[['b', 'A', 0]], 2, 2, 1, 0]] * N)\ncheck('physical-registry scenario 4', solve([[['down', 'a', 'S', 1], ['down', 'a', 'S', 3], ['up', 'a', 'S', 1]]] * N), [[[['a', 'S', 3]], 2, 2, 1, 0]] * N)\ncheck('physical-registry scenario 5', solve([[['down', 'a', 'A', 0], ['down', 'a', 'B', 0], ['up', 'a', 'A', 0], ['down', 'a', 'C', 0], ['up', 'a', 'B', 0], ['up', 'a', 'C', 0], ['down', 'a', 'D', 0]]] * N), [[[['a', 'D', 0]], 2, 4, 3, 0]] * N)\ncheck('physical-registry scenario 6', solve([[['down', 'a', 'A', 0], ['down', 'b', 'B', 0], ['disconnect', 'a', '', 0]]] * N), [[[['b', 'B', 0]], 2, 2, 0, 0]] * N)\ncheck('physical-registry scenario 7', solve([[['down', 'a', 'A', 0], ['down', 'a', 'B', 1], ['blur', '', '', 0]]] * N), [[[], 2, 2, 0, 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-physical-registry-blur-reset","generated_at":"2026-09-29T14:41:57.018695+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.","repair":"Use the contract transition `held.clear()` at the blur reset fault site; preserve the other state transitions.","root_cause":"Window blur leaves physical keys held without future release delivery.","sha256":"5f3b8db810404db72138d204e195222afb7629313f26d6c2d148951b8356c0f0","title":"Physical press ownership registry: Window blur leaves physical keys held without future release delivery · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":40.99,"exit_code":1,"observations":[{"actual":[[[],0,0,0,0]],"check":"physical-registry scenario 0","expected":[[[],0,0,0,0]],"passed":true},{"actual":[[[],0,0,0,2]],"check":"physical-registry scenario 1","expected":[[[],0,0,0,2]],"passed":true},{"actual":[[[["a","A",0]],1,1,0,0]],"check":"physical-registry scenario 2","expected":[[[["a","A",0]],1,1,0,0]],"passed":true},{"actual":[[[["b","A",0]],2,2,1,0]],"check":"physical-registry scenario 3","expected":[[[["b","A",0]],2,2,1,0]],"passed":true},{"actual":[[[["a","S",3]],2,2,1,0]],"check":"physical-registry scenario 4","expected":[[[["a","S",3]],2,2,1,0]],"passed":true},{"actual":[[[["a","D",0]],2,4,3,0]],"check":"physical-registry scenario 5","expected":[[[["a","D",0]],2,4,3,0]],"passed":true},{"actual":[[[["b","B",0]],2,2,0,0]],"check":"physical-registry scenario 6","expected":[[[["b","B",0]],2,2,0,0]],"passed":true},{"actual":[[[["a","A",0]],2,2,0,0]],"check":"physical-registry scenario 7","expected":[[[],2,2,0,0]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"physical-registry scenario 0\", \"actual\": [[[], 0, 0, 0, 0]], \"expected\": [[[], 0, 0, 0, 0]], \"passed\": true}, {\"check\": \"physical-registry scenario 1\", \"actual\": [[[], 0, 0, 0, 2]], \"expected\": [[[], 0, 0, 0, 2]], \"passed\": true}, {\"check\": \"physical-registry scenario 2\", \"actual\": [[[[\"a\", \"A\", 0]], 1, 1, 0, 0]], \"expected\": [[[[\"a\", \"A\", 0]], 1, 1, 0, 0]], \"passed\": true}, {\"check\": \"physical-registry scenario 3\", \"actual\": [[[[\"b\", \"A\", 0]], 2, 2, 1, 0]], \"expected\": [[[[\"b\", \"A\", 0]], 2, 2, 1, 0]], \"passed\": true}, {\"check\": \"physical-registry scenario 4\", \"actual\": [[[[\"a\", \"S\", 3]], 2, 2, 1, 0]], \"expected\": [[[[\"a\", \"S\", 3]], 2, 2, 1, 0]], \"passed\": true}, {\"check\": \"physical-registry scenario 5\", \"actual\": [[[[\"a\", \"D\", 0]], 2, 4, 3, 0]], \"expected\": [[[[\"a\", \"D\", 0]], 2, 4, 3, 0]], \"passed\": true}, {\"check\": \"physical-registry scenario 6\", \"actual\": [[[[\"b\", \"B\", 0]], 2, 2, 0, 0]], \"expected\": [[[[\"b\", \"B\", 0]], 2, 2, 0, 0]], \"passed\": true}, {\"check\": \"physical-registry scenario 7\", \"actual\": [[[[\"a\", \"A\", 0]], 2, 2, 0, 0]], \"expected\": [[[], 2, 2, 0, 0]], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.362,"exit_code":1,"observations":[{"actual":[[[],0,0,0,0]],"check":"physical-registry scenario 0","expected":[[[],0,0,0,0]],"passed":true},{"actual":[[[],0,0,0,2]],"check":"physical-registry scenario 1","expected":[[[],0,0,0,2]],"passed":true},{"actual":[[[["a","A",0]],1,1,0,0]],"check":"physical-registry scenario 2","expected":[[[["a","A",0]],1,1,0,0]],"passed":true},{"actual":[[[["b","A",0]],2,2,1,0]],"check":"physical-registry scenario 3","expected":[[[["b","A",0]],2,2,1,0]],"passed":true},{"actual":[[[["a","S",3]],2,2,1,0]],"check":"physical-registry scenario 4","expected":[[[["a","S",3]],2,2,1,0]],"passed":true},{"actual":[[[["a","D",0]],2,4,3,0]],"check":"physical-registry scenario 5","expected":[[[["a","D",0]],2,4,3,0]],"passed":true},{"actual":[[[["b","B",0]],2,2,0,0]],"check":"physical-registry scenario 6","expected":[[[["b","B",0]],2,2,0,0]],"passed":true},{"actual":[[[["a","A",0],["a","B",1]],2,2,0,0]],"check":"physical-registry scenario 7","expected":[[[],2,2,0,0]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"physical-registry scenario 0\", \"actual\": [[[], 0, 0, 0, 0]], \"expected\": [[[], 0, 0, 0, 0]], \"passed\": true}, {\"check\": \"physical-registry scenario 1\", \"actual\": [[[], 0, 0, 0, 2]], \"expected\": [[[], 0, 0, 0, 2]], \"passed\": true}, {\"check\": \"physical-registry scenario 2\", \"actual\": [[[[\"a\", \"A\", 0]], 1, 1, 0, 0]], \"expected\": [[[[\"a\", \"A\", 0]], 1, 1, 0, 0]], \"passed\": true}, {\"check\": \"physical-registry scenario 3\", \"actual\": [[[[\"b\", \"A\", 0]], 2, 2, 1, 0]], \"expected\": [[[[\"b\", \"A\", 0]], 2, 2, 1, 0]], \"passed\": true}, {\"check\": \"physical-registry scenario 4\", \"actual\": [[[[\"a\", \"S\", 3]], 2, 2, 1, 0]], \"expected\": [[[[\"a\", \"S\", 3]], 2, 2, 1, 0]], \"passed\": true}, {\"check\": \"physical-registry scenario 5\", \"actual\": [[[[\"a\", \"D\", 0]], 2, 4, 3, 0]], \"expected\": [[[[\"a\", \"D\", 0]], 2, 4, 3, 0]], \"passed\": true}, {\"check\": \"physical-registry scenario 6\", \"actual\": [[[[\"b\", \"B\", 0]], 2, 2, 0, 0]], \"expected\": [[[[\"b\", \"B\", 0]], 2, 2, 0, 0]], \"passed\": true}, {\"check\": \"physical-registry scenario 7\", \"actual\": [[[[\"a\", \"A\", 0], [\"a\", \"B\", 1]], 2, 2, 0, 0]], \"expected\": [[[], 2, 2, 0, 0]], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":39.322,"exit_code":0,"observations":[{"actual":[[[],0,0,0,0]],"check":"physical-registry scenario 0","expected":[[[],0,0,0,0]],"passed":true},{"actual":[[[],0,0,0,2]],"check":"physical-registry scenario 1","expected":[[[],0,0,0,2]],"passed":true},{"actual":[[[["a","A",0]],1,1,0,0]],"check":"physical-registry scenario 2","expected":[[[["a","A",0]],1,1,0,0]],"passed":true},{"actual":[[[["b","A",0]],2,2,1,0]],"check":"physical-registry scenario 3","expected":[[[["b","A",0]],2,2,1,0]],"passed":true},{"actual":[[[["a","S",3]],2,2,1,0]],"check":"physical-registry scenario 4","expected":[[[["a","S",3]],2,2,1,0]],"passed":true},{"actual":[[[["a","D",0]],2,4,3,0]],"check":"physical-registry scenario 5","expected":[[[["a","D",0]],2,4,3,0]],"passed":true},{"actual":[[[["b","B",0]],2,2,0,0]],"check":"physical-registry scenario 6","expected":[[[["b","B",0]],2,2,0,0]],"passed":true},{"actual":[[[],2,2,0,0]],"check":"physical-registry scenario 7","expected":[[[],2,2,0,0]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"physical-registry scenario 0\", \"actual\": [[[], 0, 0, 0, 0]], \"expected\": [[[], 0, 0, 0, 0]], \"passed\": true}, {\"check\": \"physical-registry scenario 1\", \"actual\": [[[], 0, 0, 0, 2]], \"expected\": [[[], 0, 0, 0, 2]], \"passed\": true}, {\"check\": \"physical-registry scenario 2\", \"actual\": [[[[\"a\", \"A\", 0]], 1, 1, 0, 0]], \"expected\": [[[[\"a\", \"A\", 0]], 1, 1, 0, 0]], \"passed\": true}, {\"check\": \"physical-registry scenario 3\", \"actual\": [[[[\"b\", \"A\", 0]], 2, 2, 1, 0]], \"expected\": [[[[\"b\", \"A\", 0]], 2, 2, 1, 0]], \"passed\": true}, {\"check\": \"physical-registry scenario 4\", \"actual\": [[[[\"a\", \"S\", 3]], 2, 2, 1, 0]], \"expected\": [[[[\"a\", \"S\", 3]], 2, 2, 1, 0]], \"passed\": true}, {\"check\": \"physical-registry scenario 5\", \"actual\": [[[[\"a\", \"D\", 0]], 2, 4, 3, 0]], \"expected\": [[[[\"a\", \"D\", 0]], 2, 4, 3, 0]], \"passed\": true}, {\"check\": \"physical-registry scenario 6\", \"actual\": [[[[\"b\", \"B\", 0]], 2, 2, 0, 0]], \"expected\": [[[[\"b\", \"B\", 0]], 2, 2, 0, 0]], \"passed\": true}, {\"check\": \"physical-registry scenario 7\", \"actual\": [[[], 2, 2, 0, 0]], \"expected\": [[[], 2, 2, 0, 0]], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}