FAILURE MAP
← Case archive

FA-32651 / Menu interactions / Open access

Moved long press is still interpreted as a menu invocation · case 01

Moved long press is still interpreted as a menu invocation.

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

ROOT CAUSE

The context-trigger-arbitration model applies `p['elapsed']>=p['delay']` at its hold operation instead of the stipulated transformation.

THE FAILURE

The context-trigger-arbitration model applies `p['elapsed']>=p['delay']` at its hold operation instead of the stipulated transformation.

Unsuccessful approach: The attempted repair `p['elapsed']>=p['delay'] or p['travel']<=p['slop']` still violates the hold 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 and not p['dragging']
    if action == 'pen':
        return p['type']=='pen' and bool(p['buttons'] & 2)
    if action == 'hold':
        return p['elapsed']>=p['delay']
    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 fixtureActualExpectedOutcome
secondary contractFalseFalsePassed
pen contractTrueTruePassed
hold contractTrueFalseFailed
release contractFalseFalsePassed
duplicate contractFalseFalsePassed
native-policy contractFalseFalsePassed
unknown operation{'error': 'unsupported menu operation'}{'error': 'unsupported menu operation'}Passed
ordinary pen contactFalseFalsePassed

SHA-256 / 9fbe6f5df1c9395725826a25b7aaf09e319bee655bdab1eacedb5674b1cfeb47

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']==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'] or 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 fixtureActualExpectedOutcome
secondary contractFalseFalsePassed
pen contractTrueTruePassed
hold contractTrueFalseFailed
release contractFalseFalsePassed
duplicate contractFalseFalsePassed
native-policy contractFalseFalsePassed
unknown operation{'error': 'unsupported menu operation'}{'error': 'unsupported menu operation'}Passed
ordinary pen contactFalseFalsePassed

SHA-256 / e00ddc2ea9b996ba48996e70dd03282eec90d7ed2434cab39e4ca2a95a796212

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

Case digest / fa80cefb6d8b05cbe516eca3c660713bb6cc184be591de160d212ca0887d8037