FAILURE MAP
← Case archive

FA-32991 / Menu interactions / Open access

Identical breadcrumb labels collapse distinct ancestor menu IDs · case 01

Identical breadcrumb labels collapse distinct ancestor menu IDs.

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

ROOT CAUSE

The breadcrumb-menu model applies `list(dict.fromkeys(x['label'] for x in p))` at its duplicate-label operation instead of the stipulated transformation.

VERIFIED REPAIR

Apply `[x['id'] for x in p]` at duplicate-label.

Unsuccessful approach: The attempted repair `list(dict.fromkeys(x['id'] for x in p if x['label']!=p[0]['label']))` still violates the duplicate-label oracle.

Case contract

Menu breadcrumb controls reopen menu ancestors with captured context. Overflow entries retain complete menu paths; owner edges and displayed labels are separate.

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 == 'reopen-action':
        return {'action':'reopen-menu','path':p['path'],'context':p['context']}
    if action == 'owner-edge':
        return p['edges'][p['child']]
    if action == 'label':
        return p['labels'].get(p['id'],p['id'])
    if action == 'omitted-menu-levels':
        return [p['chain'][:i+1] for i in range(1,len(p['chain'])-1)]
    if action == 'duplicate-label':
        return list(dict.fromkeys(x['label'] for x in p))
    if action == 'jump':
        return p['chain'][:p['index']+1]
    return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('reopen-action contract', solve('reopen-action', {'path':['root','tools'],'context':N}), {'action':'reopen-menu','path':['root','tools'],'context':N})
check('owner-edge contract', solve('owner-edge', {'child':'child'+str(N),'edges':{'child'+str(N):'owner'},'root':'root'}), 'owner')
check('label contract', solve('label', {'id':'item'+str(N),'parent':'root','labels':{'item'+str(N):'Item','root':'Root'}}), 'Item')
check('omitted-menu-levels contract', solve('omitted-menu-levels', {'chain':['root','a','b','leaf'+str(N)]}), [['root','a'],['root','a','b']])
check('duplicate-label contract', solve('duplicate-label', [{'id':N,'label':'Same'},{'id':N+1,'label':'Same'}]), [N,N+1])
check('jump contract', solve('jump', {'chain':['r','a',str(N)],'index':1}), ['r','a'])
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
reopen-action contract{'action': 'reopen-menu', 'context': 1, 'path': ['root', 'tools']}{'action': 'reopen-menu', 'context': 1, 'path': ['root', 'tools']}Passed
owner-edge contractownerownerPassed
label contractItemItemPassed
omitted-menu-levels contract[['root', 'a'], ['root', 'a', 'b']][['root', 'a'], ['root', 'a', 'b']]Passed
duplicate-label contract['Same'][1, 2]Failed
jump contract['r', 'a']['r', 'a']Passed
unknown operation{'error': 'unsupported menu operation'}{'error': 'unsupported menu operation'}Passed

SHA-256 / c7c065161df0b8b326176f5175e6a0581ba23c14feeb43b1cb2f078ed85c938e

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 == 'reopen-action':
        return {'action':'reopen-menu','path':p['path'],'context':p['context']}
    if action == 'owner-edge':
        return p['edges'][p['child']]
    if action == 'label':
        return p['labels'].get(p['id'],p['id'])
    if action == 'omitted-menu-levels':
        return [p['chain'][:i+1] for i in range(1,len(p['chain'])-1)]
    if action == 'duplicate-label':
        return list(dict.fromkeys(x['id'] for x in p if x['label']!=p[0]['label']))
    if action == 'jump':
        return p['chain'][:p['index']+1]
    return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('reopen-action contract', solve('reopen-action', {'path':['root','tools'],'context':N}), {'action':'reopen-menu','path':['root','tools'],'context':N})
check('owner-edge contract', solve('owner-edge', {'child':'child'+str(N),'edges':{'child'+str(N):'owner'},'root':'root'}), 'owner')
check('label contract', solve('label', {'id':'item'+str(N),'parent':'root','labels':{'item'+str(N):'Item','root':'Root'}}), 'Item')
check('omitted-menu-levels contract', solve('omitted-menu-levels', {'chain':['root','a','b','leaf'+str(N)]}), [['root','a'],['root','a','b']])
check('duplicate-label contract', solve('duplicate-label', [{'id':N,'label':'Same'},{'id':N+1,'label':'Same'}]), [N,N+1])
check('jump contract', solve('jump', {'chain':['r','a',str(N)],'index':1}), ['r','a'])
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
reopen-action contract{'action': 'reopen-menu', 'context': 1, 'path': ['root', 'tools']}{'action': 'reopen-menu', 'context': 1, 'path': ['root', 'tools']}Passed
owner-edge contractownerownerPassed
label contractItemItemPassed
omitted-menu-levels contract[['root', 'a'], ['root', 'a', 'b']][['root', 'a'], ['root', 'a', 'b']]Passed
duplicate-label contract[][1, 2]Failed
jump contract['r', 'a']['r', 'a']Passed
unknown operation{'error': 'unsupported menu operation'}{'error': 'unsupported menu operation'}Passed

SHA-256 / a7964883244e129e43299a8dd3186313225c9cbc9fc9b82dffaf8b2e0bebfdfa

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 == 'reopen-action':
        return {'action':'reopen-menu','path':p['path'],'context':p['context']}
    if action == 'owner-edge':
        return p['edges'][p['child']]
    if action == 'label':
        return p['labels'].get(p['id'],p['id'])
    if action == 'omitted-menu-levels':
        return [p['chain'][:i+1] for i in range(1,len(p['chain'])-1)]
    if action == 'duplicate-label':
        return [x['id'] for x in p]
    if action == 'jump':
        return p['chain'][:p['index']+1]
    return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('reopen-action contract', solve('reopen-action', {'path':['root','tools'],'context':N}), {'action':'reopen-menu','path':['root','tools'],'context':N})
check('owner-edge contract', solve('owner-edge', {'child':'child'+str(N),'edges':{'child'+str(N):'owner'},'root':'root'}), 'owner')
check('label contract', solve('label', {'id':'item'+str(N),'parent':'root','labels':{'item'+str(N):'Item','root':'Root'}}), 'Item')
check('omitted-menu-levels contract', solve('omitted-menu-levels', {'chain':['root','a','b','leaf'+str(N)]}), [['root','a'],['root','a','b']])
check('duplicate-label contract', solve('duplicate-label', [{'id':N,'label':'Same'},{'id':N+1,'label':'Same'}]), [N,N+1])
check('jump contract', solve('jump', {'chain':['r','a',str(N)],'index':1}), ['r','a'])
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
reopen-action contract{'action': 'reopen-menu', 'context': 1, 'path': ['root', 'tools']}{'action': 'reopen-menu', 'context': 1, 'path': ['root', 'tools']}Passed
owner-edge contractownerownerPassed
label contractItemItemPassed
omitted-menu-levels contract[['root', 'a'], ['root', 'a', 'b']][['root', 'a'], ['root', 'a', 'b']]Passed
duplicate-label contract[1, 2][1, 2]Passed
jump contract['r', 'a']['r', 'a']Passed
unknown operation{'error': 'unsupported menu operation'}{'error': 'unsupported menu operation'}Passed

SHA-256 / 2f9a511a41f17f5910dd63a1b2f8c906171657f9931d104319e7062086c1ef4d

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

Case digest / ecfd533e46707f27df80bc2f6d80045b51a87663eca909d61cc4bef9c0ea27c7