{"abstract":"Exactly fitting menu group is unnecessarily moved to overflow.","category":"Menu interactions","checks":7,"contract":"A menu overflow container reserves its own trigger, preserves complete groups, and restores source order when room returns.","contract_signature":"action, p","evaluation_group":"s3-menu-interactions-overflow-menu","failed_approach":"The attempted repair `[g for g in p['groups'] if g['width']<p['remaining']]` still violates the group-atomic oracle.","family":"s3-menu-interactions-overflow-menu-group-atomic","id":"FA-33016","implementations":{"attempt":{"sha256":"48797cb646caf73c17d8d162d6836dcf31cb26d1434b89b54d70b4fb76145cfb","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 == 'reserve-trigger':\n        return p['capacity']-p['trigger']\n    if action == 'prefix-fit':\n        return next((i for i in range(len(p['widths'])+1) if sum(p['widths'][:i+1])>p['capacity']),len(p['widths']))\n    if action == 'suffix':\n        return p['items'][p['fit']:]\n    if action == 'group-atomic':\n        return [g for g in p['groups'] if g['width']<p['remaining']]\n    if action == 'restore':\n        return sorted(p,key=lambda x:x['source'])\n    if action == 'trigger-visible':\n        return bool(p['overflow'])\n    return {'error': 'unsupported menu operation'}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('reserve-trigger contract', solve('reserve-trigger', {'capacity':N+10,'trigger':3}), N+7)\ncheck('prefix-fit contract', solve('prefix-fit', {'widths':[N+1,N+1,N+1],'capacity':2*(N+1)}), 2)\ncheck('suffix contract', solve('suffix', {'items':list(range(N+4)),'fit':2}), list(range(2,N+4)))\ncheck('group-atomic contract', solve('group-atomic', {'groups':[{'width':N+2,'id':'a'},{'width':N+3,'id':'b'}],'remaining':N+2}), [{'width':N+2,'id':'a'}])\ncheck('restore contract', solve('restore', [{'source':2,'label':'a'},{'source':N-N,'label':'z'}]), [{'source':0,'label':'z'},{'source':2,'label':'a'}])\ncheck('trigger-visible contract', solve('trigger-visible', {'overflow':[],'capacity':N,'main':list(range(N))}), False)\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":"a14c4d1bb24f825f0c06c787a8302c104c58b0be217e2a12aed3652580d8f2fb","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 == 'reserve-trigger':\n        return p['capacity']-p['trigger']\n    if action == 'prefix-fit':\n        return next((i for i in range(len(p['widths'])+1) if sum(p['widths'][:i+1])>p['capacity']),len(p['widths']))\n    if action == 'suffix':\n        return p['items'][p['fit']:]\n    if action == 'group-atomic':\n        return p['groups']\n    if action == 'restore':\n        return sorted(p,key=lambda x:x['source'])\n    if action == 'trigger-visible':\n        return bool(p['overflow'])\n    return {'error': 'unsupported menu operation'}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('reserve-trigger contract', solve('reserve-trigger', {'capacity':N+10,'trigger':3}), N+7)\ncheck('prefix-fit contract', solve('prefix-fit', {'widths':[N+1,N+1,N+1],'capacity':2*(N+1)}), 2)\ncheck('suffix contract', solve('suffix', {'items':list(range(N+4)),'fit':2}), list(range(2,N+4)))\ncheck('group-atomic contract', solve('group-atomic', {'groups':[{'width':N+2,'id':'a'},{'width':N+3,'id':'b'}],'remaining':N+2}), [{'width':N+2,'id':'a'}])\ncheck('restore contract', solve('restore', [{'source':2,'label':'a'},{'source':N-N,'label':'z'}]), [{'source':0,'label':'z'},{'source':2,'label':'a'}])\ncheck('trigger-visible contract', solve('trigger-visible', {'overflow':[],'capacity':N,'main':list(range(N))}), False)\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-overflow-menu-group-atomic","generated_at":"2026-09-29T14:42:18.187961+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 overflow-menu model applies `p['groups']` at its group-atomic operation instead of the stipulated transformation.","sha256":"eb2131d38f362ef588aefc45db07527c9e8bac9bf9fe647027619fedbae4cab0","title":"Exactly fitting menu group is unnecessarily moved to overflow · 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":48.818,"exit_code":1,"observations":[{"actual":8,"check":"reserve-trigger contract","expected":8,"passed":true},{"actual":2,"check":"prefix-fit contract","expected":2,"passed":true},{"actual":[2,3,4],"check":"suffix contract","expected":[2,3,4],"passed":true},{"actual":[],"check":"group-atomic contract","expected":[{"id":"a","width":3}],"passed":false},{"actual":[{"label":"z","source":0},{"label":"a","source":2}],"check":"restore contract","expected":[{"label":"z","source":0},{"label":"a","source":2}],"passed":true},{"actual":false,"check":"trigger-visible contract","expected":false,"passed":true},{"actual":{"error":"unsupported menu operation"},"check":"unknown operation","expected":{"error":"unsupported menu operation"},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"reserve-trigger contract\", \"actual\": 8, \"expected\": 8, \"passed\": true}, {\"check\": \"prefix-fit contract\", \"actual\": 2, \"expected\": 2, \"passed\": true}, {\"check\": \"suffix contract\", \"actual\": [2, 3, 4], \"expected\": [2, 3, 4], \"passed\": true}, {\"check\": \"group-atomic contract\", \"actual\": [], \"expected\": [{\"width\": 3, \"id\": \"a\"}], \"passed\": false}, {\"check\": \"restore contract\", \"actual\": [{\"source\": 0, \"label\": \"z\"}, {\"source\": 2, \"label\": \"a\"}], \"expected\": [{\"source\": 0, \"label\": \"z\"}, {\"source\": 2, \"label\": \"a\"}], \"passed\": true}, {\"check\": \"trigger-visible contract\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"unknown operation\", \"actual\": {\"error\": \"unsupported menu operation\"}, \"expected\": {\"error\": \"unsupported menu operation\"}, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":46.163,"exit_code":1,"observations":[{"actual":8,"check":"reserve-trigger contract","expected":8,"passed":true},{"actual":2,"check":"prefix-fit contract","expected":2,"passed":true},{"actual":[2,3,4],"check":"suffix contract","expected":[2,3,4],"passed":true},{"actual":[{"id":"a","width":3},{"id":"b","width":4}],"check":"group-atomic contract","expected":[{"id":"a","width":3}],"passed":false},{"actual":[{"label":"z","source":0},{"label":"a","source":2}],"check":"restore contract","expected":[{"label":"z","source":0},{"label":"a","source":2}],"passed":true},{"actual":false,"check":"trigger-visible contract","expected":false,"passed":true},{"actual":{"error":"unsupported menu operation"},"check":"unknown operation","expected":{"error":"unsupported menu operation"},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"reserve-trigger contract\", \"actual\": 8, \"expected\": 8, \"passed\": true}, {\"check\": \"prefix-fit contract\", \"actual\": 2, \"expected\": 2, \"passed\": true}, {\"check\": \"suffix contract\", \"actual\": [2, 3, 4], \"expected\": [2, 3, 4], \"passed\": true}, {\"check\": \"group-atomic contract\", \"actual\": [{\"width\": 3, \"id\": \"a\"}, {\"width\": 4, \"id\": \"b\"}], \"expected\": [{\"width\": 3, \"id\": \"a\"}], \"passed\": false}, {\"check\": \"restore contract\", \"actual\": [{\"source\": 0, \"label\": \"z\"}, {\"source\": 2, \"label\": \"a\"}], \"expected\": [{\"source\": 0, \"label\": \"z\"}, {\"source\": 2, \"label\": \"a\"}], \"passed\": true}, {\"check\": \"trigger-visible contract\", \"actual\": false, \"expected\": false, \"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."}}