{"abstract":"Branch-scoped menu command closes the entire menu session.","category":"Menu interactions","checks":7,"contract":"Menu dismissal reasons map to explicit close scopes; command completion, owner removal and outside dismissal do not share a universal policy.","contract_signature":"action, p","evaluation_group":"s3-menu-interactions-menu-dismissal-policy","failed_approach":"The attempted repair `p['chain']` still violates the leaf-scope oracle.","family":"s3-menu-interactions-menu-dismissal-policy-leaf-scope","id":"FA-33481","implementations":{"attempt":{"sha256":"d0de4d4a81f0e2ddf00234a83a986379cf1f47b5bcb651ccd87a9d2ffac7f9d5","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 == 'leaf-scope':\n        return p['chain']\n    if action == 'veto':\n        return p['requested'] and not p['vetoed']\n    if action == 'mandatory-teardown':\n        return p['owner_removed'] or not p['vetoed']\n    if action == 'reason-priority':\n        return next(x for x in ['owner-removed','command','outside'] if x in p)\n    if action == 'pending-command':\n        return p['pending'] if p['reason']=='transfer' else []\n    if action == 'nested-boundary':\n        return p['chain'][:p['boundary']]\n    return {'error': 'unsupported menu operation'}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('leaf-scope contract', solve('leaf-scope', {'chain':['root','sub',str(N)],'depth':1,'scope':'branch'}), ['root'])\ncheck('veto contract', solve('veto', {'requested':True,'vetoed':True,'owner':N}), False)\ncheck('mandatory-teardown contract', solve('mandatory-teardown', {'owner_removed':True,'vetoed':True,'id':N}), True)\ncheck('reason-priority contract', solve('reason-priority', ['outside','owner-removed','command']), 'owner-removed')\ncheck('pending-command contract', solve('pending-command', {'pending':[N],'reason':'transfer'}), [N])\ncheck('nested-boundary contract', solve('nested-boundary', {'chain':['outer','local','child'+str(N)],'boundary':1}), ['outer'])\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":"a26e34a080100b8d8381c034077ce56173c4aa81e64c7d1afe85bdfd8d9f35fb","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 == 'leaf-scope':\n        return []\n    if action == 'veto':\n        return p['requested'] and not p['vetoed']\n    if action == 'mandatory-teardown':\n        return p['owner_removed'] or not p['vetoed']\n    if action == 'reason-priority':\n        return next(x for x in ['owner-removed','command','outside'] if x in p)\n    if action == 'pending-command':\n        return p['pending'] if p['reason']=='transfer' else []\n    if action == 'nested-boundary':\n        return p['chain'][:p['boundary']]\n    return {'error': 'unsupported menu operation'}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('leaf-scope contract', solve('leaf-scope', {'chain':['root','sub',str(N)],'depth':1,'scope':'branch'}), ['root'])\ncheck('veto contract', solve('veto', {'requested':True,'vetoed':True,'owner':N}), False)\ncheck('mandatory-teardown contract', solve('mandatory-teardown', {'owner_removed':True,'vetoed':True,'id':N}), True)\ncheck('reason-priority contract', solve('reason-priority', ['outside','owner-removed','command']), 'owner-removed')\ncheck('pending-command contract', solve('pending-command', {'pending':[N],'reason':'transfer'}), [N])\ncheck('nested-boundary contract', solve('nested-boundary', {'chain':['outer','local','child'+str(N)],'boundary':1}), ['outer'])\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-dismissal-policy-leaf-scope","generated_at":"2026-09-29T14:42:23.083724+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 menu-dismissal-policy model applies `[]` at its leaf-scope operation instead of the stipulated transformation.","sha256":"2ff22f7c3e6fc8039e68195e75cc5280ee60ac813051968baab6f31763da1f6a","title":"Branch-scoped menu command closes the entire menu session · 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":42.938,"exit_code":1,"observations":[{"actual":["root","sub","1"],"check":"leaf-scope contract","expected":["root"],"passed":false},{"actual":false,"check":"veto contract","expected":false,"passed":true},{"actual":true,"check":"mandatory-teardown contract","expected":true,"passed":true},{"actual":"owner-removed","check":"reason-priority contract","expected":"owner-removed","passed":true},{"actual":[1],"check":"pending-command contract","expected":[1],"passed":true},{"actual":["outer"],"check":"nested-boundary contract","expected":["outer"],"passed":true},{"actual":{"error":"unsupported menu operation"},"check":"unknown operation","expected":{"error":"unsupported menu operation"},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"leaf-scope contract\", \"actual\": [\"root\", \"sub\", \"1\"], \"expected\": [\"root\"], \"passed\": false}, {\"check\": \"veto contract\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"mandatory-teardown contract\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"reason-priority contract\", \"actual\": \"owner-removed\", \"expected\": \"owner-removed\", \"passed\": true}, {\"check\": \"pending-command contract\", \"actual\": [1], \"expected\": [1], \"passed\": true}, {\"check\": \"nested-boundary contract\", \"actual\": [\"outer\"], \"expected\": [\"outer\"], \"passed\": true}, {\"check\": \"unknown operation\", \"actual\": {\"error\": \"unsupported menu operation\"}, \"expected\": {\"error\": \"unsupported menu operation\"}, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.976,"exit_code":1,"observations":[{"actual":[],"check":"leaf-scope contract","expected":["root"],"passed":false},{"actual":false,"check":"veto contract","expected":false,"passed":true},{"actual":true,"check":"mandatory-teardown contract","expected":true,"passed":true},{"actual":"owner-removed","check":"reason-priority contract","expected":"owner-removed","passed":true},{"actual":[1],"check":"pending-command contract","expected":[1],"passed":true},{"actual":["outer"],"check":"nested-boundary contract","expected":["outer"],"passed":true},{"actual":{"error":"unsupported menu operation"},"check":"unknown operation","expected":{"error":"unsupported menu operation"},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"leaf-scope contract\", \"actual\": [], \"expected\": [\"root\"], \"passed\": false}, {\"check\": \"veto contract\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"mandatory-teardown contract\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"reason-priority contract\", \"actual\": \"owner-removed\", \"expected\": \"owner-removed\", \"passed\": true}, {\"check\": \"pending-command contract\", \"actual\": [1], \"expected\": [1], \"passed\": true}, {\"check\": \"nested-boundary contract\", \"actual\": [\"outer\"], \"expected\": [\"outer\"], \"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."}}