FA-33346 / Menu interactions / Open access
Nested marking-menu stroke starts from the wrong segment origin · case 01
Nested marking-menu stroke starts from the wrong segment origin.
ROOT CAUSE
The marking-menu-gesture model applies `p['original'][:]` at its segment-reset operation instead of the stipulated transformation.
VERIFIED REPAIR
Apply `p['turn'][:]` at segment-reset.
Unsuccessful approach: The attempted repair `p['last'][:]` still violates the segment-reset 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'][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['original'][:]
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 | [0, 0] | [3, 4] | Failed |
| 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 / 15e81faa774d878da04c219088442eb5840b3c6d9308d9241c0dfa62095475d8
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['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['last'][:]
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 | [6, 7] | [3, 4] | Failed |
| 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 / 6a53e3019fa7657048caef10d99099e4c4f6afff62dceac2047b1dee97420141
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.471242+00:00.
Case digest / 2ddd4de983fc05dbf561ac12157cf561712003b54dc5cfb80a1409b94c06ee88