FAILURE MAP
← Case archive

FA-33336 / Menu interactions / Open access

Marking-menu movement threshold uses incompatible distance units · case 01

Marking-menu movement threshold uses incompatible distance units.

Verified by executionVariant 1 · 8 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The marking-menu-gesture model applies `abs(p['dx'])+abs(p['dy'])>=p['threshold']` at its threshold operation instead of the stipulated transformation.

THE FAILURE

The marking-menu-gesture model applies `abs(p['dx'])+abs(p['dy'])>=p['threshold']` at its threshold operation instead of the stipulated transformation.

Unsuccessful approach: The attempted repair `p['dx']**2+p['dy']**2>=p['threshold']` still violates the threshold 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 abs(p['dx'])+abs(p['dy'])>=p['threshold']
    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 fixtureActualExpectedOutcome
origin contract[3, 4][3, 4]Passed
threshold contractTrueFalseFailed
retrace contract[1, 2][1, 2]Passed
segment-reset contract[3, 4][3, 4]Passed
leaf-required contractFalseFalsePassed
trailing-jitter contract22Passed
unknown operation{'error': 'unsupported menu operation'}{'error': 'unsupported menu operation'}Passed
incomplete command strokeFalseFalsePassed

SHA-256 / 79c1651671d8ecd59bc06d9fe3c8ee97582c8a3fdbcb51292ba592023f9255bc

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']
    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 fixtureActualExpectedOutcome
origin contract[3, 4][3, 4]Passed
threshold contractTrueFalseFailed
retrace contract[1, 2][1, 2]Passed
segment-reset contract[3, 4][3, 4]Passed
leaf-required contractFalseFalsePassed
trailing-jitter contract22Passed
unknown operation{'error': 'unsupported menu operation'}{'error': 'unsupported menu operation'}Passed
incomplete command strokeFalseFalsePassed

SHA-256 / 211801ee5991095b7b2ea2bc387f3d9bb4dc9f95a97375731ed735e67c793631

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 8 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.

Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.

Member access is invitation-based. Sign in with your invited account to inspect the repair.

Sign in to the archive ↗

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.577332+00:00.

Case digest / 6f86fc0dd6694954c8aad615cb373b80e2beb086fad0591bb96fbc2d611d1d9b