FA-32496 / Menu interactions / Open access
Menu section assembly emits an edge separator · case 01
Menu section assembly emits an edge separator.
ROOT CAUSE
The section-composition model applies `sum((g+[{'separator':True}] for g in p),[])` at its separators operation instead of the stipulated transformation.
VERIFIED REPAIR
Apply `sum(([{'separator':True}]+g for g in p[1:]),p[0]) if p else []` at separators.
Unsuccessful approach: The attempted repair `sum(([{'separator':True}]+g for g in p),[])` still violates the separators oracle.
Case contract
Menu sections keep headers attached to nonempty groups and separators only between surviving groups; pinned sections retain their declared slots.
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 == 'empty-group':
return [g for g in p if g['items']]
if action == 'separators':
return sum((g+[{'separator':True}] for g in p),[])
if action == 'header':
return [{'header':p['title']}]+p['items']
if action == 'pin-top':
return [x for x in p if x['pin']=='top']+[x for x in p if x['pin']!='top']
if action == 'group-key':
return [(x['provider'],x['group']) for x in p]
if action == 'count':
return sum(len(g['items']) for g in p)
return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('empty-group contract', solve('empty-group', [{'title':'empty','items':[]},{'title':'g','items':[N]}]), [{'title':'g','items':[N]}])
check('separators contract', solve('separators', [[N],[N+1]]), [N,{'separator':True},N+1])
check('header contract', solve('header', {'title':'g'+str(N),'items':['a','b']}), [{'header':'g'+str(N)},'a','b'])
check('pin-top contract', solve('pin-top', [{'id':N,'pin':'none'},{'id':N+1,'pin':'top'}]), [{'id':N+1,'pin':'top'},{'id':N,'pin':'none'}])
check('group-key contract', solve('group-key', [{'provider':'p'+str(N),'group':'tools'}]), [('p'+str(N),'tools')])
check('count contract', solve('count', [{'items':[N,N+1,N+2]},{'items':[N+3]}]), 4)
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 |
|---|---|---|---|
| empty-group contract | [{'items': [1], 'title': 'g'}] | [{'items': [1], 'title': 'g'}] | Passed |
| separators contract | [1, {'separator': True}, 2, {'separator': True}] | [1, {'separator': True}, 2] | Failed |
| header contract | [{'header': 'g1'}, 'a', 'b'] | [{'header': 'g1'}, 'a', 'b'] | Passed |
| pin-top contract | [{'id': 2, 'pin': 'top'}, {'id': 1, 'pin': 'none'}] | [{'id': 2, 'pin': 'top'}, {'id': 1, 'pin': 'none'}] | Passed |
| group-key contract | [['p1', 'tools']] | [['p1', 'tools']] | Passed |
| count contract | 4 | 4 | Passed |
| unknown operation | {'error': 'unsupported menu operation'} | {'error': 'unsupported menu operation'} | Passed |
SHA-256 / 24a6d635614b60c66d59e1bbb0acf3ebbab02a1f97b7e210b5db82f6630da31d
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 == 'empty-group':
return [g for g in p if g['items']]
if action == 'separators':
return sum(([{'separator':True}]+g for g in p),[])
if action == 'header':
return [{'header':p['title']}]+p['items']
if action == 'pin-top':
return [x for x in p if x['pin']=='top']+[x for x in p if x['pin']!='top']
if action == 'group-key':
return [(x['provider'],x['group']) for x in p]
if action == 'count':
return sum(len(g['items']) for g in p)
return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('empty-group contract', solve('empty-group', [{'title':'empty','items':[]},{'title':'g','items':[N]}]), [{'title':'g','items':[N]}])
check('separators contract', solve('separators', [[N],[N+1]]), [N,{'separator':True},N+1])
check('header contract', solve('header', {'title':'g'+str(N),'items':['a','b']}), [{'header':'g'+str(N)},'a','b'])
check('pin-top contract', solve('pin-top', [{'id':N,'pin':'none'},{'id':N+1,'pin':'top'}]), [{'id':N+1,'pin':'top'},{'id':N,'pin':'none'}])
check('group-key contract', solve('group-key', [{'provider':'p'+str(N),'group':'tools'}]), [('p'+str(N),'tools')])
check('count contract', solve('count', [{'items':[N,N+1,N+2]},{'items':[N+3]}]), 4)
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 |
|---|---|---|---|
| empty-group contract | [{'items': [1], 'title': 'g'}] | [{'items': [1], 'title': 'g'}] | Passed |
| separators contract | [{'separator': True}, 1, {'separator': True}, 2] | [1, {'separator': True}, 2] | Failed |
| header contract | [{'header': 'g1'}, 'a', 'b'] | [{'header': 'g1'}, 'a', 'b'] | Passed |
| pin-top contract | [{'id': 2, 'pin': 'top'}, {'id': 1, 'pin': 'none'}] | [{'id': 2, 'pin': 'top'}, {'id': 1, 'pin': 'none'}] | Passed |
| group-key contract | [['p1', 'tools']] | [['p1', 'tools']] | Passed |
| count contract | 4 | 4 | Passed |
| unknown operation | {'error': 'unsupported menu operation'} | {'error': 'unsupported menu operation'} | Passed |
SHA-256 / 620556cd93e29a2eabeb260c4b15f51318024840eef611f41b673872bd3fffd8
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 == 'empty-group':
return [g for g in p if g['items']]
if action == 'separators':
return sum(([{'separator':True}]+g for g in p[1:]),p[0]) if p else []
if action == 'header':
return [{'header':p['title']}]+p['items']
if action == 'pin-top':
return [x for x in p if x['pin']=='top']+[x for x in p if x['pin']!='top']
if action == 'group-key':
return [(x['provider'],x['group']) for x in p]
if action == 'count':
return sum(len(g['items']) for g in p)
return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('empty-group contract', solve('empty-group', [{'title':'empty','items':[]},{'title':'g','items':[N]}]), [{'title':'g','items':[N]}])
check('separators contract', solve('separators', [[N],[N+1]]), [N,{'separator':True},N+1])
check('header contract', solve('header', {'title':'g'+str(N),'items':['a','b']}), [{'header':'g'+str(N)},'a','b'])
check('pin-top contract', solve('pin-top', [{'id':N,'pin':'none'},{'id':N+1,'pin':'top'}]), [{'id':N+1,'pin':'top'},{'id':N,'pin':'none'}])
check('group-key contract', solve('group-key', [{'provider':'p'+str(N),'group':'tools'}]), [('p'+str(N),'tools')])
check('count contract', solve('count', [{'items':[N,N+1,N+2]},{'items':[N+3]}]), 4)
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 |
|---|---|---|---|
| empty-group contract | [{'items': [1], 'title': 'g'}] | [{'items': [1], 'title': 'g'}] | Passed |
| separators contract | [1, {'separator': True}, 2] | [1, {'separator': True}, 2] | Passed |
| header contract | [{'header': 'g1'}, 'a', 'b'] | [{'header': 'g1'}, 'a', 'b'] | Passed |
| pin-top contract | [{'id': 2, 'pin': 'top'}, {'id': 1, 'pin': 'none'}] | [{'id': 2, 'pin': 'top'}, {'id': 1, 'pin': 'none'}] | Passed |
| group-key contract | [['p1', 'tools']] | [['p1', 'tools']] | Passed |
| count contract | 4 | 4 | Passed |
| unknown operation | {'error': 'unsupported menu operation'} | {'error': 'unsupported menu operation'} | Passed |
SHA-256 / 1d0d465047edbea9ae80a47a7d5ec8c4b662a8dec9b5f893a8b5cf03c5c80fd9
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:12.818505+00:00.
Case digest / 8a13c263aefd148fd8173ff87657e0cd710a2af6f3664a465d2089576d6da1ac