{"abstract":"Menu batch command overlooks its upper cardinality limit.","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 `p['count']<=p['max']` still violates the cardinality oracle.","family":"s3-menu-interactions-command-availability-cardinality","id":"FA-32911","implementations":{"attempt":{"sha256":"8d224406f95c49af79a3e294d794e7fe29bd184fcd1e25ba90c109c6eae4713e","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['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"},"broken":{"sha256":"3570e03fbbfff850d081e10363d6274147e62d7287b1e8371ef40e9cd8385428","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['count']>=p['min']\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-cardinality","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 `p['count']>=p['min']` at its cardinality operation instead of the stipulated transformation.","sha256":"a4abf1dfb0cc5731f6ccecfcbec21a71755424440ae0ab12295f675d5688ac9b","title":"Menu batch command overlooks its upper cardinality limit · 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":43.979,"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":"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":true,"check":"too few context objects","expected":false,"passed":false}],"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\": \"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\": true, \"expected\": false, \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":44.377,"exit_code":1,"observations":[{"actual":true,"check":"cardinality contract","expected":false,"passed":false},{"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":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"cardinality contract\", \"actual\": true, \"expected\": false, \"passed\": false}, {\"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\": 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."}}