FAILURE MAP
← Case archive

FA-33296 / Menu interactions / Open access

Root touch-menu Back attempts to reveal a nonexistent parent · case 01

Root touch-menu Back attempts to reveal a nonexistent parent.

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

ROOT CAUSE

The touch-submenu-sheet model applies `'pop'` at its root-back operation instead of the stipulated transformation.

VERIFIED REPAIR

Apply `'dismiss' if len(p)==1 else 'pop'` at root-back.

Unsuccessful approach: The attempted repair `'ignore'` still violates the root-back oracle.

Case contract

A compact touch menu displays one submenu sheet at a time with a reversible page stack; dismissal removes the entire stack and back preserves the context.

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 == 'push':
        return p['stack']+[p['page']]
    if action == 'back':
        return p[:-1] if len(p)>1 else p
    if action == 'visible':
        return p[-1:]
    if action == 'dismiss':
        return []
    if action == 'back-context':
        return {'stack':p['stack'][:-1],'context':p['context']}
    if action == 'root-back':
        return 'pop'
    return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('push contract', solve('push', {'stack':['root'],'page':'child'+str(N)}), ['root','child'+str(N)])
check('back contract', solve('back', ['root','child'+str(N)]), ['root'])
check('visible contract', solve('visible', ['root','child'+str(N)]), ['child'+str(N)])
check('dismiss contract', solve('dismiss', ['root','a','b'+str(N)]), [])
check('back-context contract', solve('back-context', {'stack':['r','a'],'context':N,'ambient':N+1}), {'stack':['r'],'context':N})
check('root-back contract', solve('root-back', ['root'+str(N)]), 'dismiss')
check('unknown operation', solve('unknown', {}), {'error': 'unsupported menu operation'})
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
push contract['root', 'child1']['root', 'child1']Passed
back contract['root']['root']Passed
visible contract['child1']['child1']Passed
dismiss contract[][]Passed
back-context contract{'context': 1, 'stack': ['r']}{'context': 1, 'stack': ['r']}Passed
root-back contractpopdismissFailed
unknown operation{'error': 'unsupported menu operation'}{'error': 'unsupported menu operation'}Passed

SHA-256 / 3215501f26795ecc41fe6ce04bdbfead5d2a62533cbee4cab77ee568d2553d99

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 == 'push':
        return p['stack']+[p['page']]
    if action == 'back':
        return p[:-1] if len(p)>1 else p
    if action == 'visible':
        return p[-1:]
    if action == 'dismiss':
        return []
    if action == 'back-context':
        return {'stack':p['stack'][:-1],'context':p['context']}
    if action == 'root-back':
        return 'ignore'
    return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('push contract', solve('push', {'stack':['root'],'page':'child'+str(N)}), ['root','child'+str(N)])
check('back contract', solve('back', ['root','child'+str(N)]), ['root'])
check('visible contract', solve('visible', ['root','child'+str(N)]), ['child'+str(N)])
check('dismiss contract', solve('dismiss', ['root','a','b'+str(N)]), [])
check('back-context contract', solve('back-context', {'stack':['r','a'],'context':N,'ambient':N+1}), {'stack':['r'],'context':N})
check('root-back contract', solve('root-back', ['root'+str(N)]), 'dismiss')
check('unknown operation', solve('unknown', {}), {'error': 'unsupported menu operation'})
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
push contract['root', 'child1']['root', 'child1']Passed
back contract['root']['root']Passed
visible contract['child1']['child1']Passed
dismiss contract[][]Passed
back-context contract{'context': 1, 'stack': ['r']}{'context': 1, 'stack': ['r']}Passed
root-back contractignoredismissFailed
unknown operation{'error': 'unsupported menu operation'}{'error': 'unsupported menu operation'}Passed

SHA-256 / 94f71520451bd4c5ff8e66f80b3580ff77477972280dbbe9cb5d517aa71dcdf0

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 == 'push':
        return p['stack']+[p['page']]
    if action == 'back':
        return p[:-1] if len(p)>1 else p
    if action == 'visible':
        return p[-1:]
    if action == 'dismiss':
        return []
    if action == 'back-context':
        return {'stack':p['stack'][:-1],'context':p['context']}
    if action == 'root-back':
        return 'dismiss' if len(p)==1 else 'pop'
    return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('push contract', solve('push', {'stack':['root'],'page':'child'+str(N)}), ['root','child'+str(N)])
check('back contract', solve('back', ['root','child'+str(N)]), ['root'])
check('visible contract', solve('visible', ['root','child'+str(N)]), ['child'+str(N)])
check('dismiss contract', solve('dismiss', ['root','a','b'+str(N)]), [])
check('back-context contract', solve('back-context', {'stack':['r','a'],'context':N,'ambient':N+1}), {'stack':['r'],'context':N})
check('root-back contract', solve('root-back', ['root'+str(N)]), 'dismiss')
check('unknown operation', solve('unknown', {}), {'error': 'unsupported menu operation'})
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
push contract['root', 'child1']['root', 'child1']Passed
back contract['root']['root']Passed
visible contract['child1']['child1']Passed
dismiss contract[][]Passed
back-context contract{'context': 1, 'stack': ['r']}{'context': 1, 'stack': ['r']}Passed
root-back contractdismissdismissPassed
unknown operation{'error': 'unsupported menu operation'}{'error': 'unsupported menu operation'}Passed

SHA-256 / 132b35730e68d499733cf6dbaca7a81ffd87981e65f2995af1eb474295ab635b

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

Case digest / 9b1be45f4b401396e8216b14211bf4c6ab5b6709470304809981f68243c228f8