{"abstract":"Pinned menu sections stay below dynamic content.","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.","contract_signature":"action, p","evaluation_group":"s3-menu-interactions-section-composition","failed_approach":"The attempted repair `sorted(p,key=lambda x:x['pin'])` still violates the pin-top oracle.","family":"s3-menu-interactions-section-composition-pin-top","id":"FA-32506","implementations":{"attempt":{"sha256":"4665658373e6dc3d2c0f94f7a341ece51fea793b4830d8f2ba12e819f72e0bed","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 sorted(p,key=lambda x:x['pin'])\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":"7e9119ed2c02e7354a9eb24895896dc96b40b37fcf4ea0925db4bf1da52b1d51","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 p\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-pin-top","generated_at":"2026-09-29T14:42:12.970269+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.","root_cause":"The section-composition model applies `p` at its pin-top operation instead of the stipulated transformation.","sha256":"b57b498069255c1bb60d2f8741d3198996352bda62d26db6ae47c24d0c877d0c","title":"Pinned menu sections stay below dynamic content · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":39.049,"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],"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":1,"pin":"none"},{"id":2,"pin":"top"}],"check":"pin-top contract","expected":[{"id":2,"pin":"top"},{"id":1,"pin":"none"}],"passed":false},{"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], \"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\": 1, \"pin\": \"none\"}, {\"id\": 2, \"pin\": \"top\"}], \"expected\": [{\"id\": 2, \"pin\": \"top\"}, {\"id\": 1, \"pin\": \"none\"}], \"passed\": false}, {\"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":42.877,"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],"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":1,"pin":"none"},{"id":2,"pin":"top"}],"check":"pin-top contract","expected":[{"id":2,"pin":"top"},{"id":1,"pin":"none"}],"passed":false},{"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], \"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\": 1, \"pin\": \"none\"}, {\"id\": 2, \"pin\": \"top\"}], \"expected\": [{\"id\": 2, \"pin\": \"top\"}, {\"id\": 1, \"pin\": \"none\"}], \"passed\": false}, {\"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"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}