{"abstract":"Menu availability explanation reports a lower-priority denial.","category":"Menu interactions","checks":8,"contract":"Menu-specific command availability combines document cardinality, type support and command preconditions; explanations have a deterministic policy order.","contract_signature":"action, p","evaluation_group":"s3-menu-interactions-command-availability","failed_approach":"The attempted repair `None` still violates the reason oracle.","family":"s3-menu-interactions-command-availability-reason","id":"FA-32931","implementations":{"attempt":{"sha256":"248349e8de4de3bf9474b0320c8f7ac4e685b1f87f5dfce4fbc57387565e7b66","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 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":"bbe9513ae97049594c05e74d95bfab08bf025f19a66a773b0e7d65e7b1be532b","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 reversed(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-reason","generated_at":"2026-09-29T14:42:17.245930+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 command-availability model applies `next((x['reason'] for x in reversed(p) if not x['ok']),None)` at its reason operation instead of the stipulated transformation.","sha256":"8b6b0a8363c0a283e75155a04055d3d7511ca8e91a1db498e37f7345a1c6027c","title":"Menu availability explanation reports a lower-priority denial · 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.738,"exit_code":1,"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":null,"check":"reason contract","expected":"first1","passed":false},{"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\": 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\": null, \"expected\": \"first1\", \"passed\": false}, {\"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":43.666,"exit_code":1,"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":"second","check":"reason contract","expected":"first1","passed":false},{"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\": 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\": \"second\", \"expected\": \"first1\", \"passed\": false}, {\"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"}},"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."}}