{"abstract":"Vetoed menu opening emits an opened or closed notification.","category":"Menu interactions","checks":7,"contract":"Menu lifecycle notifications report committed transitions once, retain close reasons, and deliver descendant closure before parent closure.","evaluation_group":"s3-menu-interactions-menu-lifecycle-events","failed_approach":"The attempted repair `['closed'] if p['prevented'] else ['opened']` still violates the cancel-open oracle.","family":"s3-menu-interactions-menu-lifecycle-events-cancel-open","id":"FA-33466","implementations":{"attempt":{"sha256":"704723abd60908ffa57b390c8a899fed8221444e05d1f439c0f6eace3688820d","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 == 'open-event':\n        return ['opened'] if not p['before'] and p['after'] else []\n    if action == 'close-reason':\n        return p['reason']\n    if action == 'close-order':\n        return list(reversed(p))\n    if action == 'cancel-open':\n        return ['closed'] if p['prevented'] else ['opened']\n    if action == 'event-context':\n        return {'session':p['session'],'owner':p['owner'],'reason':p['reason']}\n    if action == 'unmount-reason':\n        return 'owner-removed'\n    return {'error': 'unsupported menu operation'}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('open-event contract', solve('open-event', {'before':True,'after':True,'session':N}), [])\ncheck('close-reason contract', solve('close-reason', {'reason':'command'+str(N),'previous_reason':'outside'}), 'command'+str(N))\ncheck('close-order contract', solve('close-order', ['root','child'+str(N)]), ['child'+str(N),'root'])\ncheck('cancel-open contract', solve('cancel-open', {'prevented':True,'session':N}), [])\ncheck('event-context contract', solve('event-context', {'session':N,'owner':'child','root':'root','reason':'replace'}), {'session':N,'owner':'child','reason':'replace'})\ncheck('unmount-reason contract', solve('unmount-reason', {'last_reason':'outside'+str(N)}), 'owner-removed')\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":"70d10aca6404267bfe0d401d9e3d401a1dac38731aa1515173e282f167d79b0f","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 == 'open-event':\n        return ['opened'] if not p['before'] and p['after'] else []\n    if action == 'close-reason':\n        return p['reason']\n    if action == 'close-order':\n        return list(reversed(p))\n    if action == 'cancel-open':\n        return ['opened']\n    if action == 'event-context':\n        return {'session':p['session'],'owner':p['owner'],'reason':p['reason']}\n    if action == 'unmount-reason':\n        return 'owner-removed'\n    return {'error': 'unsupported menu operation'}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('open-event contract', solve('open-event', {'before':True,'after':True,'session':N}), [])\ncheck('close-reason contract', solve('close-reason', {'reason':'command'+str(N),'previous_reason':'outside'}), 'command'+str(N))\ncheck('close-order contract', solve('close-order', ['root','child'+str(N)]), ['child'+str(N),'root'])\ncheck('cancel-open contract', solve('cancel-open', {'prevented':True,'session':N}), [])\ncheck('event-context contract', solve('event-context', {'session':N,'owner':'child','root':'root','reason':'replace'}), {'session':N,'owner':'child','reason':'replace'})\ncheck('unmount-reason contract', solve('unmount-reason', {'last_reason':'outside'+str(N)}), 'owner-removed')\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"},"fixed":{"sha256":"1961e55303bad201954cb1c64e780e585588cbfb56492fa41c94804da1ea313b","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 == 'open-event':\n        return ['opened'] if not p['before'] and p['after'] else []\n    if action == 'close-reason':\n        return p['reason']\n    if action == 'close-order':\n        return list(reversed(p))\n    if action == 'cancel-open':\n        return [] if p['prevented'] else ['opened']\n    if action == 'event-context':\n        return {'session':p['session'],'owner':p['owner'],'reason':p['reason']}\n    if action == 'unmount-reason':\n        return 'owner-removed'\n    return {'error': 'unsupported menu operation'}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('open-event contract', solve('open-event', {'before':True,'after':True,'session':N}), [])\ncheck('close-reason contract', solve('close-reason', {'reason':'command'+str(N),'previous_reason':'outside'}), 'command'+str(N))\ncheck('close-order contract', solve('close-order', ['root','child'+str(N)]), ['child'+str(N),'root'])\ncheck('cancel-open contract', solve('cancel-open', {'prevented':True,'session':N}), [])\ncheck('event-context contract', solve('event-context', {'session':N,'owner':'child','root':'root','reason':'replace'}), {'session':N,'owner':'child','reason':'replace'})\ncheck('unmount-reason contract', solve('unmount-reason', {'last_reason':'outside'+str(N)}), 'owner-removed')\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-menu-lifecycle-events-cancel-open","generated_at":"2026-09-29T14:42:22.622540+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 `[] if p['prevented'] else ['opened']` at cancel-open.","root_cause":"The menu-lifecycle-events model applies `['opened']` at its cancel-open operation instead of the stipulated transformation.","sha256":"f4b6bbd1212bea5a4d7e4b3daf898972dd882a70a7336605dc793e84f8591728","title":"Vetoed menu opening emits an opened or closed notification · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":42.026,"exit_code":1,"observations":[{"actual":[],"check":"open-event contract","expected":[],"passed":true},{"actual":"command1","check":"close-reason contract","expected":"command1","passed":true},{"actual":["child1","root"],"check":"close-order contract","expected":["child1","root"],"passed":true},{"actual":["closed"],"check":"cancel-open contract","expected":[],"passed":false},{"actual":{"owner":"child","reason":"replace","session":1},"check":"event-context contract","expected":{"owner":"child","reason":"replace","session":1},"passed":true},{"actual":"owner-removed","check":"unmount-reason contract","expected":"owner-removed","passed":true},{"actual":{"error":"unsupported menu operation"},"check":"unknown operation","expected":{"error":"unsupported menu operation"},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"open-event contract\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"close-reason contract\", \"actual\": \"command1\", \"expected\": \"command1\", \"passed\": true}, {\"check\": \"close-order contract\", \"actual\": [\"child1\", \"root\"], \"expected\": [\"child1\", \"root\"], \"passed\": true}, {\"check\": \"cancel-open contract\", \"actual\": [\"closed\"], \"expected\": [], \"passed\": false}, {\"check\": \"event-context contract\", \"actual\": {\"session\": 1, \"owner\": \"child\", \"reason\": \"replace\"}, \"expected\": {\"session\": 1, \"owner\": \"child\", \"reason\": \"replace\"}, \"passed\": true}, {\"check\": \"unmount-reason contract\", \"actual\": \"owner-removed\", \"expected\": \"owner-removed\", \"passed\": true}, {\"check\": \"unknown operation\", \"actual\": {\"error\": \"unsupported menu operation\"}, \"expected\": {\"error\": \"unsupported menu operation\"}, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.017,"exit_code":1,"observations":[{"actual":[],"check":"open-event contract","expected":[],"passed":true},{"actual":"command1","check":"close-reason contract","expected":"command1","passed":true},{"actual":["child1","root"],"check":"close-order contract","expected":["child1","root"],"passed":true},{"actual":["opened"],"check":"cancel-open contract","expected":[],"passed":false},{"actual":{"owner":"child","reason":"replace","session":1},"check":"event-context contract","expected":{"owner":"child","reason":"replace","session":1},"passed":true},{"actual":"owner-removed","check":"unmount-reason contract","expected":"owner-removed","passed":true},{"actual":{"error":"unsupported menu operation"},"check":"unknown operation","expected":{"error":"unsupported menu operation"},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"open-event contract\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"close-reason contract\", \"actual\": \"command1\", \"expected\": \"command1\", \"passed\": true}, {\"check\": \"close-order contract\", \"actual\": [\"child1\", \"root\"], \"expected\": [\"child1\", \"root\"], \"passed\": true}, {\"check\": \"cancel-open contract\", \"actual\": [\"opened\"], \"expected\": [], \"passed\": false}, {\"check\": \"event-context contract\", \"actual\": {\"session\": 1, \"owner\": \"child\", \"reason\": \"replace\"}, \"expected\": {\"session\": 1, \"owner\": \"child\", \"reason\": \"replace\"}, \"passed\": true}, {\"check\": \"unmount-reason contract\", \"actual\": \"owner-removed\", \"expected\": \"owner-removed\", \"passed\": true}, {\"check\": \"unknown operation\", \"actual\": {\"error\": \"unsupported menu operation\"}, \"expected\": {\"error\": \"unsupported menu operation\"}, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":47.895,"exit_code":0,"observations":[{"actual":[],"check":"open-event contract","expected":[],"passed":true},{"actual":"command1","check":"close-reason contract","expected":"command1","passed":true},{"actual":["child1","root"],"check":"close-order contract","expected":["child1","root"],"passed":true},{"actual":[],"check":"cancel-open contract","expected":[],"passed":true},{"actual":{"owner":"child","reason":"replace","session":1},"check":"event-context contract","expected":{"owner":"child","reason":"replace","session":1},"passed":true},{"actual":"owner-removed","check":"unmount-reason contract","expected":"owner-removed","passed":true},{"actual":{"error":"unsupported menu operation"},"check":"unknown operation","expected":{"error":"unsupported menu operation"},"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"open-event contract\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"close-reason contract\", \"actual\": \"command1\", \"expected\": \"command1\", \"passed\": true}, {\"check\": \"close-order contract\", \"actual\": [\"child1\", \"root\"], \"expected\": [\"child1\", \"root\"], \"passed\": true}, {\"check\": \"cancel-open contract\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"event-context contract\", \"actual\": {\"session\": 1, \"owner\": \"child\", \"reason\": \"replace\"}, \"expected\": {\"session\": 1, \"owner\": \"child\", \"reason\": \"replace\"}, \"passed\": true}, {\"check\": \"unmount-reason contract\", \"actual\": \"owner-removed\", \"expected\": \"owner-removed\", \"passed\": true}, {\"check\": \"unknown operation\", \"actual\": {\"error\": \"unsupported menu operation\"}, \"expected\": {\"error\": \"unsupported menu operation\"}, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}