{"abstract":"Pen barrel context trigger rejects combined button state.","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.","contract_signature":"action, p","evaluation_group":"s3-menu-interactions-context-trigger-arbitration","failed_approach":"The attempted repair `p['type']=='pen' and p['buttons']==2` still violates the pen oracle.","family":"s3-menu-interactions-context-trigger-arbitration-pen","id":"FA-32646","implementations":{"attempt":{"sha256":"2b640402e04019fc7e4ba5666e414184eb5cbc14a502ef556b811b75265d9041","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 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"},"broken":{"sha256":"b775e11724d5c1168448e3c736dc765fdcc6c8f2d60a44909d7586c2d9e589c5","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'\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-pen","generated_at":"2026-09-29T14:42:14.542241+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.","root_cause":"The context-trigger-arbitration model applies `p['type']=='pen'` at its pen operation instead of the stipulated transformation.","sha256":"d491d268939dcc0e1f8edd2cdbb5fbd8c642c43d0a84ffd73574ffd130dcf6f0","title":"Pen barrel context trigger rejects combined button state · 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":40.602,"exit_code":1,"observations":[{"actual":false,"check":"secondary contract","expected":false,"passed":true},{"actual":false,"check":"pen contract","expected":true,"passed":false},{"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":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"secondary contract\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"pen contract\", \"actual\": false, \"expected\": true, \"passed\": false}, {\"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\": false}\n"},"broken":{"elapsed_ms":42.004,"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":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":true,"check":"ordinary pen contact","expected":false,"passed":false}],"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\": 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\": true, \"expected\": false, \"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."}}