{"abstract":"Filtered menu retains headings for groups with no surviving commands.","category":"Menu interactions","checks":7,"contract":"Menu filtering retains matching leaves and required ancestor headers, counts only commands, and discards decorations orphaned by filtering.","contract_signature":"action, p","evaluation_group":"s3-menu-interactions-filtered-menu-projection","failed_approach":"The attempted repair `p['surviving_groups']` still violates the group-header oracle.","family":"s3-menu-interactions-filtered-menu-projection-group-header","id":"FA-32956","implementations":{"attempt":{"sha256":"1809bb0f6998b5e2d6a79c4443327daad68fbe80e67bd2d46a1d617cd1157f0d","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 == 'ancestors':\n        return sorted(set(p['matches']) | {a for x in p['matches'] for a in p['ancestors'][x]})\n    if action == 'command-count':\n        return sum(x['kind']=='command' for x in p)\n    if action == 'disabled-match':\n        return [x for x in p if x['matches']]\n    if action == 'group-header':\n        return p['surviving_groups']\n    if action == 'query-clear':\n        return p['original']\n    if action == 'owner-match':\n        return p['direct_match'] or bool(p['descendant_matches'])\n    return {'error': 'unsupported menu operation'}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('ancestors contract', solve('ancestors', {'matches':['c'+str(N)],'ancestors':{'c'+str(N):['r','tools']}}), sorted(['c'+str(N),'r','tools']))\ncheck('command-count contract', solve('command-count', [{'kind':'header'},{'kind':'command','id':N},{'kind':'separator'}]), 1)\ncheck('disabled-match contract', solve('disabled-match', [{'matches':True,'enabled':False,'id':N},{'matches':False,'enabled':True,'id':N+1}]), [{'matches':True,'enabled':False,'id':N}])\ncheck('group-header contract', solve('group-header', {'headers':['a','b'],'surviving_groups':['b','c'+str(N)]}), ['b'])\ncheck('query-clear contract', solve('query-clear', {'original':list(range(N+3)),'filtered':[N]}), list(range(N+3)))\ncheck('owner-match contract', solve('owner-match', {'direct_match':False,'descendant_matches':[N]}), True)\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":"81d2ab078ac02762d316ad97e05a7ddc81ad11e5f5f1a24593d80c395ab88826","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 == 'ancestors':\n        return sorted(set(p['matches']) | {a for x in p['matches'] for a in p['ancestors'][x]})\n    if action == 'command-count':\n        return sum(x['kind']=='command' for x in p)\n    if action == 'disabled-match':\n        return [x for x in p if x['matches']]\n    if action == 'group-header':\n        return p['headers']\n    if action == 'query-clear':\n        return p['original']\n    if action == 'owner-match':\n        return p['direct_match'] or bool(p['descendant_matches'])\n    return {'error': 'unsupported menu operation'}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('ancestors contract', solve('ancestors', {'matches':['c'+str(N)],'ancestors':{'c'+str(N):['r','tools']}}), sorted(['c'+str(N),'r','tools']))\ncheck('command-count contract', solve('command-count', [{'kind':'header'},{'kind':'command','id':N},{'kind':'separator'}]), 1)\ncheck('disabled-match contract', solve('disabled-match', [{'matches':True,'enabled':False,'id':N},{'matches':False,'enabled':True,'id':N+1}]), [{'matches':True,'enabled':False,'id':N}])\ncheck('group-header contract', solve('group-header', {'headers':['a','b'],'surviving_groups':['b','c'+str(N)]}), ['b'])\ncheck('query-clear contract', solve('query-clear', {'original':list(range(N+3)),'filtered':[N]}), list(range(N+3)))\ncheck('owner-match contract', solve('owner-match', {'direct_match':False,'descendant_matches':[N]}), True)\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-filtered-menu-projection-group-header","generated_at":"2026-09-29T14:42:17.625813+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 filtered-menu-projection model applies `p['headers']` at its group-header operation instead of the stipulated transformation.","sha256":"0d154dc5b78599813d17ab8d8f1b75e84e6457226f7117ae34fb073e683b05e8","title":"Filtered menu retains headings for groups with no surviving commands · 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":56.79,"exit_code":1,"observations":[{"actual":["c1","r","tools"],"check":"ancestors contract","expected":["c1","r","tools"],"passed":true},{"actual":1,"check":"command-count contract","expected":1,"passed":true},{"actual":[{"enabled":false,"id":1,"matches":true}],"check":"disabled-match contract","expected":[{"enabled":false,"id":1,"matches":true}],"passed":true},{"actual":["b","c1"],"check":"group-header contract","expected":["b"],"passed":false},{"actual":[0,1,2,3],"check":"query-clear contract","expected":[0,1,2,3],"passed":true},{"actual":true,"check":"owner-match contract","expected":true,"passed":true},{"actual":{"error":"unsupported menu operation"},"check":"unknown operation","expected":{"error":"unsupported menu operation"},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"ancestors contract\", \"actual\": [\"c1\", \"r\", \"tools\"], \"expected\": [\"c1\", \"r\", \"tools\"], \"passed\": true}, {\"check\": \"command-count contract\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"disabled-match contract\", \"actual\": [{\"matches\": true, \"enabled\": false, \"id\": 1}], \"expected\": [{\"matches\": true, \"enabled\": false, \"id\": 1}], \"passed\": true}, {\"check\": \"group-header contract\", \"actual\": [\"b\", \"c1\"], \"expected\": [\"b\"], \"passed\": false}, {\"check\": \"query-clear contract\", \"actual\": [0, 1, 2, 3], \"expected\": [0, 1, 2, 3], \"passed\": true}, {\"check\": \"owner-match contract\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"unknown operation\", \"actual\": {\"error\": \"unsupported menu operation\"}, \"expected\": {\"error\": \"unsupported menu operation\"}, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":53.716,"exit_code":1,"observations":[{"actual":["c1","r","tools"],"check":"ancestors contract","expected":["c1","r","tools"],"passed":true},{"actual":1,"check":"command-count contract","expected":1,"passed":true},{"actual":[{"enabled":false,"id":1,"matches":true}],"check":"disabled-match contract","expected":[{"enabled":false,"id":1,"matches":true}],"passed":true},{"actual":["a","b"],"check":"group-header contract","expected":["b"],"passed":false},{"actual":[0,1,2,3],"check":"query-clear contract","expected":[0,1,2,3],"passed":true},{"actual":true,"check":"owner-match contract","expected":true,"passed":true},{"actual":{"error":"unsupported menu operation"},"check":"unknown operation","expected":{"error":"unsupported menu operation"},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"ancestors contract\", \"actual\": [\"c1\", \"r\", \"tools\"], \"expected\": [\"c1\", \"r\", \"tools\"], \"passed\": true}, {\"check\": \"command-count contract\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"disabled-match contract\", \"actual\": [{\"matches\": true, \"enabled\": false, \"id\": 1}], \"expected\": [{\"matches\": true, \"enabled\": false, \"id\": 1}], \"passed\": true}, {\"check\": \"group-header contract\", \"actual\": [\"a\", \"b\"], \"expected\": [\"b\"], \"passed\": false}, {\"check\": \"query-clear contract\", \"actual\": [0, 1, 2, 3], \"expected\": [0, 1, 2, 3], \"passed\": true}, {\"check\": \"owner-match contract\", \"actual\": true, \"expected\": true, \"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."}}