FA-32341 / Menu interactions / Open access
Menu IDs containing separators alias other commands · case 01
Menu IDs containing separators alias other commands.
ROOT CAUSE
The command-address model applies `'/'.join(p)` at its encode operation instead of the stipulated transformation.
THE FAILURE
The command-address model applies `'/'.join(p)` at its encode operation instead of the stipulated transformation.
Unsuccessful approach: The attempted repair `'/'.join(x.replace('/','~1') for x in p)` still violates the encode 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(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'][1:]
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| encode contract | r~1/a/b | r~01/a~1b | Failed |
| ancestor-availability contract | False | False | Passed |
| parent contract | ['r', 'a'] | ['r', 'a'] | Passed |
| descendant contract | False | False | Passed |
| resolve contract | right | right | Passed |
| reroot contract | ['new1', 'tools', 'run'] | ['new1', 'tools', 'run'] | Passed |
| unknown operation | {'error': 'unsupported menu operation'} | {'error': 'unsupported menu operation'} | Passed |
SHA-256 / 63dbeee8ffe5ab86ed9da5182d4c2ac55c58caf3c9025fbf6d561c7cdd76fa48
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('/','~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'][1:]
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| encode contract | r~1/a~1b | r~01/a~1b | Failed |
| ancestor-availability contract | False | False | Passed |
| parent contract | ['r', 'a'] | ['r', 'a'] | Passed |
| descendant contract | False | False | Passed |
| resolve contract | right | right | Passed |
| reroot contract | ['new1', 'tools', 'run'] | ['new1', 'tools', 'run'] | Passed |
| unknown operation | {'error': 'unsupported menu operation'} | {'error': 'unsupported menu operation'} | Passed |
SHA-256 / b7af2a28b4078a7bf51753e86efbbded2993d6be0b6831728a06e58364088512
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 / 824ae11999b19a4761df63f1a10b36407b3dc09f7f145290b8d14830cff8fa77