FA-33556 / Menu interactions / Open access
Restored menu passes through an unavailable intermediate owner · case 01
Restored menu passes through an unavailable intermediate owner.
ROOT CAUSE
The menu-cascade-restoration model applies `[x for x in p['chain'] if p['available'].get(x,False)]` at its availability-prefix operation instead of the stipulated transformation.
VERIFIED REPAIR
Apply `p['chain'][:next((i for i,x in enumerate(p['chain']) if not p['available'].get(x,False)),len(p['chain']))]` at availability-prefix.
Unsuccessful approach: The attempted repair `p['chain']` still violates the availability-prefix 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 [x for x in p['chain'] if p['available'].get(x,False)]
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| 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', 'b1'] | ['root'] | Failed |
| 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 / acff65e3a8bf2aca4039351a543a964ff76774419bbd0a969f5b4ca0b122023d
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']
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| 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', 'locked', 'b1'] | ['root'] | Failed |
| 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 / 779b0c453d9b19b17d55fb6dab7933f6aa691e250da069d4c92fa617403c840c
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| 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.511428+00:00.
Case digest / 3e02b904cdf346cd9da6d479751a160d0e92913326d67ef2cbe5d29bfe35bfa8