FAILURE MAP
← Case archive

FA-33561 / Menu interactions / Open access

Restoring independent menu windows merges their identical root definitions · case 01

Restoring independent menu windows merges their identical root definitions.

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

ROOT CAUSE

The menu-cascade-restoration model applies `{x['path'][0]:x['path'] for x in p}` at its window-paths operation instead of the stipulated transformation.

VERIFIED REPAIR

Apply `{x['window']:x['path'] for x in p}` at window-paths.

Unsuccessful approach: The attempted repair `{p[-1]['window']:p[-1]['path']} ` still violates the window-paths 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'][: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['path'][0]: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{'root': ['root', 'b']}{'1': ['root', 'a'], '2': ['root', 'b']}Failed
owner-remap contract['root', 'new1']['root', 'new1']Passed
unknown operation{'error': 'unsupported menu operation'}{'error': 'unsupported menu operation'}Passed

SHA-256 / c228865d5c37639a7fe7970e33c34c34919356da7a37d07205d4d312f9fc38ff

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 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 {p[-1]['window']:p[-1]['path']} 
    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{'2': ['root', 'b']}{'1': ['root', 'a'], '2': ['root', 'b']}Failed
owner-remap contract['root', 'new1']['root', 'new1']Passed
unknown operation{'error': 'unsupported menu operation'}{'error': 'unsupported menu operation'}Passed

SHA-256 / 38d316ee43d78b487266f1631648fdb34890a357c905cacce5e9e9f8390b70c4

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

Case digest / 5c85c90a44b9ab34372005e8c2f39a4c20f97f70ee176ceecda63605d6ce099a