{"abstract":"Menu command accepts a mixed unsupported document batch.","category":"Menu interactions","checks":8,"contract":"Menu-specific command availability combines document cardinality, type support and command preconditions; explanations have a deterministic policy order.","evaluation_group":"s3-menu-interactions-command-availability","failed_approach":"The attempted repair `bool(set(p['types']) & set(p['supported']))` still violates the all-types oracle.","family":"s3-menu-interactions-command-availability-all-types","id":"FA-32916","implementations":{"attempt":{"sha256":"fe5134cd5e3cf9071eeed7b08ed4c6499541774a3f9c69848fc821af8b05f1b1","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 == 'cardinality':\n        return p['min']<=p['count']<=p['max']\n    if action == 'all-types':\n        return bool(set(p['types']) & set(p['supported']))\n    if action == 'nonempty':\n        return bool(p['targets']) and all(p['valid'])\n    if action == 'busy':\n        return not p['document_busy'] and not p['command_busy']\n    if action == 'reason':\n        return next((x['reason'] for x in p if not x['ok']),None)\n    if action == 'expiry':\n        return p['now']<p['expires']\n    return {'error': 'unsupported menu operation'}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('cardinality contract', solve('cardinality', {'min':1,'max':N+1,'count':N+2}), False)\ncheck('all-types contract', solve('all-types', {'types':['text','binary'+str(N)],'supported':['text']}), False)\ncheck('nonempty contract', solve('nonempty', {'targets':[],'valid':[],'revision':N}), False)\ncheck('busy contract', solve('busy', {'document_busy':False,'command_busy':True,'id':N}), False)\ncheck('reason contract', solve('reason', [{'ok':False,'reason':'first'+str(N)},{'ok':False,'reason':'second'}]), 'first'+str(N))\ncheck('expiry contract', solve('expiry', {'now':N,'expires':N}), False)\ncheck('unknown operation', solve('unknown', {}), {'error': 'unsupported menu operation'})\ncheck('too few context objects',solve('cardinality',{'min':N+1,'max':N+3,'count':N}),False)\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":"6962df5bc1d210f71c5df91b3015b492a80aaa1bfe98789f30373560afb55bbc","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 == 'cardinality':\n        return p['min']<=p['count']<=p['max']\n    if action == 'all-types':\n        return any(t in p['supported'] for t in p['types'])\n    if action == 'nonempty':\n        return bool(p['targets']) and all(p['valid'])\n    if action == 'busy':\n        return not p['document_busy'] and not p['command_busy']\n    if action == 'reason':\n        return next((x['reason'] for x in p if not x['ok']),None)\n    if action == 'expiry':\n        return p['now']<p['expires']\n    return {'error': 'unsupported menu operation'}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('cardinality contract', solve('cardinality', {'min':1,'max':N+1,'count':N+2}), False)\ncheck('all-types contract', solve('all-types', {'types':['text','binary'+str(N)],'supported':['text']}), False)\ncheck('nonempty contract', solve('nonempty', {'targets':[],'valid':[],'revision':N}), False)\ncheck('busy contract', solve('busy', {'document_busy':False,'command_busy':True,'id':N}), False)\ncheck('reason contract', solve('reason', [{'ok':False,'reason':'first'+str(N)},{'ok':False,'reason':'second'}]), 'first'+str(N))\ncheck('expiry contract', solve('expiry', {'now':N,'expires':N}), False)\ncheck('unknown operation', solve('unknown', {}), {'error': 'unsupported menu operation'})\ncheck('too few context objects',solve('cardinality',{'min':N+1,'max':N+3,'count':N}),False)\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"},"fixed":{"sha256":"c1dfd83e17fe71d067333fd9560cf800b16d5829e531a8275a44f303ca293a83","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 == 'cardinality':\n        return p['min']<=p['count']<=p['max']\n    if action == 'all-types':\n        return all(t in p['supported'] for t in p['types'])\n    if action == 'nonempty':\n        return bool(p['targets']) and all(p['valid'])\n    if action == 'busy':\n        return not p['document_busy'] and not p['command_busy']\n    if action == 'reason':\n        return next((x['reason'] for x in p if not x['ok']),None)\n    if action == 'expiry':\n        return p['now']<p['expires']\n    return {'error': 'unsupported menu operation'}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('cardinality contract', solve('cardinality', {'min':1,'max':N+1,'count':N+2}), False)\ncheck('all-types contract', solve('all-types', {'types':['text','binary'+str(N)],'supported':['text']}), False)\ncheck('nonempty contract', solve('nonempty', {'targets':[],'valid':[],'revision':N}), False)\ncheck('busy contract', solve('busy', {'document_busy':False,'command_busy':True,'id':N}), False)\ncheck('reason contract', solve('reason', [{'ok':False,'reason':'first'+str(N)},{'ok':False,'reason':'second'}]), 'first'+str(N))\ncheck('expiry contract', solve('expiry', {'now':N,'expires':N}), False)\ncheck('unknown operation', solve('unknown', {}), {'error': 'unsupported menu operation'})\ncheck('too few context objects',solve('cardinality',{'min':N+1,'max':N+3,'count':N}),False)\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-command-availability-all-types","generated_at":"2026-09-29T14:42:17.066483+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.","repair":"Apply `all(t in p['supported'] for t in p['types'])` at all-types.","root_cause":"The command-availability model applies `any(t in p['supported'] for t in p['types'])` at its all-types operation instead of the stipulated transformation.","sha256":"bdbdeccd29897f728b5b1a7ffdc993a6b79196c543fbf5f6ee10dd723915b0da","title":"Menu command accepts a mixed unsupported document batch · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":40.589,"exit_code":1,"observations":[{"actual":false,"check":"cardinality contract","expected":false,"passed":true},{"actual":true,"check":"all-types contract","expected":false,"passed":false},{"actual":false,"check":"nonempty contract","expected":false,"passed":true},{"actual":false,"check":"busy contract","expected":false,"passed":true},{"actual":"first1","check":"reason contract","expected":"first1","passed":true},{"actual":false,"check":"expiry contract","expected":false,"passed":true},{"actual":{"error":"unsupported menu operation"},"check":"unknown operation","expected":{"error":"unsupported menu operation"},"passed":true},{"actual":false,"check":"too few context objects","expected":false,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"cardinality contract\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"all-types contract\", \"actual\": true, \"expected\": false, \"passed\": false}, {\"check\": \"nonempty contract\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"busy contract\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"reason contract\", \"actual\": \"first1\", \"expected\": \"first1\", \"passed\": true}, {\"check\": \"expiry contract\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"unknown operation\", \"actual\": {\"error\": \"unsupported menu operation\"}, \"expected\": {\"error\": \"unsupported menu operation\"}, \"passed\": true}, {\"check\": \"too few context objects\", \"actual\": false, \"expected\": false, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.521,"exit_code":1,"observations":[{"actual":false,"check":"cardinality contract","expected":false,"passed":true},{"actual":true,"check":"all-types contract","expected":false,"passed":false},{"actual":false,"check":"nonempty contract","expected":false,"passed":true},{"actual":false,"check":"busy contract","expected":false,"passed":true},{"actual":"first1","check":"reason contract","expected":"first1","passed":true},{"actual":false,"check":"expiry contract","expected":false,"passed":true},{"actual":{"error":"unsupported menu operation"},"check":"unknown operation","expected":{"error":"unsupported menu operation"},"passed":true},{"actual":false,"check":"too few context objects","expected":false,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"cardinality contract\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"all-types contract\", \"actual\": true, \"expected\": false, \"passed\": false}, {\"check\": \"nonempty contract\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"busy contract\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"reason contract\", \"actual\": \"first1\", \"expected\": \"first1\", \"passed\": true}, {\"check\": \"expiry contract\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"unknown operation\", \"actual\": {\"error\": \"unsupported menu operation\"}, \"expected\": {\"error\": \"unsupported menu operation\"}, \"passed\": true}, {\"check\": \"too few context objects\", \"actual\": false, \"expected\": false, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":43.101,"exit_code":0,"observations":[{"actual":false,"check":"cardinality contract","expected":false,"passed":true},{"actual":false,"check":"all-types contract","expected":false,"passed":true},{"actual":false,"check":"nonempty contract","expected":false,"passed":true},{"actual":false,"check":"busy contract","expected":false,"passed":true},{"actual":"first1","check":"reason contract","expected":"first1","passed":true},{"actual":false,"check":"expiry contract","expected":false,"passed":true},{"actual":{"error":"unsupported menu operation"},"check":"unknown operation","expected":{"error":"unsupported menu operation"},"passed":true},{"actual":false,"check":"too few context objects","expected":false,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"cardinality contract\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"all-types contract\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"nonempty contract\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"busy contract\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"reason contract\", \"actual\": \"first1\", \"expected\": \"first1\", \"passed\": true}, {\"check\": \"expiry contract\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"unknown operation\", \"actual\": {\"error\": \"unsupported menu operation\"}, \"expected\": {\"error\": \"unsupported menu operation\"}, \"passed\": true}, {\"check\": \"too few context objects\", \"actual\": false, \"expected\": false, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}