{"abstract":"Overflow menu treats individually fitting items as jointly fitting.","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 `len(p['widths'])` still violates the prefix-fit oracle.","family":"s3-menu-interactions-overflow-menu-prefix-fit","id":"FA-33006","implementations":{"attempt":{"sha256":"dadf8718c9d4972f1e05e53bb3c0dfce2e7bd2c810746227a34aea87ffaee05d","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 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":"03801244beaa26edfb9e710ccbf704c507788a391b782ade5de503c45a1b70af","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 sum(w<=p['capacity'] for w in 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"}},"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-prefix-fit","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 `sum(w<=p['capacity'] for w in p['widths'])` at its prefix-fit operation instead of the stipulated transformation.","sha256":"4609c700c78693f94f58bf1e2021c931e502fb67b8b2b11e391736d6670414aa","title":"Overflow menu treats individually fitting items as jointly fitting · 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":45.634,"exit_code":1,"observations":[{"actual":8,"check":"reserve-trigger contract","expected":8,"passed":true},{"actual":3,"check":"prefix-fit contract","expected":2,"passed":false},{"actual":[2,3,4],"check":"suffix contract","expected":[2,3,4],"passed":true},{"actual":[{"id":"a","width":3}],"check":"group-atomic contract","expected":[{"id":"a","width":3}],"passed":true},{"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\": 3, \"expected\": 2, \"passed\": false}, {\"check\": \"suffix contract\", \"actual\": [2, 3, 4], \"expected\": [2, 3, 4], \"passed\": true}, {\"check\": \"group-atomic contract\", \"actual\": [{\"width\": 3, \"id\": \"a\"}], \"expected\": [{\"width\": 3, \"id\": \"a\"}], \"passed\": true}, {\"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":43.223,"exit_code":1,"observations":[{"actual":8,"check":"reserve-trigger contract","expected":8,"passed":true},{"actual":3,"check":"prefix-fit contract","expected":2,"passed":false},{"actual":[2,3,4],"check":"suffix contract","expected":[2,3,4],"passed":true},{"actual":[{"id":"a","width":3}],"check":"group-atomic contract","expected":[{"id":"a","width":3}],"passed":true},{"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\": 3, \"expected\": 2, \"passed\": false}, {\"check\": \"suffix contract\", \"actual\": [2, 3, 4], \"expected\": [2, 3, 4], \"passed\": true}, {\"check\": \"group-atomic contract\", \"actual\": [{\"width\": 3, \"id\": \"a\"}], \"expected\": [{\"width\": 3, \"id\": \"a\"}], \"passed\": true}, {\"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."}}