{"abstract":"Menu lifecycle event attributes a child transition to the root owner.","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 `{'session':p['session'],'owner':p['owner'],'reason':None}` still violates the event-context oracle.","family":"s3-menu-interactions-menu-lifecycle-events-event-context","id":"FA-33471","implementations":{"attempt":{"sha256":"1ac23139795b13bee4679d0fcbcd488ba502f0816b78b1b1fdc71b7f9a13b62d","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':None}\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":"c3cc72e018a48caae0e665155f537a436fb704d02dd55c120ab7c0f5f2592422","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['root'],'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-event-context","generated_at":"2026-09-29T14:42:22.750207+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 `{'session':p['session'],'owner':p['owner'],'reason':p['reason']}` at event-context.","root_cause":"The menu-lifecycle-events model applies `{'session':p['session'],'owner':p['root'],'reason':p['reason']}` at its event-context operation instead of the stipulated transformation.","sha256":"b1ad7d9d8739afc698ac5d71b09cd71b869b4d6bfe80911566dd1c99379a2a6e","title":"Menu lifecycle event attributes a child transition to the root owner · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":45.78,"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":[],"check":"cancel-open contract","expected":[],"passed":true},{"actual":{"owner":"child","reason":null,"session":1},"check":"event-context contract","expected":{"owner":"child","reason":"replace","session":1},"passed":false},{"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\": [], \"expected\": [], \"passed\": true}, {\"check\": \"event-context contract\", \"actual\": {\"session\": 1, \"owner\": \"child\", \"reason\": null}, \"expected\": {\"session\": 1, \"owner\": \"child\", \"reason\": \"replace\"}, \"passed\": false}, {\"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":44.345,"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":[],"check":"cancel-open contract","expected":[],"passed":true},{"actual":{"owner":"root","reason":"replace","session":1},"check":"event-context contract","expected":{"owner":"child","reason":"replace","session":1},"passed":false},{"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\": [], \"expected\": [], \"passed\": true}, {\"check\": \"event-context contract\", \"actual\": {\"session\": 1, \"owner\": \"root\", \"reason\": \"replace\"}, \"expected\": {\"session\": 1, \"owner\": \"child\", \"reason\": \"replace\"}, \"passed\": false}, {\"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":42.847,"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"}