{"abstract":"Restoring independent menu windows merges their identical root definitions.","category":"Menu interactions","checks":7,"contract":"Restored cascades reopen only a contiguous valid prefix of menu owners. Missing, lazy, reparented or unavailable owners stop restoration; root identity and independent menu windows are retained.","evaluation_group":"s3-menu-interactions-menu-cascade-restoration","failed_approach":"The attempted repair `{p[-1]['window']:p[-1]['path']} ` still violates the window-paths oracle.","family":"s3-menu-interactions-menu-cascade-restoration-window-paths","id":"FA-33561","implementations":{"attempt":{"sha256":"38d316ee43d78b487266f1631648fdb34890a357c905cacce5e9e9f8390b70c4","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 == 'missing-prefix':\n        return p['chain'][:next((i for i,x in enumerate(p['chain']) if x not in p['live']),len(p['chain']))]\n    if action == 'lazy-boundary':\n        return p['chain'][:next((i+1 for i,x in enumerate(p['chain']) if x in p['lazy']),len(p['chain']))]\n    if action == 'owner-edge':\n        return p['chain'][:next((i+1 for i,(a,b) in enumerate(zip(p['chain'],p['chain'][1:])) if p['parents'].get(b)!=a),len(p['chain']))]\n    if action == 'availability-prefix':\n        return p['chain'][:next((i for i,x in enumerate(p['chain']) if not p['available'].get(x,False)),len(p['chain']))]\n    if action == 'window-paths':\n        return {p[-1]['window']:p[-1]['path']} \n    if action == 'owner-remap':\n        return [p['mapping'].get(x,x) for x in p['chain']]\n    return {'error': 'unsupported menu operation'}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('missing-prefix contract', solve('missing-prefix', {'chain':['root','gone','child'+str(N)],'live':['root','child'+str(N)]}), ['root'])\ncheck('lazy-boundary contract', solve('lazy-boundary', {'chain':['root','lazy','child'+str(N)],'lazy':['lazy']}), ['root','lazy'])\ncheck('owner-edge contract', solve('owner-edge', {'chain':['root','a','b'+str(N)],'parents':{'a':'root','b'+str(N):'other'}}), ['root','a'])\ncheck('availability-prefix contract', solve('availability-prefix', {'chain':['root','locked','b'+str(N)],'available':{'root':True,'locked':False,'b'+str(N):True}}), ['root'])\ncheck('window-paths contract', solve('window-paths', [{'window':N,'path':['root','a']},{'window':N+1,'path':['root','b']}]), {N:['root','a'],N+1:['root','b']})\ncheck('owner-remap contract', solve('owner-remap', {'chain':['root','old'+str(N)],'mapping':{'old'+str(N):'new'+str(N)}}), ['root','new'+str(N)])\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":"c228865d5c37639a7fe7970e33c34c34919356da7a37d07205d4d312f9fc38ff","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 == 'missing-prefix':\n        return p['chain'][:next((i for i,x in enumerate(p['chain']) if x not in p['live']),len(p['chain']))]\n    if action == 'lazy-boundary':\n        return p['chain'][:next((i+1 for i,x in enumerate(p['chain']) if x in p['lazy']),len(p['chain']))]\n    if action == 'owner-edge':\n        return p['chain'][:next((i+1 for i,(a,b) in enumerate(zip(p['chain'],p['chain'][1:])) if p['parents'].get(b)!=a),len(p['chain']))]\n    if action == 'availability-prefix':\n        return p['chain'][:next((i for i,x in enumerate(p['chain']) if not p['available'].get(x,False)),len(p['chain']))]\n    if action == 'window-paths':\n        return {x['path'][0]:x['path'] for x in p}\n    if action == 'owner-remap':\n        return [p['mapping'].get(x,x) for x in p['chain']]\n    return {'error': 'unsupported menu operation'}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('missing-prefix contract', solve('missing-prefix', {'chain':['root','gone','child'+str(N)],'live':['root','child'+str(N)]}), ['root'])\ncheck('lazy-boundary contract', solve('lazy-boundary', {'chain':['root','lazy','child'+str(N)],'lazy':['lazy']}), ['root','lazy'])\ncheck('owner-edge contract', solve('owner-edge', {'chain':['root','a','b'+str(N)],'parents':{'a':'root','b'+str(N):'other'}}), ['root','a'])\ncheck('availability-prefix contract', solve('availability-prefix', {'chain':['root','locked','b'+str(N)],'available':{'root':True,'locked':False,'b'+str(N):True}}), ['root'])\ncheck('window-paths contract', solve('window-paths', [{'window':N,'path':['root','a']},{'window':N+1,'path':['root','b']}]), {N:['root','a'],N+1:['root','b']})\ncheck('owner-remap contract', solve('owner-remap', {'chain':['root','old'+str(N)],'mapping':{'old'+str(N):'new'+str(N)}}), ['root','new'+str(N)])\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":"17bbaa67596812e66459ec71125ae4c492c44cf6255dba3a8e36ae05fdbab77e","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 == 'missing-prefix':\n        return p['chain'][:next((i for i,x in enumerate(p['chain']) if x not in p['live']),len(p['chain']))]\n    if action == 'lazy-boundary':\n        return p['chain'][:next((i+1 for i,x in enumerate(p['chain']) if x in p['lazy']),len(p['chain']))]\n    if action == 'owner-edge':\n        return p['chain'][:next((i+1 for i,(a,b) in enumerate(zip(p['chain'],p['chain'][1:])) if p['parents'].get(b)!=a),len(p['chain']))]\n    if action == 'availability-prefix':\n        return p['chain'][:next((i for i,x in enumerate(p['chain']) if not p['available'].get(x,False)),len(p['chain']))]\n    if action == 'window-paths':\n        return {x['window']:x['path'] for x in p}\n    if action == 'owner-remap':\n        return [p['mapping'].get(x,x) for x in p['chain']]\n    return {'error': 'unsupported menu operation'}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('missing-prefix contract', solve('missing-prefix', {'chain':['root','gone','child'+str(N)],'live':['root','child'+str(N)]}), ['root'])\ncheck('lazy-boundary contract', solve('lazy-boundary', {'chain':['root','lazy','child'+str(N)],'lazy':['lazy']}), ['root','lazy'])\ncheck('owner-edge contract', solve('owner-edge', {'chain':['root','a','b'+str(N)],'parents':{'a':'root','b'+str(N):'other'}}), ['root','a'])\ncheck('availability-prefix contract', solve('availability-prefix', {'chain':['root','locked','b'+str(N)],'available':{'root':True,'locked':False,'b'+str(N):True}}), ['root'])\ncheck('window-paths contract', solve('window-paths', [{'window':N,'path':['root','a']},{'window':N+1,'path':['root','b']}]), {N:['root','a'],N+1:['root','b']})\ncheck('owner-remap contract', solve('owner-remap', {'chain':['root','old'+str(N)],'mapping':{'old'+str(N):'new'+str(N)}}), ['root','new'+str(N)])\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-cascade-restoration-window-paths","generated_at":"2026-09-29T14:42:23.577062+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 `{x['window']:x['path'] for x in p}` at window-paths.","root_cause":"The menu-cascade-restoration model applies `{x['path'][0]:x['path'] for x in p}` at its window-paths operation instead of the stipulated transformation.","sha256":"5c85c90a44b9ab34372005e8c2f39a4c20f97f70ee176ceecda63605d6ce099a","title":"Restoring independent menu windows merges their identical root definitions · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":43.046,"exit_code":1,"observations":[{"actual":["root"],"check":"missing-prefix contract","expected":["root"],"passed":true},{"actual":["root","lazy"],"check":"lazy-boundary contract","expected":["root","lazy"],"passed":true},{"actual":["root","a"],"check":"owner-edge contract","expected":["root","a"],"passed":true},{"actual":["root"],"check":"availability-prefix contract","expected":["root"],"passed":true},{"actual":{"2":["root","b"]},"check":"window-paths contract","expected":{"1":["root","a"],"2":["root","b"]},"passed":false},{"actual":["root","new1"],"check":"owner-remap contract","expected":["root","new1"],"passed":true},{"actual":{"error":"unsupported menu operation"},"check":"unknown operation","expected":{"error":"unsupported menu operation"},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"missing-prefix contract\", \"actual\": [\"root\"], \"expected\": [\"root\"], \"passed\": true}, {\"check\": \"lazy-boundary contract\", \"actual\": [\"root\", \"lazy\"], \"expected\": [\"root\", \"lazy\"], \"passed\": true}, {\"check\": \"owner-edge contract\", \"actual\": [\"root\", \"a\"], \"expected\": [\"root\", \"a\"], \"passed\": true}, {\"check\": \"availability-prefix contract\", \"actual\": [\"root\"], \"expected\": [\"root\"], \"passed\": true}, {\"check\": \"window-paths contract\", \"actual\": {\"2\": [\"root\", \"b\"]}, \"expected\": {\"1\": [\"root\", \"a\"], \"2\": [\"root\", \"b\"]}, \"passed\": false}, {\"check\": \"owner-remap contract\", \"actual\": [\"root\", \"new1\"], \"expected\": [\"root\", \"new1\"], \"passed\": true}, {\"check\": \"unknown operation\", \"actual\": {\"error\": \"unsupported menu operation\"}, \"expected\": {\"error\": \"unsupported menu operation\"}, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":45.509,"exit_code":1,"observations":[{"actual":["root"],"check":"missing-prefix contract","expected":["root"],"passed":true},{"actual":["root","lazy"],"check":"lazy-boundary contract","expected":["root","lazy"],"passed":true},{"actual":["root","a"],"check":"owner-edge contract","expected":["root","a"],"passed":true},{"actual":["root"],"check":"availability-prefix contract","expected":["root"],"passed":true},{"actual":{"root":["root","b"]},"check":"window-paths contract","expected":{"1":["root","a"],"2":["root","b"]},"passed":false},{"actual":["root","new1"],"check":"owner-remap contract","expected":["root","new1"],"passed":true},{"actual":{"error":"unsupported menu operation"},"check":"unknown operation","expected":{"error":"unsupported menu operation"},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"missing-prefix contract\", \"actual\": [\"root\"], \"expected\": [\"root\"], \"passed\": true}, {\"check\": \"lazy-boundary contract\", \"actual\": [\"root\", \"lazy\"], \"expected\": [\"root\", \"lazy\"], \"passed\": true}, {\"check\": \"owner-edge contract\", \"actual\": [\"root\", \"a\"], \"expected\": [\"root\", \"a\"], \"passed\": true}, {\"check\": \"availability-prefix contract\", \"actual\": [\"root\"], \"expected\": [\"root\"], \"passed\": true}, {\"check\": \"window-paths contract\", \"actual\": {\"root\": [\"root\", \"b\"]}, \"expected\": {\"1\": [\"root\", \"a\"], \"2\": [\"root\", \"b\"]}, \"passed\": false}, {\"check\": \"owner-remap contract\", \"actual\": [\"root\", \"new1\"], \"expected\": [\"root\", \"new1\"], \"passed\": true}, {\"check\": \"unknown operation\", \"actual\": {\"error\": \"unsupported menu operation\"}, \"expected\": {\"error\": \"unsupported menu operation\"}, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":40.798,"exit_code":0,"observations":[{"actual":["root"],"check":"missing-prefix contract","expected":["root"],"passed":true},{"actual":["root","lazy"],"check":"lazy-boundary contract","expected":["root","lazy"],"passed":true},{"actual":["root","a"],"check":"owner-edge contract","expected":["root","a"],"passed":true},{"actual":["root"],"check":"availability-prefix contract","expected":["root"],"passed":true},{"actual":{"1":["root","a"],"2":["root","b"]},"check":"window-paths contract","expected":{"1":["root","a"],"2":["root","b"]},"passed":true},{"actual":["root","new1"],"check":"owner-remap contract","expected":["root","new1"],"passed":true},{"actual":{"error":"unsupported menu operation"},"check":"unknown operation","expected":{"error":"unsupported menu operation"},"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"missing-prefix contract\", \"actual\": [\"root\"], \"expected\": [\"root\"], \"passed\": true}, {\"check\": \"lazy-boundary contract\", \"actual\": [\"root\", \"lazy\"], \"expected\": [\"root\", \"lazy\"], \"passed\": true}, {\"check\": \"owner-edge contract\", \"actual\": [\"root\", \"a\"], \"expected\": [\"root\", \"a\"], \"passed\": true}, {\"check\": \"availability-prefix contract\", \"actual\": [\"root\"], \"expected\": [\"root\"], \"passed\": true}, {\"check\": \"window-paths contract\", \"actual\": {\"1\": [\"root\", \"a\"], \"2\": [\"root\", \"b\"]}, \"expected\": {\"1\": [\"root\", \"a\"], \"2\": [\"root\", \"b\"]}, \"passed\": true}, {\"check\": \"owner-remap contract\", \"actual\": [\"root\", \"new1\"], \"expected\": [\"root\", \"new1\"], \"passed\": true}, {\"check\": \"unknown operation\", \"actual\": {\"error\": \"unsupported menu operation\"}, \"expected\": {\"error\": \"unsupported menu operation\"}, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}