{"abstract":"The event trace violates the location token 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 token=(device,code,location%2), which still violates the model contract on the explicit regression traces.","family":"s3-keyboard-interactions-physical-registry-location-token","id":"FA-30846","implementations":{"attempt":{"sha256":"bfc7f88201ebbcd8d14776385104ee727c48294df0930202165edba9c017fabd","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%2)\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"},"broken":{"sha256":"d558438fc7929f48b1086ddf52d3861e1b31d042592136af10d149d2c3fc4db4","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,0)\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"},"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-location-token","generated_at":"2026-09-29T14:41:56.684077+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 `token=(device,code,location)` at the location token fault site; preserve the other state transitions.","root_cause":"Physical location is collapsed so two distinct locations alias.","sha256":"5fd40c9c72200f15f978a2e18dbc66a44a99dabdc7a5410c03102b32d9a6a6cd","title":"Physical press ownership registry: Physical location is collapsed so two distinct locations alias · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":40.229,"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":[[[],1,1,1,0]],"check":"physical-registry scenario 4","expected":[[[["a","S",3]],2,2,1,0]],"passed":false},{"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":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\": [[[], 1, 1, 1, 0]], \"expected\": [[[[\"a\", \"S\", 3]], 2, 2, 1, 0]], \"passed\": false}, {\"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\": false}\n"},"broken":{"elapsed_ms":41.696,"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":[[[],1,1,1,0]],"check":"physical-registry scenario 4","expected":[[[["a","S",3]],2,2,1,0]],"passed":false},{"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":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\": [[[], 1, 1, 1, 0]], \"expected\": [[[[\"a\", \"S\", 3]], 2, 2, 1, 0]], \"passed\": false}, {\"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\": false}\n"},"fixed":{"elapsed_ms":41.489,"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"}