{"abstract":"Failed menu command closes a success-only popup.","category":"Menu interactions","checks":7,"contract":"Menu command transactions have explicit preparation, execution, success and failure phases; close policy and duplicate suppression are separate.","contract_signature":"action, p","evaluation_group":"s3-menu-interactions-dispatch-lifecycle","failed_approach":"The attempted repair `p['success'] or p['policy']=='success'` still violates the success-close oracle.","family":"s3-menu-interactions-dispatch-lifecycle-success-close","id":"FA-32621","implementations":{"attempt":{"sha256":"d094d21aece6ec940314502ac683ce2c02529cbe814e2a0ddbfbafed200e92df","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 == 'prepare':\n        return 'prepared' if p['validated'] and p['authorized'] else 'rejected'\n    if action == 'pending':\n        return p['state']=='prepared' and not p['inflight']\n    if action == 'success-close':\n        return p['success'] or p['policy']=='success'\n    if action == 'failure':\n        return {'state':'failed','error':p['error'],'retry':p['retryable']}\n    if action == 'retry-id':\n        return {'command':p['command'],'attempt':p['attempt']+1,'context':p['context']}\n    if action == 'completion':\n        return p['transaction']==p['pending']\n    return {'error': 'unsupported menu operation'}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('prepare contract', solve('prepare', {'validated':True,'authorized':False,'command':N}), 'rejected')\ncheck('pending contract', solve('pending', {'state':'prepared','inflight':True,'id':N}), False)\ncheck('success-close contract', solve('success-close', {'success':False,'policy':'success','id':N}), False)\ncheck('failure contract', solve('failure', {'error':'e'+str(N),'retryable':True}), {'state':'failed','error':'e'+str(N),'retry':True})\ncheck('retry-id contract', solve('retry-id', {'command':'copy','attempt':N,'context':'doc'}), {'command':'copy','attempt':N+1,'context':'doc'})\ncheck('completion contract', solve('completion', {'transaction':N,'pending':N+1}), False)\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":"6b30c57e2c9925d30c6085378269d96061a1e8fc6a7d6514fe632218c18f91af","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 == 'prepare':\n        return 'prepared' if p['validated'] and p['authorized'] else 'rejected'\n    if action == 'pending':\n        return p['state']=='prepared' and not p['inflight']\n    if action == 'success-close':\n        return p['policy']=='success'\n    if action == 'failure':\n        return {'state':'failed','error':p['error'],'retry':p['retryable']}\n    if action == 'retry-id':\n        return {'command':p['command'],'attempt':p['attempt']+1,'context':p['context']}\n    if action == 'completion':\n        return p['transaction']==p['pending']\n    return {'error': 'unsupported menu operation'}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('prepare contract', solve('prepare', {'validated':True,'authorized':False,'command':N}), 'rejected')\ncheck('pending contract', solve('pending', {'state':'prepared','inflight':True,'id':N}), False)\ncheck('success-close contract', solve('success-close', {'success':False,'policy':'success','id':N}), False)\ncheck('failure contract', solve('failure', {'error':'e'+str(N),'retryable':True}), {'state':'failed','error':'e'+str(N),'retry':True})\ncheck('retry-id contract', solve('retry-id', {'command':'copy','attempt':N,'context':'doc'}), {'command':'copy','attempt':N+1,'context':'doc'})\ncheck('completion contract', solve('completion', {'transaction':N,'pending':N+1}), False)\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-dispatch-lifecycle-success-close","generated_at":"2026-09-29T14:42:14.198425+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 dispatch-lifecycle model applies `p['policy']=='success'` at its success-close operation instead of the stipulated transformation.","sha256":"f13540354e9c4291265fc7d65e6039294120c0b33540722076ce5dd528ab34c3","title":"Failed menu command closes a success-only popup · 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":41.647,"exit_code":1,"observations":[{"actual":"rejected","check":"prepare contract","expected":"rejected","passed":true},{"actual":false,"check":"pending contract","expected":false,"passed":true},{"actual":true,"check":"success-close contract","expected":false,"passed":false},{"actual":{"error":"e1","retry":true,"state":"failed"},"check":"failure contract","expected":{"error":"e1","retry":true,"state":"failed"},"passed":true},{"actual":{"attempt":2,"command":"copy","context":"doc"},"check":"retry-id contract","expected":{"attempt":2,"command":"copy","context":"doc"},"passed":true},{"actual":false,"check":"completion contract","expected":false,"passed":true},{"actual":{"error":"unsupported menu operation"},"check":"unknown operation","expected":{"error":"unsupported menu operation"},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"prepare contract\", \"actual\": \"rejected\", \"expected\": \"rejected\", \"passed\": true}, {\"check\": \"pending contract\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"success-close contract\", \"actual\": true, \"expected\": false, \"passed\": false}, {\"check\": \"failure contract\", \"actual\": {\"state\": \"failed\", \"error\": \"e1\", \"retry\": true}, \"expected\": {\"state\": \"failed\", \"error\": \"e1\", \"retry\": true}, \"passed\": true}, {\"check\": \"retry-id contract\", \"actual\": {\"command\": \"copy\", \"attempt\": 2, \"context\": \"doc\"}, \"expected\": {\"command\": \"copy\", \"attempt\": 2, \"context\": \"doc\"}, \"passed\": true}, {\"check\": \"completion contract\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"unknown operation\", \"actual\": {\"error\": \"unsupported menu operation\"}, \"expected\": {\"error\": \"unsupported menu operation\"}, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.597,"exit_code":1,"observations":[{"actual":"rejected","check":"prepare contract","expected":"rejected","passed":true},{"actual":false,"check":"pending contract","expected":false,"passed":true},{"actual":true,"check":"success-close contract","expected":false,"passed":false},{"actual":{"error":"e1","retry":true,"state":"failed"},"check":"failure contract","expected":{"error":"e1","retry":true,"state":"failed"},"passed":true},{"actual":{"attempt":2,"command":"copy","context":"doc"},"check":"retry-id contract","expected":{"attempt":2,"command":"copy","context":"doc"},"passed":true},{"actual":false,"check":"completion contract","expected":false,"passed":true},{"actual":{"error":"unsupported menu operation"},"check":"unknown operation","expected":{"error":"unsupported menu operation"},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"prepare contract\", \"actual\": \"rejected\", \"expected\": \"rejected\", \"passed\": true}, {\"check\": \"pending contract\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"success-close contract\", \"actual\": true, \"expected\": false, \"passed\": false}, {\"check\": \"failure contract\", \"actual\": {\"state\": \"failed\", \"error\": \"e1\", \"retry\": true}, \"expected\": {\"state\": \"failed\", \"error\": \"e1\", \"retry\": true}, \"passed\": true}, {\"check\": \"retry-id contract\", \"actual\": {\"command\": \"copy\", \"attempt\": 2, \"context\": \"doc\"}, \"expected\": {\"command\": \"copy\", \"attempt\": 2, \"context\": \"doc\"}, \"passed\": true}, {\"check\": \"completion contract\", \"actual\": false, \"expected\": false, \"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."}}