{"abstract":"Removing a menu owner leaves orphaned grandchildren.","category":"Menu interactions","checks":7,"contract":"An opened cascade is an ordered branch; replacing a depth discards deeper descendants.","contract_signature":"action, p","evaluation_group":"s3-menu-interactions-cascade-ownership","failed_approach":"The attempted repair `p['chain'][:-1]` still violates the remove-owner oracle.","family":"s3-menu-interactions-cascade-ownership-remove-owner","id":"FA-32381","implementations":{"attempt":{"sha256":"ebdd420bec5c195beba4b0c102e1616843d7654fe79b341cad35ae59dbd72c00","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 == 'replace':\n        return p['chain'][:p['depth']]+[p['item']]\n    if action == 'close':\n        return p['chain'][:p['depth']]\n    if action == 'remove-owner':\n        return p['chain'][:-1]\n    if action == 'same-owner':\n        return p['chain'] if p['chain'][p['depth']]==p['item'] else p['chain'][:p['depth']]+[p['item']]\n    if action == 'parent-token':\n        return p['tokens'][p['depth']-1]\n    if action == 'owner-depth':\n        return p['chain'].index(p['owner']) if p['owner'] in p['chain'] else None\n    return {'error': 'unsupported menu operation'}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('replace contract', solve('replace', {'chain':['r','a','old'],'depth':1,'item':'b'+str(N)}), ['r','b'+str(N)])\ncheck('close contract', solve('close', {'chain':['r','a',str(N)],'depth':2}), ['r','a'])\ncheck('remove-owner contract', solve('remove-owner', {'chain':['r','a','b',str(N)],'owner':'a'}), ['r'])\ncheck('same-owner contract', solve('same-owner', {'chain':['r','a',str(N)],'depth':1,'item':'a'}), ['r','a',str(N)])\ncheck('parent-token contract', solve('parent-token', {'tokens':['root','parent'+str(N),'child'],'depth':2}), 'parent'+str(N))\ncheck('owner-depth contract', solve('owner-depth', {'chain':['r','a'+str(N),'b','c'],'owner':'a'+str(N)}), 1)\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":"a214d479a23f700a7a36e369c1c22b7b482dbc331d8ddd23ccdd6005f60d0bf4","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 == 'replace':\n        return p['chain'][:p['depth']]+[p['item']]\n    if action == 'close':\n        return p['chain'][:p['depth']]\n    if action == 'remove-owner':\n        return [x for x in p['chain'] if x!=p['owner']]\n    if action == 'same-owner':\n        return p['chain'] if p['chain'][p['depth']]==p['item'] else p['chain'][:p['depth']]+[p['item']]\n    if action == 'parent-token':\n        return p['tokens'][p['depth']-1]\n    if action == 'owner-depth':\n        return p['chain'].index(p['owner']) if p['owner'] in p['chain'] else None\n    return {'error': 'unsupported menu operation'}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('replace contract', solve('replace', {'chain':['r','a','old'],'depth':1,'item':'b'+str(N)}), ['r','b'+str(N)])\ncheck('close contract', solve('close', {'chain':['r','a',str(N)],'depth':2}), ['r','a'])\ncheck('remove-owner contract', solve('remove-owner', {'chain':['r','a','b',str(N)],'owner':'a'}), ['r'])\ncheck('same-owner contract', solve('same-owner', {'chain':['r','a',str(N)],'depth':1,'item':'a'}), ['r','a',str(N)])\ncheck('parent-token contract', solve('parent-token', {'tokens':['root','parent'+str(N),'child'],'depth':2}), 'parent'+str(N))\ncheck('owner-depth contract', solve('owner-depth', {'chain':['r','a'+str(N),'b','c'],'owner':'a'+str(N)}), 1)\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-cascade-ownership-remove-owner","generated_at":"2026-09-29T14:42:11.801307+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 cascade-ownership model applies `[x for x in p['chain'] if x!=p['owner']]` at its remove-owner operation instead of the stipulated transformation.","sha256":"327d09a1e71ad67ad482c316cb6d3a2fa3ac9524fa5c795ae561fdfd23a0428a","title":"Removing a menu owner leaves orphaned grandchildren · 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":45.728,"exit_code":1,"observations":[{"actual":["r","b1"],"check":"replace contract","expected":["r","b1"],"passed":true},{"actual":["r","a"],"check":"close contract","expected":["r","a"],"passed":true},{"actual":["r","a","b"],"check":"remove-owner contract","expected":["r"],"passed":false},{"actual":["r","a","1"],"check":"same-owner contract","expected":["r","a","1"],"passed":true},{"actual":"parent1","check":"parent-token contract","expected":"parent1","passed":true},{"actual":1,"check":"owner-depth contract","expected":1,"passed":true},{"actual":{"error":"unsupported menu operation"},"check":"unknown operation","expected":{"error":"unsupported menu operation"},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"replace contract\", \"actual\": [\"r\", \"b1\"], \"expected\": [\"r\", \"b1\"], \"passed\": true}, {\"check\": \"close contract\", \"actual\": [\"r\", \"a\"], \"expected\": [\"r\", \"a\"], \"passed\": true}, {\"check\": \"remove-owner contract\", \"actual\": [\"r\", \"a\", \"b\"], \"expected\": [\"r\"], \"passed\": false}, {\"check\": \"same-owner contract\", \"actual\": [\"r\", \"a\", \"1\"], \"expected\": [\"r\", \"a\", \"1\"], \"passed\": true}, {\"check\": \"parent-token contract\", \"actual\": \"parent1\", \"expected\": \"parent1\", \"passed\": true}, {\"check\": \"owner-depth contract\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"unknown operation\", \"actual\": {\"error\": \"unsupported menu operation\"}, \"expected\": {\"error\": \"unsupported menu operation\"}, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.605,"exit_code":1,"observations":[{"actual":["r","b1"],"check":"replace contract","expected":["r","b1"],"passed":true},{"actual":["r","a"],"check":"close contract","expected":["r","a"],"passed":true},{"actual":["r","b","1"],"check":"remove-owner contract","expected":["r"],"passed":false},{"actual":["r","a","1"],"check":"same-owner contract","expected":["r","a","1"],"passed":true},{"actual":"parent1","check":"parent-token contract","expected":"parent1","passed":true},{"actual":1,"check":"owner-depth contract","expected":1,"passed":true},{"actual":{"error":"unsupported menu operation"},"check":"unknown operation","expected":{"error":"unsupported menu operation"},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"replace contract\", \"actual\": [\"r\", \"b1\"], \"expected\": [\"r\", \"b1\"], \"passed\": true}, {\"check\": \"close contract\", \"actual\": [\"r\", \"a\"], \"expected\": [\"r\", \"a\"], \"passed\": true}, {\"check\": \"remove-owner contract\", \"actual\": [\"r\", \"b\", \"1\"], \"expected\": [\"r\"], \"passed\": false}, {\"check\": \"same-owner contract\", \"actual\": [\"r\", \"a\", \"1\"], \"expected\": [\"r\", \"a\", \"1\"], \"passed\": true}, {\"check\": \"parent-token contract\", \"actual\": \"parent1\", \"expected\": \"parent1\", \"passed\": true}, {\"check\": \"owner-depth contract\", \"actual\": 1, \"expected\": 1, \"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."}}