{"abstract":"Menu filter removes informative unavailable command results.","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 `[x for x in p if x['enabled']]` still violates the disabled-match oracle.","family":"s3-menu-interactions-filtered-menu-projection-disabled-match","id":"FA-32951","implementations":{"attempt":{"sha256":"7757a02a3f685b949d49041a9776d904ce52be03e791c4db7ad973b39d9cd9a0","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['enabled']]\n    if action == 'group-header':\n        return [x for x in p['headers'] if x in 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":"078061c8d85f5fecc3c9d6a3a7e6f68bc837d04072fe922c456156c30b6ad0dc","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'] and x['enabled']]\n    if action == 'group-header':\n        return [x for x in p['headers'] if x in 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"}},"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-disabled-match","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 `[x for x in p if x['matches'] and x['enabled']]` at its disabled-match operation instead of the stipulated transformation.","sha256":"6bfc67717f7b550fcf7cba4af3dd336e2406a18f277ad360f041c04a1642291c","title":"Menu filter removes informative unavailable command results · 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":52.276,"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":true,"id":2,"matches":false}],"check":"disabled-match contract","expected":[{"enabled":false,"id":1,"matches":true}],"passed":false},{"actual":["b"],"check":"group-header contract","expected":["b"],"passed":true},{"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\": false, \"enabled\": true, \"id\": 2}], \"expected\": [{\"matches\": true, \"enabled\": false, \"id\": 1}], \"passed\": false}, {\"check\": \"group-header contract\", \"actual\": [\"b\"], \"expected\": [\"b\"], \"passed\": true}, {\"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":65.411,"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":[],"check":"disabled-match contract","expected":[{"enabled":false,"id":1,"matches":true}],"passed":false},{"actual":["b"],"check":"group-header contract","expected":["b"],"passed":true},{"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\": [], \"expected\": [{\"matches\": true, \"enabled\": false, \"id\": 1}], \"passed\": false}, {\"check\": \"group-header contract\", \"actual\": [\"b\"], \"expected\": [\"b\"], \"passed\": true}, {\"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."}}