FA-32641 / Menu interactions / Open access
Secondary drag termination unexpectedly opens a context menu · case 01
Secondary drag termination unexpectedly opens a context menu.
ROOT CAUSE
The context-trigger-arbitration model applies `p['button']==2` at its secondary operation instead of the stipulated transformation.
VERIFIED REPAIR
Apply `p['button']==2 and not p['dragging']` at secondary.
Unsuccessful approach: The attempted repair `p['button']!=0` still violates the secondary oracle.
Case contract
A context menu recognizes secondary-button invocation, pen barrel input and completed hold gestures; concurrent triggers are coalesced by invocation identity.
Why this case matters
Cascading and context menus require coherent command and session state as content changes.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
import unicodedata
N = 1
observations = []
def solve(action, p):
if action == 'secondary':
return p['button']==2
if action == 'pen':
return p['type']=='pen' and bool(p['buttons'] & 2)
if action == 'hold':
return p['elapsed']>=p['delay'] and p['travel']<=p['slop']
if action == 'release':
return p['armed'] and not p['cancelled']
if action == 'duplicate':
return p['incoming']!=p['last']
if action == 'native-policy':
return p['handled'] and p['custom_available']
return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('secondary contract', solve('secondary', {'button':2,'dragging':True,'distance':N}), False)
check('pen contract', solve('pen', {'type':'pen','buttons':3,'pressure':N/10}), True)
check('hold contract', solve('hold', {'elapsed':N+10,'delay':10,'travel':20,'slop':5}), False)
check('release contract', solve('release', {'armed':True,'cancelled':True,'id':N}), False)
check('duplicate contract', solve('duplicate', {'incoming':N,'last':N}), False)
check('native-policy contract', solve('native-policy', {'handled':True,'custom_available':False,'target':N}), False)
check('unknown operation', solve('unknown', {}), {'error': 'unsupported menu operation'})
check('ordinary pen contact', solve('pen', {'type':'pen','buttons':1,'pressure':N/10}), False)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| secondary contract | True | False | Failed |
| pen contract | True | True | Passed |
| hold contract | False | False | Passed |
| release contract | False | False | Passed |
| duplicate contract | False | False | Passed |
| native-policy contract | False | False | Passed |
| unknown operation | {'error': 'unsupported menu operation'} | {'error': 'unsupported menu operation'} | Passed |
| ordinary pen contact | False | False | Passed |
SHA-256 / e4e0250961865d7281a00c9c1aab7af380a7808ea867fcd280d55af9f63e2bf8
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
import unicodedata
N = 1
observations = []
def solve(action, p):
if action == 'secondary':
return p['button']!=0
if action == 'pen':
return p['type']=='pen' and bool(p['buttons'] & 2)
if action == 'hold':
return p['elapsed']>=p['delay'] and p['travel']<=p['slop']
if action == 'release':
return p['armed'] and not p['cancelled']
if action == 'duplicate':
return p['incoming']!=p['last']
if action == 'native-policy':
return p['handled'] and p['custom_available']
return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('secondary contract', solve('secondary', {'button':2,'dragging':True,'distance':N}), False)
check('pen contract', solve('pen', {'type':'pen','buttons':3,'pressure':N/10}), True)
check('hold contract', solve('hold', {'elapsed':N+10,'delay':10,'travel':20,'slop':5}), False)
check('release contract', solve('release', {'armed':True,'cancelled':True,'id':N}), False)
check('duplicate contract', solve('duplicate', {'incoming':N,'last':N}), False)
check('native-policy contract', solve('native-policy', {'handled':True,'custom_available':False,'target':N}), False)
check('unknown operation', solve('unknown', {}), {'error': 'unsupported menu operation'})
check('ordinary pen contact', solve('pen', {'type':'pen','buttons':1,'pressure':N/10}), False)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| secondary contract | True | False | Failed |
| pen contract | True | True | Passed |
| hold contract | False | False | Passed |
| release contract | False | False | Passed |
| duplicate contract | False | False | Passed |
| native-policy contract | False | False | Passed |
| unknown operation | {'error': 'unsupported menu operation'} | {'error': 'unsupported menu operation'} | Passed |
| ordinary pen contact | False | False | Passed |
SHA-256 / 06f9dcb1ba0b61c2f1d00b41b65a19d0dbea430bc9660a84a29d8f260f0f0ea1
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
import math
import unicodedata
N = 1
observations = []
def solve(action, p):
if action == 'secondary':
return p['button']==2 and not p['dragging']
if action == 'pen':
return p['type']=='pen' and bool(p['buttons'] & 2)
if action == 'hold':
return p['elapsed']>=p['delay'] and p['travel']<=p['slop']
if action == 'release':
return p['armed'] and not p['cancelled']
if action == 'duplicate':
return p['incoming']!=p['last']
if action == 'native-policy':
return p['handled'] and p['custom_available']
return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('secondary contract', solve('secondary', {'button':2,'dragging':True,'distance':N}), False)
check('pen contract', solve('pen', {'type':'pen','buttons':3,'pressure':N/10}), True)
check('hold contract', solve('hold', {'elapsed':N+10,'delay':10,'travel':20,'slop':5}), False)
check('release contract', solve('release', {'armed':True,'cancelled':True,'id':N}), False)
check('duplicate contract', solve('duplicate', {'incoming':N,'last':N}), False)
check('native-policy contract', solve('native-policy', {'handled':True,'custom_available':False,'target':N}), False)
check('unknown operation', solve('unknown', {}), {'error': 'unsupported menu operation'})
check('ordinary pen contact', solve('pen', {'type':'pen','buttons':1,'pressure':N/10}), False)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| secondary contract | False | False | Passed |
| pen contract | True | True | Passed |
| hold contract | False | False | Passed |
| release contract | False | False | Passed |
| duplicate contract | False | False | Passed |
| native-policy contract | False | False | Passed |
| unknown operation | {'error': 'unsupported menu operation'} | {'error': 'unsupported menu operation'} | Passed |
| ordinary pen contact | False | False | Passed |
SHA-256 / 61223ec0ebe29af10dc452826c0ee3211c3d130d7b11c4a5472fd7703b7bfe63
Verification & scope
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.
Observations recorded using Python 3.12.14 at 2026-09-29T14:42:14.218347+00:00.
Case digest / f4300392821dd32ac918f9123251ec9a6424922d8641ec52ba033feb330ad9aa