{"abstract":"Owner removal reuses the previous menu close reason.","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 `'command'` still violates the unmount-reason oracle.","family":"s3-menu-interactions-menu-lifecycle-events-unmount-reason","id":"FA-33476","implementations":{"attempt":{"sha256":"319c96fe6864b854bae66c38fb6a2687915e185960c90d86b78e9fe7f4a29879","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 'command'\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":"a5f4743b768ec772ccbe2c32422cf12e3e84660f7108a45d207ab3c98c6e8afa","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 p['last_reason']\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-unmount-reason","generated_at":"2026-09-29T14:42:22.760666+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 `'owner-removed'` at unmount-reason.","root_cause":"The menu-lifecycle-events model applies `p['last_reason']` at its unmount-reason operation instead of the stipulated transformation.","sha256":"ee59f67724804a0e063e7d9c8cea38f8fb4e65fdc2a0ecb64a93c29a3d65c477","title":"Owner removal reuses the previous menu close reason · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":43.177,"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":"replace","session":1},"check":"event-context contract","expected":{"owner":"child","reason":"replace","session":1},"passed":true},{"actual":"command","check":"unmount-reason contract","expected":"owner-removed","passed":false},{"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\": \"replace\"}, \"expected\": {\"session\": 1, \"owner\": \"child\", \"reason\": \"replace\"}, \"passed\": true}, {\"check\": \"unmount-reason contract\", \"actual\": \"command\", \"expected\": \"owner-removed\", \"passed\": false}, {\"check\": \"unknown operation\", \"actual\": {\"error\": \"unsupported menu operation\"}, \"expected\": {\"error\": \"unsupported menu operation\"}, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":44.177,"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":"replace","session":1},"check":"event-context contract","expected":{"owner":"child","reason":"replace","session":1},"passed":true},{"actual":"outside1","check":"unmount-reason contract","expected":"owner-removed","passed":false},{"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\": \"replace\"}, \"expected\": {\"session\": 1, \"owner\": \"child\", \"reason\": \"replace\"}, \"passed\": true}, {\"check\": \"unmount-reason contract\", \"actual\": \"outside1\", \"expected\": \"owner-removed\", \"passed\": false}, {\"check\": \"unknown operation\", \"actual\": {\"error\": \"unsupported menu operation\"}, \"expected\": {\"error\": \"unsupported menu operation\"}, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":44.89,"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"}