FAILURE MAP
← Case archive

FA-33546 / Menu interactions / Open access

Restored cascade opens descendants of an unresolved lazy submenu · case 01

Restored cascade opens descendants of an unresolved lazy submenu.

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

ROOT CAUSE

The menu-cascade-restoration model applies `p['chain']` at its lazy-boundary operation instead of the stipulated transformation.

VERIFIED REPAIR

Apply `p['chain'][:next((i+1 for i,x in enumerate(p['chain']) if x in p['lazy']),len(p['chain']))]` at lazy-boundary.

Unsuccessful approach: The attempted repair `[x for x in p['chain'] if x not in p['lazy']]` still violates the lazy-boundary oracle.

Case contract

Restored cascades reopen only a contiguous valid prefix of menu owners. Missing, lazy, reparented or unavailable owners stop restoration; root identity and independent menu windows are retained.

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 == 'missing-prefix':
        return p['chain'][:next((i for i,x in enumerate(p['chain']) if x not in p['live']),len(p['chain']))]
    if action == 'lazy-boundary':
        return p['chain']
    if action == 'owner-edge':
        return p['chain'][:next((i+1 for i,(a,b) in enumerate(zip(p['chain'],p['chain'][1:])) if p['parents'].get(b)!=a),len(p['chain']))]
    if action == 'availability-prefix':
        return p['chain'][:next((i for i,x in enumerate(p['chain']) if not p['available'].get(x,False)),len(p['chain']))]
    if action == 'window-paths':
        return {x['window']:x['path'] for x in p}
    if action == 'owner-remap':
        return [p['mapping'].get(x,x) for x in p['chain']]
    return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('missing-prefix contract', solve('missing-prefix', {'chain':['root','gone','child'+str(N)],'live':['root','child'+str(N)]}), ['root'])
check('lazy-boundary contract', solve('lazy-boundary', {'chain':['root','lazy','child'+str(N)],'lazy':['lazy']}), ['root','lazy'])
check('owner-edge contract', solve('owner-edge', {'chain':['root','a','b'+str(N)],'parents':{'a':'root','b'+str(N):'other'}}), ['root','a'])
check('availability-prefix contract', solve('availability-prefix', {'chain':['root','locked','b'+str(N)],'available':{'root':True,'locked':False,'b'+str(N):True}}), ['root'])
check('window-paths contract', solve('window-paths', [{'window':N,'path':['root','a']},{'window':N+1,'path':['root','b']}]), {N:['root','a'],N+1:['root','b']})
check('owner-remap contract', solve('owner-remap', {'chain':['root','old'+str(N)],'mapping':{'old'+str(N):'new'+str(N)}}), ['root','new'+str(N)])
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
missing-prefix contract['root']['root']Passed
lazy-boundary contract['root', 'lazy', 'child1']['root', 'lazy']Failed
owner-edge contract['root', 'a']['root', 'a']Passed
availability-prefix contract['root']['root']Passed
window-paths contract{'1': ['root', 'a'], '2': ['root', 'b']}{'1': ['root', 'a'], '2': ['root', 'b']}Passed
owner-remap contract['root', 'new1']['root', 'new1']Passed
unknown operation{'error': 'unsupported menu operation'}{'error': 'unsupported menu operation'}Passed

SHA-256 / 675503e1c81c461075e352e2e4e44c55d0fe138b57fa5fc28d917134a8aab9ab

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 == 'missing-prefix':
        return p['chain'][:next((i for i,x in enumerate(p['chain']) if x not in p['live']),len(p['chain']))]
    if action == 'lazy-boundary':
        return [x for x in p['chain'] if x not in p['lazy']]
    if action == 'owner-edge':
        return p['chain'][:next((i+1 for i,(a,b) in enumerate(zip(p['chain'],p['chain'][1:])) if p['parents'].get(b)!=a),len(p['chain']))]
    if action == 'availability-prefix':
        return p['chain'][:next((i for i,x in enumerate(p['chain']) if not p['available'].get(x,False)),len(p['chain']))]
    if action == 'window-paths':
        return {x['window']:x['path'] for x in p}
    if action == 'owner-remap':
        return [p['mapping'].get(x,x) for x in p['chain']]
    return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('missing-prefix contract', solve('missing-prefix', {'chain':['root','gone','child'+str(N)],'live':['root','child'+str(N)]}), ['root'])
check('lazy-boundary contract', solve('lazy-boundary', {'chain':['root','lazy','child'+str(N)],'lazy':['lazy']}), ['root','lazy'])
check('owner-edge contract', solve('owner-edge', {'chain':['root','a','b'+str(N)],'parents':{'a':'root','b'+str(N):'other'}}), ['root','a'])
check('availability-prefix contract', solve('availability-prefix', {'chain':['root','locked','b'+str(N)],'available':{'root':True,'locked':False,'b'+str(N):True}}), ['root'])
check('window-paths contract', solve('window-paths', [{'window':N,'path':['root','a']},{'window':N+1,'path':['root','b']}]), {N:['root','a'],N+1:['root','b']})
check('owner-remap contract', solve('owner-remap', {'chain':['root','old'+str(N)],'mapping':{'old'+str(N):'new'+str(N)}}), ['root','new'+str(N)])
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
missing-prefix contract['root']['root']Passed
lazy-boundary contract['root', 'child1']['root', 'lazy']Failed
owner-edge contract['root', 'a']['root', 'a']Passed
availability-prefix contract['root']['root']Passed
window-paths contract{'1': ['root', 'a'], '2': ['root', 'b']}{'1': ['root', 'a'], '2': ['root', 'b']}Passed
owner-remap contract['root', 'new1']['root', 'new1']Passed
unknown operation{'error': 'unsupported menu operation'}{'error': 'unsupported menu operation'}Passed

SHA-256 / e57520d858d4de129aaa51def51bb63bdf5952b486629d6fd4d98555d9da8124

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 == 'missing-prefix':
        return p['chain'][:next((i for i,x in enumerate(p['chain']) if x not in p['live']),len(p['chain']))]
    if action == 'lazy-boundary':
        return p['chain'][:next((i+1 for i,x in enumerate(p['chain']) if x in p['lazy']),len(p['chain']))]
    if action == 'owner-edge':
        return p['chain'][:next((i+1 for i,(a,b) in enumerate(zip(p['chain'],p['chain'][1:])) if p['parents'].get(b)!=a),len(p['chain']))]
    if action == 'availability-prefix':
        return p['chain'][:next((i for i,x in enumerate(p['chain']) if not p['available'].get(x,False)),len(p['chain']))]
    if action == 'window-paths':
        return {x['window']:x['path'] for x in p}
    if action == 'owner-remap':
        return [p['mapping'].get(x,x) for x in p['chain']]
    return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('missing-prefix contract', solve('missing-prefix', {'chain':['root','gone','child'+str(N)],'live':['root','child'+str(N)]}), ['root'])
check('lazy-boundary contract', solve('lazy-boundary', {'chain':['root','lazy','child'+str(N)],'lazy':['lazy']}), ['root','lazy'])
check('owner-edge contract', solve('owner-edge', {'chain':['root','a','b'+str(N)],'parents':{'a':'root','b'+str(N):'other'}}), ['root','a'])
check('availability-prefix contract', solve('availability-prefix', {'chain':['root','locked','b'+str(N)],'available':{'root':True,'locked':False,'b'+str(N):True}}), ['root'])
check('window-paths contract', solve('window-paths', [{'window':N,'path':['root','a']},{'window':N+1,'path':['root','b']}]), {N:['root','a'],N+1:['root','b']})
check('owner-remap contract', solve('owner-remap', {'chain':['root','old'+str(N)],'mapping':{'old'+str(N):'new'+str(N)}}), ['root','new'+str(N)])
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
missing-prefix contract['root']['root']Passed
lazy-boundary contract['root', 'lazy']['root', 'lazy']Passed
owner-edge contract['root', 'a']['root', 'a']Passed
availability-prefix contract['root']['root']Passed
window-paths contract{'1': ['root', 'a'], '2': ['root', 'b']}{'1': ['root', 'a'], '2': ['root', 'b']}Passed
owner-remap contract['root', 'new1']['root', 'new1']Passed
unknown operation{'error': 'unsupported menu operation'}{'error': 'unsupported menu operation'}Passed

SHA-256 / 17bbaa67596812e66459ec71125ae4c492c44cf6255dba3a8e36ae05fdbab77e

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

Case digest / 79e1aa46bcd5d98f499b2169788bb7feee9b07fd69e2b292d0fad96eb9707366