FAILURE MAP
← Case archive

FA-33271 / Menu interactions / Open access

Opening a touch submenu overwrites its return page stack · case 01

Opening a touch submenu overwrites its return page stack.

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

ROOT CAUSE

The touch-submenu-sheet model applies `[p['page']]` at its push operation instead of the stipulated transformation.

VERIFIED REPAIR

Apply `p['stack']+[p['page']]` at push.

Unsuccessful approach: The attempted repair `[p['page']]+p['stack']` still violates the push 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['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['child1']['root', 'child1']Failed
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 / 3d13816c6af1634deabd69e50fda782debcb2fbda713deaa19a5fa2239e05a39

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['page']]+p['stack']
    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['child1', 'root']['root', 'child1']Failed
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 / c214dd009af5313d294fc37d71edef8f0eb7f16aab63acbe1291743bd9145190

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

Case digest / a8d3aa885577ad9b172b6d442e84ac80987232740e698c10f91a5d14fb17bf37