{"abstract":"Menu section assembly emits an edge separator.","category":"Menu interactions","checks":7,"contract":"Menu sections keep headers attached to nonempty groups and separators only between surviving groups; pinned sections retain their declared slots.","evaluation_group":"s3-menu-interactions-section-composition","failed_approach":"The attempted repair `sum(([{'separator':True}]+g for g in p),[])` still violates the separators oracle.","family":"s3-menu-interactions-section-composition-separators","id":"FA-32496","implementations":{"attempt":{"sha256":"620556cd93e29a2eabeb260c4b15f51318024840eef611f41b673872bd3fffd8","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport unicodedata\nN = 1\nobservations = []\ndef solve(action, p):\n    if action == 'empty-group':\n        return [g for g in p if g['items']]\n    if action == 'separators':\n        return sum(([{'separator':True}]+g for g in p),[])\n    if action == 'header':\n        return [{'header':p['title']}]+p['items']\n    if action == 'pin-top':\n        return [x for x in p if x['pin']=='top']+[x for x in p if x['pin']!='top']\n    if action == 'group-key':\n        return [(x['provider'],x['group']) for x in p]\n    if action == 'count':\n        return sum(len(g['items']) for g in p)\n    return {'error': 'unsupported menu operation'}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('empty-group contract', solve('empty-group', [{'title':'empty','items':[]},{'title':'g','items':[N]}]), [{'title':'g','items':[N]}])\ncheck('separators contract', solve('separators', [[N],[N+1]]), [N,{'separator':True},N+1])\ncheck('header contract', solve('header', {'title':'g'+str(N),'items':['a','b']}), [{'header':'g'+str(N)},'a','b'])\ncheck('pin-top contract', solve('pin-top', [{'id':N,'pin':'none'},{'id':N+1,'pin':'top'}]), [{'id':N+1,'pin':'top'},{'id':N,'pin':'none'}])\ncheck('group-key contract', solve('group-key', [{'provider':'p'+str(N),'group':'tools'}]), [('p'+str(N),'tools')])\ncheck('count contract', solve('count', [{'items':[N,N+1,N+2]},{'items':[N+3]}]), 4)\ncheck('unknown operation', solve('unknown', {}), {'error': 'unsupported menu operation'})\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"24a6d635614b60c66d59e1bbb0acf3ebbab02a1f97b7e210b5db82f6630da31d","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport unicodedata\nN = 1\nobservations = []\ndef solve(action, p):\n    if action == 'empty-group':\n        return [g for g in p if g['items']]\n    if action == 'separators':\n        return sum((g+[{'separator':True}] for g in p),[])\n    if action == 'header':\n        return [{'header':p['title']}]+p['items']\n    if action == 'pin-top':\n        return [x for x in p if x['pin']=='top']+[x for x in p if x['pin']!='top']\n    if action == 'group-key':\n        return [(x['provider'],x['group']) for x in p]\n    if action == 'count':\n        return sum(len(g['items']) for g in p)\n    return {'error': 'unsupported menu operation'}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('empty-group contract', solve('empty-group', [{'title':'empty','items':[]},{'title':'g','items':[N]}]), [{'title':'g','items':[N]}])\ncheck('separators contract', solve('separators', [[N],[N+1]]), [N,{'separator':True},N+1])\ncheck('header contract', solve('header', {'title':'g'+str(N),'items':['a','b']}), [{'header':'g'+str(N)},'a','b'])\ncheck('pin-top contract', solve('pin-top', [{'id':N,'pin':'none'},{'id':N+1,'pin':'top'}]), [{'id':N+1,'pin':'top'},{'id':N,'pin':'none'}])\ncheck('group-key contract', solve('group-key', [{'provider':'p'+str(N),'group':'tools'}]), [('p'+str(N),'tools')])\ncheck('count contract', solve('count', [{'items':[N,N+1,N+2]},{'items':[N+3]}]), 4)\ncheck('unknown operation', solve('unknown', {}), {'error': 'unsupported menu operation'})\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"fixed":{"sha256":"1d0d465047edbea9ae80a47a7d5ec8c4b662a8dec9b5f893a8b5cf03c5c80fd9","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport unicodedata\nN = 1\nobservations = []\ndef solve(action, p):\n    if action == 'empty-group':\n        return [g for g in p if g['items']]\n    if action == 'separators':\n        return sum(([{'separator':True}]+g for g in p[1:]),p[0]) if p else []\n    if action == 'header':\n        return [{'header':p['title']}]+p['items']\n    if action == 'pin-top':\n        return [x for x in p if x['pin']=='top']+[x for x in p if x['pin']!='top']\n    if action == 'group-key':\n        return [(x['provider'],x['group']) for x in p]\n    if action == 'count':\n        return sum(len(g['items']) for g in p)\n    return {'error': 'unsupported menu operation'}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('empty-group contract', solve('empty-group', [{'title':'empty','items':[]},{'title':'g','items':[N]}]), [{'title':'g','items':[N]}])\ncheck('separators contract', solve('separators', [[N],[N+1]]), [N,{'separator':True},N+1])\ncheck('header contract', solve('header', {'title':'g'+str(N),'items':['a','b']}), [{'header':'g'+str(N)},'a','b'])\ncheck('pin-top contract', solve('pin-top', [{'id':N,'pin':'none'},{'id':N+1,'pin':'top'}]), [{'id':N+1,'pin':'top'},{'id':N,'pin':'none'}])\ncheck('group-key contract', solve('group-key', [{'provider':'p'+str(N),'group':'tools'}]), [('p'+str(N),'tools')])\ncheck('count contract', solve('count', [{'items':[N,N+1,N+2]},{'items':[N+3]}]), 4)\ncheck('unknown operation', solve('unknown', {}), {'error': 'unsupported menu operation'})\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"s3-menu-interactions-section-composition-separators","generated_at":"2026-09-29T14:42:12.818505+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Cascading and context menus require coherent command and session state as content changes.","repair":"Apply `sum(([{'separator':True}]+g for g in p[1:]),p[0]) if p else []` at separators.","root_cause":"The section-composition model applies `sum((g+[{'separator':True}] for g in p),[])` at its separators operation instead of the stipulated transformation.","sha256":"8a13c263aefd148fd8173ff87657e0cd710a2af6f3664a465d2089576d6da1ac","title":"Menu section assembly emits an edge separator · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":43.488,"exit_code":1,"observations":[{"actual":[{"items":[1],"title":"g"}],"check":"empty-group contract","expected":[{"items":[1],"title":"g"}],"passed":true},{"actual":[{"separator":true},1,{"separator":true},2],"check":"separators contract","expected":[1,{"separator":true},2],"passed":false},{"actual":[{"header":"g1"},"a","b"],"check":"header contract","expected":[{"header":"g1"},"a","b"],"passed":true},{"actual":[{"id":2,"pin":"top"},{"id":1,"pin":"none"}],"check":"pin-top contract","expected":[{"id":2,"pin":"top"},{"id":1,"pin":"none"}],"passed":true},{"actual":[["p1","tools"]],"check":"group-key contract","expected":[["p1","tools"]],"passed":true},{"actual":4,"check":"count contract","expected":4,"passed":true},{"actual":{"error":"unsupported menu operation"},"check":"unknown operation","expected":{"error":"unsupported menu operation"},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"empty-group contract\", \"actual\": [{\"title\": \"g\", \"items\": [1]}], \"expected\": [{\"title\": \"g\", \"items\": [1]}], \"passed\": true}, {\"check\": \"separators contract\", \"actual\": [{\"separator\": true}, 1, {\"separator\": true}, 2], \"expected\": [1, {\"separator\": true}, 2], \"passed\": false}, {\"check\": \"header contract\", \"actual\": [{\"header\": \"g1\"}, \"a\", \"b\"], \"expected\": [{\"header\": \"g1\"}, \"a\", \"b\"], \"passed\": true}, {\"check\": \"pin-top contract\", \"actual\": [{\"id\": 2, \"pin\": \"top\"}, {\"id\": 1, \"pin\": \"none\"}], \"expected\": [{\"id\": 2, \"pin\": \"top\"}, {\"id\": 1, \"pin\": \"none\"}], \"passed\": true}, {\"check\": \"group-key contract\", \"actual\": [[\"p1\", \"tools\"]], \"expected\": [[\"p1\", \"tools\"]], \"passed\": true}, {\"check\": \"count contract\", \"actual\": 4, \"expected\": 4, \"passed\": true}, {\"check\": \"unknown operation\", \"actual\": {\"error\": \"unsupported menu operation\"}, \"expected\": {\"error\": \"unsupported menu operation\"}, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.845,"exit_code":1,"observations":[{"actual":[{"items":[1],"title":"g"}],"check":"empty-group contract","expected":[{"items":[1],"title":"g"}],"passed":true},{"actual":[1,{"separator":true},2,{"separator":true}],"check":"separators contract","expected":[1,{"separator":true},2],"passed":false},{"actual":[{"header":"g1"},"a","b"],"check":"header contract","expected":[{"header":"g1"},"a","b"],"passed":true},{"actual":[{"id":2,"pin":"top"},{"id":1,"pin":"none"}],"check":"pin-top contract","expected":[{"id":2,"pin":"top"},{"id":1,"pin":"none"}],"passed":true},{"actual":[["p1","tools"]],"check":"group-key contract","expected":[["p1","tools"]],"passed":true},{"actual":4,"check":"count contract","expected":4,"passed":true},{"actual":{"error":"unsupported menu operation"},"check":"unknown operation","expected":{"error":"unsupported menu operation"},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"empty-group contract\", \"actual\": [{\"title\": \"g\", \"items\": [1]}], \"expected\": [{\"title\": \"g\", \"items\": [1]}], \"passed\": true}, {\"check\": \"separators contract\", \"actual\": [1, {\"separator\": true}, 2, {\"separator\": true}], \"expected\": [1, {\"separator\": true}, 2], \"passed\": false}, {\"check\": \"header contract\", \"actual\": [{\"header\": \"g1\"}, \"a\", \"b\"], \"expected\": [{\"header\": \"g1\"}, \"a\", \"b\"], \"passed\": true}, {\"check\": \"pin-top contract\", \"actual\": [{\"id\": 2, \"pin\": \"top\"}, {\"id\": 1, \"pin\": \"none\"}], \"expected\": [{\"id\": 2, \"pin\": \"top\"}, {\"id\": 1, \"pin\": \"none\"}], \"passed\": true}, {\"check\": \"group-key contract\", \"actual\": [[\"p1\", \"tools\"]], \"expected\": [[\"p1\", \"tools\"]], \"passed\": true}, {\"check\": \"count contract\", \"actual\": 4, \"expected\": 4, \"passed\": true}, {\"check\": \"unknown operation\", \"actual\": {\"error\": \"unsupported menu operation\"}, \"expected\": {\"error\": \"unsupported menu operation\"}, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":42.965,"exit_code":0,"observations":[{"actual":[{"items":[1],"title":"g"}],"check":"empty-group contract","expected":[{"items":[1],"title":"g"}],"passed":true},{"actual":[1,{"separator":true},2],"check":"separators contract","expected":[1,{"separator":true},2],"passed":true},{"actual":[{"header":"g1"},"a","b"],"check":"header contract","expected":[{"header":"g1"},"a","b"],"passed":true},{"actual":[{"id":2,"pin":"top"},{"id":1,"pin":"none"}],"check":"pin-top contract","expected":[{"id":2,"pin":"top"},{"id":1,"pin":"none"}],"passed":true},{"actual":[["p1","tools"]],"check":"group-key contract","expected":[["p1","tools"]],"passed":true},{"actual":4,"check":"count contract","expected":4,"passed":true},{"actual":{"error":"unsupported menu operation"},"check":"unknown operation","expected":{"error":"unsupported menu operation"},"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"empty-group contract\", \"actual\": [{\"title\": \"g\", \"items\": [1]}], \"expected\": [{\"title\": \"g\", \"items\": [1]}], \"passed\": true}, {\"check\": \"separators contract\", \"actual\": [1, {\"separator\": true}, 2], \"expected\": [1, {\"separator\": true}, 2], \"passed\": true}, {\"check\": \"header contract\", \"actual\": [{\"header\": \"g1\"}, \"a\", \"b\"], \"expected\": [{\"header\": \"g1\"}, \"a\", \"b\"], \"passed\": true}, {\"check\": \"pin-top contract\", \"actual\": [{\"id\": 2, \"pin\": \"top\"}, {\"id\": 1, \"pin\": \"none\"}], \"expected\": [{\"id\": 2, \"pin\": \"top\"}, {\"id\": 1, \"pin\": \"none\"}], \"passed\": true}, {\"check\": \"group-key contract\", \"actual\": [[\"p1\", \"tools\"]], \"expected\": [[\"p1\", \"tools\"]], \"passed\": true}, {\"check\": \"count contract\", \"actual\": 4, \"expected\": 4, \"passed\": true}, {\"check\": \"unknown operation\", \"actual\": {\"error\": \"unsupported menu operation\"}, \"expected\": {\"error\": \"unsupported menu operation\"}, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}