FAILURE MAP
← Case archive

FA-32386 / Menu interactions / Open access

Reentering an existing submenu destroys deeper open state · case 01

Reentering an existing submenu destroys deeper open state.

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

ROOT CAUSE

The cascade-ownership model applies `p['chain'][:p['depth']]+[p['item']]` at its same-owner operation instead of the stipulated transformation.

VERIFIED REPAIR

Apply `p['chain'] if p['chain'][p['depth']]==p['item'] else p['chain'][:p['depth']]+[p['item']]` at same-owner.

Unsuccessful approach: The attempted repair `p['chain'][:p['depth']+1]` still violates the same-owner oracle.

Case contract

An opened cascade is an ordered branch; replacing a depth discards deeper descendants.

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 == 'replace':
        return p['chain'][:p['depth']]+[p['item']]
    if action == 'close':
        return p['chain'][:p['depth']]
    if action == 'remove-owner':
        return p['chain'][:p['chain'].index(p['owner'])] if p['owner'] in p['chain'] else p['chain']
    if action == 'same-owner':
        return p['chain'][:p['depth']]+[p['item']]
    if action == 'parent-token':
        return p['tokens'][p['depth']-1]
    if action == 'owner-depth':
        return p['chain'].index(p['owner']) if p['owner'] in p['chain'] else None
    return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('replace contract', solve('replace', {'chain':['r','a','old'],'depth':1,'item':'b'+str(N)}), ['r','b'+str(N)])
check('close contract', solve('close', {'chain':['r','a',str(N)],'depth':2}), ['r','a'])
check('remove-owner contract', solve('remove-owner', {'chain':['r','a','b',str(N)],'owner':'a'}), ['r'])
check('same-owner contract', solve('same-owner', {'chain':['r','a',str(N)],'depth':1,'item':'a'}), ['r','a',str(N)])
check('parent-token contract', solve('parent-token', {'tokens':['root','parent'+str(N),'child'],'depth':2}), 'parent'+str(N))
check('owner-depth contract', solve('owner-depth', {'chain':['r','a'+str(N),'b','c'],'owner':'a'+str(N)}), 1)
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
replace contract['r', 'b1']['r', 'b1']Passed
close contract['r', 'a']['r', 'a']Passed
remove-owner contract['r']['r']Passed
same-owner contract['r', 'a']['r', 'a', '1']Failed
parent-token contractparent1parent1Passed
owner-depth contract11Passed
unknown operation{'error': 'unsupported menu operation'}{'error': 'unsupported menu operation'}Passed

SHA-256 / 0b5796308bec6c47fd4a2163395a3c3846d1e1a36839b170ea6228fccf8e7684

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 == 'replace':
        return p['chain'][:p['depth']]+[p['item']]
    if action == 'close':
        return p['chain'][:p['depth']]
    if action == 'remove-owner':
        return p['chain'][:p['chain'].index(p['owner'])] if p['owner'] in p['chain'] else p['chain']
    if action == 'same-owner':
        return p['chain'][:p['depth']+1]
    if action == 'parent-token':
        return p['tokens'][p['depth']-1]
    if action == 'owner-depth':
        return p['chain'].index(p['owner']) if p['owner'] in p['chain'] else None
    return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('replace contract', solve('replace', {'chain':['r','a','old'],'depth':1,'item':'b'+str(N)}), ['r','b'+str(N)])
check('close contract', solve('close', {'chain':['r','a',str(N)],'depth':2}), ['r','a'])
check('remove-owner contract', solve('remove-owner', {'chain':['r','a','b',str(N)],'owner':'a'}), ['r'])
check('same-owner contract', solve('same-owner', {'chain':['r','a',str(N)],'depth':1,'item':'a'}), ['r','a',str(N)])
check('parent-token contract', solve('parent-token', {'tokens':['root','parent'+str(N),'child'],'depth':2}), 'parent'+str(N))
check('owner-depth contract', solve('owner-depth', {'chain':['r','a'+str(N),'b','c'],'owner':'a'+str(N)}), 1)
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
replace contract['r', 'b1']['r', 'b1']Passed
close contract['r', 'a']['r', 'a']Passed
remove-owner contract['r']['r']Passed
same-owner contract['r', 'a']['r', 'a', '1']Failed
parent-token contractparent1parent1Passed
owner-depth contract11Passed
unknown operation{'error': 'unsupported menu operation'}{'error': 'unsupported menu operation'}Passed

SHA-256 / 7db5de78185948223a20d7731f69d716c2146a22e94f4a329f9385dbd31a247e

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 == 'replace':
        return p['chain'][:p['depth']]+[p['item']]
    if action == 'close':
        return p['chain'][:p['depth']]
    if action == 'remove-owner':
        return p['chain'][:p['chain'].index(p['owner'])] if p['owner'] in p['chain'] else p['chain']
    if action == 'same-owner':
        return p['chain'] if p['chain'][p['depth']]==p['item'] else p['chain'][:p['depth']]+[p['item']]
    if action == 'parent-token':
        return p['tokens'][p['depth']-1]
    if action == 'owner-depth':
        return p['chain'].index(p['owner']) if p['owner'] in p['chain'] else None
    return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('replace contract', solve('replace', {'chain':['r','a','old'],'depth':1,'item':'b'+str(N)}), ['r','b'+str(N)])
check('close contract', solve('close', {'chain':['r','a',str(N)],'depth':2}), ['r','a'])
check('remove-owner contract', solve('remove-owner', {'chain':['r','a','b',str(N)],'owner':'a'}), ['r'])
check('same-owner contract', solve('same-owner', {'chain':['r','a',str(N)],'depth':1,'item':'a'}), ['r','a',str(N)])
check('parent-token contract', solve('parent-token', {'tokens':['root','parent'+str(N),'child'],'depth':2}), 'parent'+str(N))
check('owner-depth contract', solve('owner-depth', {'chain':['r','a'+str(N),'b','c'],'owner':'a'+str(N)}), 1)
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
replace contract['r', 'b1']['r', 'b1']Passed
close contract['r', 'a']['r', 'a']Passed
remove-owner contract['r']['r']Passed
same-owner contract['r', 'a', '1']['r', 'a', '1']Passed
parent-token contractparent1parent1Passed
owner-depth contract11Passed
unknown operation{'error': 'unsupported menu operation'}{'error': 'unsupported menu operation'}Passed

SHA-256 / 4ec9dcbbc6a11be2ec545b65542eeefb30422f0e74773f5ef99ec12ab55daa1e

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

Case digest / d0b399b43959dbb14b346a04773029d3ea18746278e1dc9b733ac1670cd22137