FA-33571 / Menu interactions / Open access
Primary split-menu action opens the submenu while invoking its default command · case 01
Primary split-menu action opens the submenu while invoking its default command.
ROOT CAUSE
The split-button-menu model applies `{'command':None,'open':True}` at its primary operation instead of the stipulated transformation.
VERIFIED REPAIR
Apply `{'command':p['default'],'open':False}` at primary.
Unsuccessful approach: The attempted repair `{'command':p['default'],'open':True}` still violates the primary oracle.
Case contract
Split menu owners have separate primary command and secondary submenu zones. Their default command is explicit, direct and independently available; the owner label is stable.
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 == 'primary':
return {'command':None,'open':True}
if action == 'secondary':
return {'command':None,'open':True}
if action == 'zone':
return 'secondary' if p['x']>=p['divider'] else 'primary'
if action == 'default-availability':
return next((x['available'] for x in p['children'] if x['command']==p['default']),False)
if action == 'owner-label':
return p['owner_label']
if action == 'primary-empty-default':
return {'command':p['default'],'open':p['default'] is None}
return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('primary contract', solve('primary', {'default':'run'+str(N)}), {'command':'run'+str(N),'open':False})
check('secondary contract', solve('secondary', {'default':'run'+str(N)}), {'command':None,'open':True})
check('zone contract', solve('zone', {'x':N+20,'divider':N+20}), 'secondary')
check('default-availability contract', solve('default-availability', {'default':'run','children':[{'command':'run','available':True},{'command':'other'+str(N),'available':False}]}), True)
check('owner-label contract', solve('owner-label', {'owner_label':'Export','default_label':'Format '+str(N)}), 'Export')
check('primary-empty-default contract', solve('primary-empty-default', {'default':None,'fallback':'first'+str(N)}), {'command':None,'open':True})
check('unknown operation', solve('unknown', {}), {'error': 'unsupported menu operation'})
check('other available alternatives do not enable default',solve('default-availability',{'default':'run','children':[{'command':'run','available':False},{'command':'other'+str(N),'available':True}]}),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 |
|---|---|---|---|
| primary contract | {'command': None, 'open': True} | {'command': 'run1', 'open': False} | Failed |
| secondary contract | {'command': None, 'open': True} | {'command': None, 'open': True} | Passed |
| zone contract | secondary | secondary | Passed |
| default-availability contract | True | True | Passed |
| owner-label contract | Export | Export | Passed |
| primary-empty-default contract | {'command': None, 'open': True} | {'command': None, 'open': True} | Passed |
| unknown operation | {'error': 'unsupported menu operation'} | {'error': 'unsupported menu operation'} | Passed |
| other available alternatives do not enable default | False | False | Passed |
SHA-256 / b05d32fa47f64cb022c40fbd27fac6cc01763d5f8dc6661ecf46a76e049beb33
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 == 'primary':
return {'command':p['default'],'open':True}
if action == 'secondary':
return {'command':None,'open':True}
if action == 'zone':
return 'secondary' if p['x']>=p['divider'] else 'primary'
if action == 'default-availability':
return next((x['available'] for x in p['children'] if x['command']==p['default']),False)
if action == 'owner-label':
return p['owner_label']
if action == 'primary-empty-default':
return {'command':p['default'],'open':p['default'] is None}
return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('primary contract', solve('primary', {'default':'run'+str(N)}), {'command':'run'+str(N),'open':False})
check('secondary contract', solve('secondary', {'default':'run'+str(N)}), {'command':None,'open':True})
check('zone contract', solve('zone', {'x':N+20,'divider':N+20}), 'secondary')
check('default-availability contract', solve('default-availability', {'default':'run','children':[{'command':'run','available':True},{'command':'other'+str(N),'available':False}]}), True)
check('owner-label contract', solve('owner-label', {'owner_label':'Export','default_label':'Format '+str(N)}), 'Export')
check('primary-empty-default contract', solve('primary-empty-default', {'default':None,'fallback':'first'+str(N)}), {'command':None,'open':True})
check('unknown operation', solve('unknown', {}), {'error': 'unsupported menu operation'})
check('other available alternatives do not enable default',solve('default-availability',{'default':'run','children':[{'command':'run','available':False},{'command':'other'+str(N),'available':True}]}),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 |
|---|---|---|---|
| primary contract | {'command': 'run1', 'open': True} | {'command': 'run1', 'open': False} | Failed |
| secondary contract | {'command': None, 'open': True} | {'command': None, 'open': True} | Passed |
| zone contract | secondary | secondary | Passed |
| default-availability contract | True | True | Passed |
| owner-label contract | Export | Export | Passed |
| primary-empty-default contract | {'command': None, 'open': True} | {'command': None, 'open': True} | Passed |
| unknown operation | {'error': 'unsupported menu operation'} | {'error': 'unsupported menu operation'} | Passed |
| other available alternatives do not enable default | False | False | Passed |
SHA-256 / 8189c3140cd8633129932a67e4c680c2322117c1884a3c007eb4b01dbbc3cf35
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 == 'primary':
return {'command':p['default'],'open':False}
if action == 'secondary':
return {'command':None,'open':True}
if action == 'zone':
return 'secondary' if p['x']>=p['divider'] else 'primary'
if action == 'default-availability':
return next((x['available'] for x in p['children'] if x['command']==p['default']),False)
if action == 'owner-label':
return p['owner_label']
if action == 'primary-empty-default':
return {'command':p['default'],'open':p['default'] is None}
return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('primary contract', solve('primary', {'default':'run'+str(N)}), {'command':'run'+str(N),'open':False})
check('secondary contract', solve('secondary', {'default':'run'+str(N)}), {'command':None,'open':True})
check('zone contract', solve('zone', {'x':N+20,'divider':N+20}), 'secondary')
check('default-availability contract', solve('default-availability', {'default':'run','children':[{'command':'run','available':True},{'command':'other'+str(N),'available':False}]}), True)
check('owner-label contract', solve('owner-label', {'owner_label':'Export','default_label':'Format '+str(N)}), 'Export')
check('primary-empty-default contract', solve('primary-empty-default', {'default':None,'fallback':'first'+str(N)}), {'command':None,'open':True})
check('unknown operation', solve('unknown', {}), {'error': 'unsupported menu operation'})
check('other available alternatives do not enable default',solve('default-availability',{'default':'run','children':[{'command':'run','available':False},{'command':'other'+str(N),'available':True}]}),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 |
|---|---|---|---|
| primary contract | {'command': 'run1', 'open': False} | {'command': 'run1', 'open': False} | Passed |
| secondary contract | {'command': None, 'open': True} | {'command': None, 'open': True} | Passed |
| zone contract | secondary | secondary | Passed |
| default-availability contract | True | True | Passed |
| owner-label contract | Export | Export | Passed |
| primary-empty-default contract | {'command': None, 'open': True} | {'command': None, 'open': True} | Passed |
| unknown operation | {'error': 'unsupported menu operation'} | {'error': 'unsupported menu operation'} | Passed |
| other available alternatives do not enable default | False | False | Passed |
SHA-256 / fb86a3bd6e0891954965545b9bc4605e6ed0d3e9e1fa62ae53591e36d962f4b7
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.667627+00:00.
Case digest / ae2db9a5b4138d3054f8a2a2ff64f2dd1f9798f4280b0f50cc07df90cda15716