{"abstract":"Cancelled context hold fires when the pointer is released.","category":"Menu interactions","checks":8,"contract":"A context menu recognizes secondary-button invocation, pen barrel input and completed hold gestures; concurrent triggers are coalesced by invocation identity.","evaluation_group":"s3-menu-interactions-context-trigger-arbitration","failed_approach":"The attempted repair `p['armed'] or not p['cancelled']` still violates the release oracle.","family":"s3-menu-interactions-context-trigger-arbitration-release","id":"FA-32656","implementations":{"attempt":{"sha256":"b32a28263ff13b1173532923f8f46b2c21bd5473de0deddf80506269a02662a0","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport unicodedata\nN = 1\nobservations = []\ndef solve(action, p):\n    if action == 'secondary':\n        return p['button']==2 and not p['dragging']\n    if action == 'pen':\n        return p['type']=='pen' and bool(p['buttons'] & 2)\n    if action == 'hold':\n        return p['elapsed']>=p['delay'] and p['travel']<=p['slop']\n    if action == 'release':\n        return p['armed'] or not p['cancelled']\n    if action == 'duplicate':\n        return p['incoming']!=p['last']\n    if action == 'native-policy':\n        return p['handled'] and p['custom_available']\n    return {'error': 'unsupported menu operation'}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('secondary contract', solve('secondary', {'button':2,'dragging':True,'distance':N}), False)\ncheck('pen contract', solve('pen', {'type':'pen','buttons':3,'pressure':N/10}), True)\ncheck('hold contract', solve('hold', {'elapsed':N+10,'delay':10,'travel':20,'slop':5}), False)\ncheck('release contract', solve('release', {'armed':True,'cancelled':True,'id':N}), False)\ncheck('duplicate contract', solve('duplicate', {'incoming':N,'last':N}), False)\ncheck('native-policy contract', solve('native-policy', {'handled':True,'custom_available':False,'target':N}), False)\ncheck('unknown operation', solve('unknown', {}), {'error': 'unsupported menu operation'})\ncheck('ordinary pen contact', solve('pen', {'type':'pen','buttons':1,'pressure':N/10}), False)\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":"ae101b40e40384a9f316d5a93272c962ef3d04af671380ab4bf8133c9b0d1f25","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport unicodedata\nN = 1\nobservations = []\ndef solve(action, p):\n    if action == 'secondary':\n        return p['button']==2 and not p['dragging']\n    if action == 'pen':\n        return p['type']=='pen' and bool(p['buttons'] & 2)\n    if action == 'hold':\n        return p['elapsed']>=p['delay'] and p['travel']<=p['slop']\n    if action == 'release':\n        return p['armed']\n    if action == 'duplicate':\n        return p['incoming']!=p['last']\n    if action == 'native-policy':\n        return p['handled'] and p['custom_available']\n    return {'error': 'unsupported menu operation'}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('secondary contract', solve('secondary', {'button':2,'dragging':True,'distance':N}), False)\ncheck('pen contract', solve('pen', {'type':'pen','buttons':3,'pressure':N/10}), True)\ncheck('hold contract', solve('hold', {'elapsed':N+10,'delay':10,'travel':20,'slop':5}), False)\ncheck('release contract', solve('release', {'armed':True,'cancelled':True,'id':N}), False)\ncheck('duplicate contract', solve('duplicate', {'incoming':N,'last':N}), False)\ncheck('native-policy contract', solve('native-policy', {'handled':True,'custom_available':False,'target':N}), False)\ncheck('unknown operation', solve('unknown', {}), {'error': 'unsupported menu operation'})\ncheck('ordinary pen contact', solve('pen', {'type':'pen','buttons':1,'pressure':N/10}), False)\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":"61223ec0ebe29af10dc452826c0ee3211c3d130d7b11c4a5472fd7703b7bfe63","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport unicodedata\nN = 1\nobservations = []\ndef solve(action, p):\n    if action == 'secondary':\n        return p['button']==2 and not p['dragging']\n    if action == 'pen':\n        return p['type']=='pen' and bool(p['buttons'] & 2)\n    if action == 'hold':\n        return p['elapsed']>=p['delay'] and p['travel']<=p['slop']\n    if action == 'release':\n        return p['armed'] and not p['cancelled']\n    if action == 'duplicate':\n        return p['incoming']!=p['last']\n    if action == 'native-policy':\n        return p['handled'] and p['custom_available']\n    return {'error': 'unsupported menu operation'}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('secondary contract', solve('secondary', {'button':2,'dragging':True,'distance':N}), False)\ncheck('pen contract', solve('pen', {'type':'pen','buttons':3,'pressure':N/10}), True)\ncheck('hold contract', solve('hold', {'elapsed':N+10,'delay':10,'travel':20,'slop':5}), False)\ncheck('release contract', solve('release', {'armed':True,'cancelled':True,'id':N}), False)\ncheck('duplicate contract', solve('duplicate', {'incoming':N,'last':N}), False)\ncheck('native-policy contract', solve('native-policy', {'handled':True,'custom_available':False,'target':N}), False)\ncheck('unknown operation', solve('unknown', {}), {'error': 'unsupported menu operation'})\ncheck('ordinary pen contact', solve('pen', {'type':'pen','buttons':1,'pressure':N/10}), False)\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 supplied-valid-payload model; excludes DOM, keyboard, focus, selection, announcements and browser conformance. 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-menu-interactions-context-trigger-arbitration-release","generated_at":"2026-09-29T14:42:14.348320+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Cascading and context menus require coherent command and session state as content changes.","repair":"Apply `p['armed'] and not p['cancelled']` at release.","root_cause":"The context-trigger-arbitration model applies `p['armed']` at its release operation instead of the stipulated transformation.","sha256":"0010b0565faf8811090a917cb17dc89f8448cabda0307ae8259ed74fdad59d13","title":"Cancelled context hold fires when the pointer is released · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":45.329,"exit_code":1,"observations":[{"actual":false,"check":"secondary contract","expected":false,"passed":true},{"actual":true,"check":"pen contract","expected":true,"passed":true},{"actual":false,"check":"hold contract","expected":false,"passed":true},{"actual":true,"check":"release contract","expected":false,"passed":false},{"actual":false,"check":"duplicate contract","expected":false,"passed":true},{"actual":false,"check":"native-policy contract","expected":false,"passed":true},{"actual":{"error":"unsupported menu operation"},"check":"unknown operation","expected":{"error":"unsupported menu operation"},"passed":true},{"actual":false,"check":"ordinary pen contact","expected":false,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"secondary contract\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"pen contract\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"hold contract\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"release contract\", \"actual\": true, \"expected\": false, \"passed\": false}, {\"check\": \"duplicate contract\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"native-policy contract\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"unknown operation\", \"actual\": {\"error\": \"unsupported menu operation\"}, \"expected\": {\"error\": \"unsupported menu operation\"}, \"passed\": true}, {\"check\": \"ordinary pen contact\", \"actual\": false, \"expected\": false, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.194,"exit_code":1,"observations":[{"actual":false,"check":"secondary contract","expected":false,"passed":true},{"actual":true,"check":"pen contract","expected":true,"passed":true},{"actual":false,"check":"hold contract","expected":false,"passed":true},{"actual":true,"check":"release contract","expected":false,"passed":false},{"actual":false,"check":"duplicate contract","expected":false,"passed":true},{"actual":false,"check":"native-policy contract","expected":false,"passed":true},{"actual":{"error":"unsupported menu operation"},"check":"unknown operation","expected":{"error":"unsupported menu operation"},"passed":true},{"actual":false,"check":"ordinary pen contact","expected":false,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"secondary contract\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"pen contract\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"hold contract\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"release contract\", \"actual\": true, \"expected\": false, \"passed\": false}, {\"check\": \"duplicate contract\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"native-policy contract\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"unknown operation\", \"actual\": {\"error\": \"unsupported menu operation\"}, \"expected\": {\"error\": \"unsupported menu operation\"}, \"passed\": true}, {\"check\": \"ordinary pen contact\", \"actual\": false, \"expected\": false, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":52.642,"exit_code":0,"observations":[{"actual":false,"check":"secondary contract","expected":false,"passed":true},{"actual":true,"check":"pen contract","expected":true,"passed":true},{"actual":false,"check":"hold contract","expected":false,"passed":true},{"actual":false,"check":"release contract","expected":false,"passed":true},{"actual":false,"check":"duplicate contract","expected":false,"passed":true},{"actual":false,"check":"native-policy contract","expected":false,"passed":true},{"actual":{"error":"unsupported menu operation"},"check":"unknown operation","expected":{"error":"unsupported menu operation"},"passed":true},{"actual":false,"check":"ordinary pen contact","expected":false,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"secondary contract\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"pen contract\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"hold contract\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"release contract\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"duplicate contract\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"native-policy contract\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"unknown operation\", \"actual\": {\"error\": \"unsupported menu operation\"}, \"expected\": {\"error\": \"unsupported menu operation\"}, \"passed\": true}, {\"check\": \"ordinary pen contact\", \"actual\": false, \"expected\": false, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}