FA-33246 / Menu interactions / Open access
Switching menubar owner preserves descendants of the previous root · case 01
Switching menubar owner preserves descendants of the previous root.
ROOT CAUSE
The menubar-owner-switch model applies `p['chain']+[p['new_root']]` at its replace-root operation instead of the stipulated transformation.
VERIFIED REPAIR
Apply `[p['new_root']]` at replace-root.
Unsuccessful approach: The attempted repair `[p['new_root']]+p['chain'][1:]` still violates the replace-root oracle.
Case contract
Pointer-driven menubar ownership transfers only during an active menu session; switching root owners replaces descendants and respects ownership identity.
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 == 'armed-switch':
return p['active_session'] and p['different_owner']
if action == 'replace-root':
return p['chain']+[p['new_root']]
if action == 'same-root':
return p['chain'] if p['chain'][0]==p['root'] else [p['root']]
if action == 'captured-pointer':
return p['pointer']==p['owner_pointer'] and p['buttons']==0
if action == 'disabled-root':
return next((x for x in p['roots'] if x['id']==p['target'] and x['available']),None)
if action == 'session-context':
return p['existing_context']
return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('armed-switch contract', solve('armed-switch', {'active_session':False,'different_owner':True,'owner':N}), False)
check('replace-root contract', solve('replace-root', {'new_root':'new'+str(N),'chain':['old','child']}), ['new'+str(N)])
check('same-root contract', solve('same-root', {'chain':['root','child'+str(N)],'root':'root'}), ['root','child'+str(N)])
check('captured-pointer contract', solve('captured-pointer', {'pointer':N,'owner_pointer':N,'buttons':1}), False)
check('disabled-root contract', solve('disabled-root', {'roots':[{'id':N,'available':False}],'target':N}), None)
check('session-context contract', solve('session-context', {'existing_context':N,'hover_context':N+1}), N)
check('unknown operation', solve('unknown', {}), {'error': 'unsupported menu operation'})
check('idle foreign pointer',solve('captured-pointer',{'pointer':N+1,'owner_pointer':N,'buttons':0}),False)
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 |
|---|---|---|---|
| armed-switch contract | False | False | Passed |
| replace-root contract | ['old', 'child', 'new1'] | ['new1'] | Failed |
| same-root contract | ['root', 'child1'] | ['root', 'child1'] | Passed |
| captured-pointer contract | False | False | Passed |
| disabled-root contract | None | None | Passed |
| session-context contract | 1 | 1 | Passed |
| unknown operation | {'error': 'unsupported menu operation'} | {'error': 'unsupported menu operation'} | Passed |
| idle foreign pointer | False | False | Passed |
SHA-256 / 8876f42dc04401d338b33ae8fcb3fd7709015322a92a0315609ddf1ebbd17dce
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 == 'armed-switch':
return p['active_session'] and p['different_owner']
if action == 'replace-root':
return [p['new_root']]+p['chain'][1:]
if action == 'same-root':
return p['chain'] if p['chain'][0]==p['root'] else [p['root']]
if action == 'captured-pointer':
return p['pointer']==p['owner_pointer'] and p['buttons']==0
if action == 'disabled-root':
return next((x for x in p['roots'] if x['id']==p['target'] and x['available']),None)
if action == 'session-context':
return p['existing_context']
return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('armed-switch contract', solve('armed-switch', {'active_session':False,'different_owner':True,'owner':N}), False)
check('replace-root contract', solve('replace-root', {'new_root':'new'+str(N),'chain':['old','child']}), ['new'+str(N)])
check('same-root contract', solve('same-root', {'chain':['root','child'+str(N)],'root':'root'}), ['root','child'+str(N)])
check('captured-pointer contract', solve('captured-pointer', {'pointer':N,'owner_pointer':N,'buttons':1}), False)
check('disabled-root contract', solve('disabled-root', {'roots':[{'id':N,'available':False}],'target':N}), None)
check('session-context contract', solve('session-context', {'existing_context':N,'hover_context':N+1}), N)
check('unknown operation', solve('unknown', {}), {'error': 'unsupported menu operation'})
check('idle foreign pointer',solve('captured-pointer',{'pointer':N+1,'owner_pointer':N,'buttons':0}),False)
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 |
|---|---|---|---|
| armed-switch contract | False | False | Passed |
| replace-root contract | ['new1', 'child'] | ['new1'] | Failed |
| same-root contract | ['root', 'child1'] | ['root', 'child1'] | Passed |
| captured-pointer contract | False | False | Passed |
| disabled-root contract | None | None | Passed |
| session-context contract | 1 | 1 | Passed |
| unknown operation | {'error': 'unsupported menu operation'} | {'error': 'unsupported menu operation'} | Passed |
| idle foreign pointer | False | False | Passed |
SHA-256 / 32b6952776320dc9c531149f2a5e169aa32699e7c18c69b8190a5d84aa16b9b6
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 == 'armed-switch':
return p['active_session'] and p['different_owner']
if action == 'replace-root':
return [p['new_root']]
if action == 'same-root':
return p['chain'] if p['chain'][0]==p['root'] else [p['root']]
if action == 'captured-pointer':
return p['pointer']==p['owner_pointer'] and p['buttons']==0
if action == 'disabled-root':
return next((x for x in p['roots'] if x['id']==p['target'] and x['available']),None)
if action == 'session-context':
return p['existing_context']
return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('armed-switch contract', solve('armed-switch', {'active_session':False,'different_owner':True,'owner':N}), False)
check('replace-root contract', solve('replace-root', {'new_root':'new'+str(N),'chain':['old','child']}), ['new'+str(N)])
check('same-root contract', solve('same-root', {'chain':['root','child'+str(N)],'root':'root'}), ['root','child'+str(N)])
check('captured-pointer contract', solve('captured-pointer', {'pointer':N,'owner_pointer':N,'buttons':1}), False)
check('disabled-root contract', solve('disabled-root', {'roots':[{'id':N,'available':False}],'target':N}), None)
check('session-context contract', solve('session-context', {'existing_context':N,'hover_context':N+1}), N)
check('unknown operation', solve('unknown', {}), {'error': 'unsupported menu operation'})
check('idle foreign pointer',solve('captured-pointer',{'pointer':N+1,'owner_pointer':N,'buttons':0}),False)
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 |
|---|---|---|---|
| armed-switch contract | False | False | Passed |
| replace-root contract | ['new1'] | ['new1'] | Passed |
| same-root contract | ['root', 'child1'] | ['root', 'child1'] | Passed |
| captured-pointer contract | False | False | Passed |
| disabled-root contract | None | None | Passed |
| session-context contract | 1 | 1 | Passed |
| unknown operation | {'error': 'unsupported menu operation'} | {'error': 'unsupported menu operation'} | Passed |
| idle foreign pointer | False | False | Passed |
SHA-256 / cdce3fac49af17fc17a6f92814be098da88c1510c1c5c5a6b086dfc9b060fb36
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:20.455704+00:00.
Case digest / 35fff64b1a10e873960df0e3f7d576357180365ee7cb3c86760d5ea3e122a942