FA-32351 / Menu interactions / Open access
Containing menu address drops the root instead of leaf · case 01
Containing menu address drops the root instead of leaf.
ROOT CAUSE
The command-address model applies `p[1:]` at its parent operation instead of the stipulated transformation.
VERIFIED REPAIR
Apply `p[:-1]` at parent.
Unsuccessful approach: The attempted repair `p[:1]` still violates the parent 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['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~01/a~1b | r~01/a~1b | Passed |
| ancestor-availability contract | False | False | Passed |
| parent contract | ['a', 'b1'] | ['r', 'a'] | Failed |
| 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 / 82d36bbfdaa56d4c49c2832bbe43b1e71b3d4cc1f18621072d55cce5ab4b51b4
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'][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~01/a~1b | r~01/a~1b | Passed |
| ancestor-availability contract | False | False | Passed |
| parent contract | ['r'] | ['r', 'a'] | Failed |
| 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 / 676f6285f7f33feb8dda09a4b5cb70b6a2976d310d7fd40562e2a2ace4b93732
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 == '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'][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~01/a~1b | r~01/a~1b | Passed |
| 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 / 7b36aeb56c772b1d76e560448cc396d853ad494ad307ca5bd0d6e4e9ad1f05a2
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.419945+00:00.
Case digest / 63122dfc5ea9b7148573a14ec7568444af0daaf77225caa22989e61e1b676756