FAILURE MAP
← Case archive

FA-32366 / Menu interactions / Open access

Relocating a menu namespace duplicates its old root · case 01

Relocating a menu namespace duplicates its old root.

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

ROOT CAUSE

The command-address model applies `p['path']+[p['new']]` at its reroot operation instead of the stipulated transformation.

THE FAILURE

The command-address model applies `p['path']+[p['new']]` at its reroot operation instead of the stipulated transformation.

Unsuccessful approach: The attempted repair `[p['new']]+p['path']` still violates the reroot oracle.

Case contract

Stable menu paths retain ancestry and available owners; separator encoding is unambiguous and resolution is exact.

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 == 'encode':
        return '/'.join(x.replace('~','~0').replace('/','~1') for x in p)
    if action == 'ancestor-availability':
        return all(x['available'] for x in p['owners']) and p['command_available']
    if action == 'parent':
        return p[:-1]
    if action == 'descendant':
        return p['candidate'][:len(p['root'])]==p['root'] and len(p['candidate'])>len(p['root'])
    if action == 'resolve':
        return next((x['command'] for x in p['rows'] if x['path']==p['path']),None)
    if action == 'reroot':
        return p['path']+[p['new']]
    return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('encode contract', solve('encode', ['r~'+str(N),'a/b']), 'r~0'+str(N)+'/a~1b')
check('ancestor-availability contract', solve('ancestor-availability', {'owners':[{'available':True,'id':N},{'available':False,'id':N+1}],'command_available':True}), False)
check('parent contract', solve('parent', ['r','a','b'+str(N)]), ['r','a'])
check('descendant contract', solve('descendant', {'root':['r','a'],'candidate':['r','b',str(N)]}), False)
check('resolve contract', solve('resolve', {'rows':[{'path':['r','a',str(N)],'command':'wrong'},{'path':['r','b',str(N)],'command':'right'}],'path':['r','b',str(N)]}), 'right')
check('reroot contract', solve('reroot', {'new':'new'+str(N),'path':['old','tools','run']}), ['new'+str(N),'tools','run'])
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
encode contractr~01/a~1br~01/a~1bPassed
ancestor-availability contractFalseFalsePassed
parent contract['r', 'a']['r', 'a']Passed
descendant contractFalseFalsePassed
resolve contractrightrightPassed
reroot contract['old', 'tools', 'run', 'new1']['new1', 'tools', 'run']Failed
unknown operation{'error': 'unsupported menu operation'}{'error': 'unsupported menu operation'}Passed

SHA-256 / f6e3bc11e4d1d6d13b84635f28adac0321d8a8b441b9e9c4025d650f30a8a0f0

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 == 'encode':
        return '/'.join(x.replace('~','~0').replace('/','~1') for x in p)
    if action == 'ancestor-availability':
        return all(x['available'] for x in p['owners']) and p['command_available']
    if action == 'parent':
        return p[:-1]
    if action == 'descendant':
        return p['candidate'][:len(p['root'])]==p['root'] and len(p['candidate'])>len(p['root'])
    if action == 'resolve':
        return next((x['command'] for x in p['rows'] if x['path']==p['path']),None)
    if action == 'reroot':
        return [p['new']]+p['path']
    return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('encode contract', solve('encode', ['r~'+str(N),'a/b']), 'r~0'+str(N)+'/a~1b')
check('ancestor-availability contract', solve('ancestor-availability', {'owners':[{'available':True,'id':N},{'available':False,'id':N+1}],'command_available':True}), False)
check('parent contract', solve('parent', ['r','a','b'+str(N)]), ['r','a'])
check('descendant contract', solve('descendant', {'root':['r','a'],'candidate':['r','b',str(N)]}), False)
check('resolve contract', solve('resolve', {'rows':[{'path':['r','a',str(N)],'command':'wrong'},{'path':['r','b',str(N)],'command':'right'}],'path':['r','b',str(N)]}), 'right')
check('reroot contract', solve('reroot', {'new':'new'+str(N),'path':['old','tools','run']}), ['new'+str(N),'tools','run'])
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
encode contractr~01/a~1br~01/a~1bPassed
ancestor-availability contractFalseFalsePassed
parent contract['r', 'a']['r', 'a']Passed
descendant contractFalseFalsePassed
resolve contractrightrightPassed
reroot contract['new1', 'old', 'tools', 'run']['new1', 'tools', 'run']Failed
unknown operation{'error': 'unsupported menu operation'}{'error': 'unsupported menu operation'}Passed

SHA-256 / 648777d28e8abc6945287b56ef50ef763784247a8fe15a6e3ecd720e410bf2a8

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 7 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.

Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.

Member access is invitation-based. Sign in with your invited account to inspect the repair.

Sign in to the archive ↗

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

Case digest / b6e9a2a265cb27b5b3e9116b70f407f253087480b9ae37431e156e57e1875d73