FA-33331 / Menu interactions / Open access
Marking-menu direction uses global coordinates instead of gesture origin · case 01
Marking-menu direction uses global coordinates instead of gesture origin.
ROOT CAUSE
The marking-menu-gesture model applies `p['end']` at its origin operation instead of the stipulated transformation.
VERIFIED REPAIR
Apply `[p['end'][0]-p['start'][0],p['end'][1]-p['start'][1]]` at origin.
Unsuccessful approach: The attempted repair `[p['start'][0]-p['end'][0],p['start'][1]-p['end'][1]]` still violates the origin oracle.
Case contract
A marking menu resolves completed directional strokes after sufficient displacement. Cardinal directions are 0..3; an opposite segment retraces one level, and subthreshold tail jitter preserves the completed sector.
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 == 'origin':
return p['end']
if action == 'threshold':
return p['dx']**2+p['dy']**2>=p['threshold']**2
if action == 'retrace':
return p['segments'][:-1] if p['direction']==(p['segments'][-1]+2)%4 else p['segments']+[p['direction']]
if action == 'segment-reset':
return p['turn'][:]
if action == 'leaf-required':
return p['kind']=='command' and p['complete']
if action == 'trailing-jitter':
return p['completed'][-1] if p['tail_distance']<p['threshold'] else p['tail_sector']
return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('origin contract', solve('origin', {'start':[N,N+1],'end':[N+3,N+5]}), [3,4])
check('threshold contract', solve('threshold', {'dx':3*N,'dy':4*N,'threshold':6*N}), False)
check('retrace contract', solve('retrace', {'segments':[N%4,(N+1)%4,(N+2)%4],'direction':N%4}), [N%4,(N+1)%4])
check('segment-reset contract', solve('segment-reset', {'turn':[N+2,N+3],'original':[0,0],'last':[N+5,N+6]}), [N+2,N+3])
check('leaf-required contract', solve('leaf-required', {'kind':'submenu','complete':True,'sector':N}), False)
check('trailing-jitter contract', solve('trailing-jitter', {'completed':[N,N+1],'tail_sector':N+2,'tail_distance':1,'threshold':5}), N+1)
check('unknown operation', solve('unknown', {}), {'error': 'unsupported menu operation'})
check('incomplete command stroke',solve('leaf-required',{'kind':'command','complete':False,'sector':N}),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 |
|---|---|---|---|
| origin contract | [4, 6] | [3, 4] | Failed |
| threshold contract | False | False | Passed |
| retrace contract | [1, 2] | [1, 2] | Passed |
| segment-reset contract | [3, 4] | [3, 4] | Passed |
| leaf-required contract | False | False | Passed |
| trailing-jitter contract | 2 | 2 | Passed |
| unknown operation | {'error': 'unsupported menu operation'} | {'error': 'unsupported menu operation'} | Passed |
| incomplete command stroke | False | False | Passed |
SHA-256 / 597d27cad13a9d1b56574065dc9f951903612259c77a5a764bcf1689404c3e90
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 == 'origin':
return [p['start'][0]-p['end'][0],p['start'][1]-p['end'][1]]
if action == 'threshold':
return p['dx']**2+p['dy']**2>=p['threshold']**2
if action == 'retrace':
return p['segments'][:-1] if p['direction']==(p['segments'][-1]+2)%4 else p['segments']+[p['direction']]
if action == 'segment-reset':
return p['turn'][:]
if action == 'leaf-required':
return p['kind']=='command' and p['complete']
if action == 'trailing-jitter':
return p['completed'][-1] if p['tail_distance']<p['threshold'] else p['tail_sector']
return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('origin contract', solve('origin', {'start':[N,N+1],'end':[N+3,N+5]}), [3,4])
check('threshold contract', solve('threshold', {'dx':3*N,'dy':4*N,'threshold':6*N}), False)
check('retrace contract', solve('retrace', {'segments':[N%4,(N+1)%4,(N+2)%4],'direction':N%4}), [N%4,(N+1)%4])
check('segment-reset contract', solve('segment-reset', {'turn':[N+2,N+3],'original':[0,0],'last':[N+5,N+6]}), [N+2,N+3])
check('leaf-required contract', solve('leaf-required', {'kind':'submenu','complete':True,'sector':N}), False)
check('trailing-jitter contract', solve('trailing-jitter', {'completed':[N,N+1],'tail_sector':N+2,'tail_distance':1,'threshold':5}), N+1)
check('unknown operation', solve('unknown', {}), {'error': 'unsupported menu operation'})
check('incomplete command stroke',solve('leaf-required',{'kind':'command','complete':False,'sector':N}),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 |
|---|---|---|---|
| origin contract | [-3, -4] | [3, 4] | Failed |
| threshold contract | False | False | Passed |
| retrace contract | [1, 2] | [1, 2] | Passed |
| segment-reset contract | [3, 4] | [3, 4] | Passed |
| leaf-required contract | False | False | Passed |
| trailing-jitter contract | 2 | 2 | Passed |
| unknown operation | {'error': 'unsupported menu operation'} | {'error': 'unsupported menu operation'} | Passed |
| incomplete command stroke | False | False | Passed |
SHA-256 / 46b5c24df7a9606fa5d078eecc305f739687fddcad56a7b2fa5b9ff11231643d
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 == 'origin':
return [p['end'][0]-p['start'][0],p['end'][1]-p['start'][1]]
if action == 'threshold':
return p['dx']**2+p['dy']**2>=p['threshold']**2
if action == 'retrace':
return p['segments'][:-1] if p['direction']==(p['segments'][-1]+2)%4 else p['segments']+[p['direction']]
if action == 'segment-reset':
return p['turn'][:]
if action == 'leaf-required':
return p['kind']=='command' and p['complete']
if action == 'trailing-jitter':
return p['completed'][-1] if p['tail_distance']<p['threshold'] else p['tail_sector']
return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('origin contract', solve('origin', {'start':[N,N+1],'end':[N+3,N+5]}), [3,4])
check('threshold contract', solve('threshold', {'dx':3*N,'dy':4*N,'threshold':6*N}), False)
check('retrace contract', solve('retrace', {'segments':[N%4,(N+1)%4,(N+2)%4],'direction':N%4}), [N%4,(N+1)%4])
check('segment-reset contract', solve('segment-reset', {'turn':[N+2,N+3],'original':[0,0],'last':[N+5,N+6]}), [N+2,N+3])
check('leaf-required contract', solve('leaf-required', {'kind':'submenu','complete':True,'sector':N}), False)
check('trailing-jitter contract', solve('trailing-jitter', {'completed':[N,N+1],'tail_sector':N+2,'tail_distance':1,'threshold':5}), N+1)
check('unknown operation', solve('unknown', {}), {'error': 'unsupported menu operation'})
check('incomplete command stroke',solve('leaf-required',{'kind':'command','complete':False,'sector':N}),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 |
|---|---|---|---|
| origin contract | [3, 4] | [3, 4] | Passed |
| threshold contract | False | False | Passed |
| retrace contract | [1, 2] | [1, 2] | Passed |
| segment-reset contract | [3, 4] | [3, 4] | Passed |
| leaf-required contract | False | False | Passed |
| trailing-jitter contract | 2 | 2 | Passed |
| unknown operation | {'error': 'unsupported menu operation'} | {'error': 'unsupported menu operation'} | Passed |
| incomplete command stroke | False | False | Passed |
SHA-256 / 8825f271e7984158afaa648db7b5f78eade2a1706266fa4e3251b67f17ce1888
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:21.383711+00:00.
Case digest / 9f91f357b3433cb236508dc14e8fe580282c1ed993eab8803771443769d725fe