FAILURE MAP
← Case archive

FA-33596 / Menu interactions / Open access

Split-menu primary zone with no default guesses an arbitrary alternative command · case 01

Split-menu primary zone with no default guesses an arbitrary alternative command.

Verified by executionVariant 1 · 8 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The split-button-menu model applies `{'command':p['default'],'open':False}` at its primary-empty-default operation instead of the stipulated transformation.

VERIFIED REPAIR

Apply `{'command':p['default'],'open':p['default'] is None}` at primary-empty-default.

Unsuccessful approach: The attempted repair `{'command':p['fallback'],'open':False}` still violates the primary-empty-default 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':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':False}
    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 fixtureActualExpectedOutcome
primary contract{'command': 'run1', 'open': False}{'command': 'run1', 'open': False}Passed
secondary contract{'command': None, 'open': True}{'command': None, 'open': True}Passed
zone contractsecondarysecondaryPassed
default-availability contractTrueTruePassed
owner-label contractExportExportPassed
primary-empty-default contract{'command': None, 'open': False}{'command': None, 'open': True}Failed
unknown operation{'error': 'unsupported menu operation'}{'error': 'unsupported menu operation'}Passed
other available alternatives do not enable defaultFalseFalsePassed

SHA-256 / 45e0a590615135b6f822a88445ec0c6b964e683b4dbbbd3fb668c1caf2ac8eed

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':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['fallback'],'open':False}
    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 fixtureActualExpectedOutcome
primary contract{'command': 'run1', 'open': False}{'command': 'run1', 'open': False}Passed
secondary contract{'command': None, 'open': True}{'command': None, 'open': True}Passed
zone contractsecondarysecondaryPassed
default-availability contractTrueTruePassed
owner-label contractExportExportPassed
primary-empty-default contract{'command': 'first1', 'open': False}{'command': None, 'open': True}Failed
unknown operation{'error': 'unsupported menu operation'}{'error': 'unsupported menu operation'}Passed
other available alternatives do not enable defaultFalseFalsePassed

SHA-256 / 0141e16dcadf208b8e53bb3e95497e6dfe0b639284bc771f8e1cba848e575305

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 fixtureActualExpectedOutcome
primary contract{'command': 'run1', 'open': False}{'command': 'run1', 'open': False}Passed
secondary contract{'command': None, 'open': True}{'command': None, 'open': True}Passed
zone contractsecondarysecondaryPassed
default-availability contractTrueTruePassed
owner-label contractExportExportPassed
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 defaultFalseFalsePassed

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.935148+00:00.

Case digest / 84269a6bdf183645c55fb8680133acb0e0fa1432c75a1a4740542c9740bbd071