{"abstract":"Repeated local IDs route to the wrong menu branch.","category":"Menu interactions","checks":7,"contract":"Stable menu paths retain ancestry and available owners; separator encoding is unambiguous and resolution is exact.","evaluation_group":"s3-menu-interactions-command-address","failed_approach":"The attempted repair `next((x['command'] for x in p['rows'] if x['path'][0]==p['path'][0]),None)` still violates the resolve oracle.","family":"s3-menu-interactions-command-address-resolve","id":"FA-32361","implementations":{"attempt":{"sha256":"b8db6adc17f902a90f02efaf9a47c66327d6816a047f36ada00761fcabc12d12","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 == 'encode':\n        return '/'.join(x.replace('~','~0').replace('/','~1') for x in p)\n    if action == 'ancestor-availability':\n        return all(x['available'] for x in p['owners']) and p['command_available']\n    if action == 'parent':\n        return p[:-1]\n    if action == 'descendant':\n        return p['candidate'][:len(p['root'])]==p['root'] and len(p['candidate'])>len(p['root'])\n    if action == 'resolve':\n        return next((x['command'] for x in p['rows'] if x['path'][0]==p['path'][0]),None)\n    if action == 'reroot':\n        return [p['new']]+p['path'][1:]\n    return {'error': 'unsupported menu operation'}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('encode contract', solve('encode', ['r~'+str(N),'a/b']), 'r~0'+str(N)+'/a~1b')\ncheck('ancestor-availability contract', solve('ancestor-availability', {'owners':[{'available':True,'id':N},{'available':False,'id':N+1}],'command_available':True}), False)\ncheck('parent contract', solve('parent', ['r','a','b'+str(N)]), ['r','a'])\ncheck('descendant contract', solve('descendant', {'root':['r','a'],'candidate':['r','b',str(N)]}), False)\ncheck('resolve contract', solve('resolve', {'rows':[{'path':['r','a',str(N)],'command':'wrong'},{'path':['r','b',str(N)],'command':'right'}],'path':['r','b',str(N)]}), 'right')\ncheck('reroot contract', solve('reroot', {'new':'new'+str(N),'path':['old','tools','run']}), ['new'+str(N),'tools','run'])\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":"2f2bc38f96ebdf6343c68bfd7ed09fd54f582b9cc659085eece59b5ef488b3b9","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 == 'encode':\n        return '/'.join(x.replace('~','~0').replace('/','~1') for x in p)\n    if action == 'ancestor-availability':\n        return all(x['available'] for x in p['owners']) and p['command_available']\n    if action == 'parent':\n        return p[:-1]\n    if action == 'descendant':\n        return p['candidate'][:len(p['root'])]==p['root'] and len(p['candidate'])>len(p['root'])\n    if action == 'resolve':\n        return next((x['command'] for x in p['rows'] if x['path'][-1]==p['path'][-1]),None)\n    if action == 'reroot':\n        return [p['new']]+p['path'][1:]\n    return {'error': 'unsupported menu operation'}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('encode contract', solve('encode', ['r~'+str(N),'a/b']), 'r~0'+str(N)+'/a~1b')\ncheck('ancestor-availability contract', solve('ancestor-availability', {'owners':[{'available':True,'id':N},{'available':False,'id':N+1}],'command_available':True}), False)\ncheck('parent contract', solve('parent', ['r','a','b'+str(N)]), ['r','a'])\ncheck('descendant contract', solve('descendant', {'root':['r','a'],'candidate':['r','b',str(N)]}), False)\ncheck('resolve contract', solve('resolve', {'rows':[{'path':['r','a',str(N)],'command':'wrong'},{'path':['r','b',str(N)],'command':'right'}],'path':['r','b',str(N)]}), 'right')\ncheck('reroot contract', solve('reroot', {'new':'new'+str(N),'path':['old','tools','run']}), ['new'+str(N),'tools','run'])\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":"7b36aeb56c772b1d76e560448cc396d853ad494ad307ca5bd0d6e4e9ad1f05a2","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 == 'encode':\n        return '/'.join(x.replace('~','~0').replace('/','~1') for x in p)\n    if action == 'ancestor-availability':\n        return all(x['available'] for x in p['owners']) and p['command_available']\n    if action == 'parent':\n        return p[:-1]\n    if action == 'descendant':\n        return p['candidate'][:len(p['root'])]==p['root'] and len(p['candidate'])>len(p['root'])\n    if action == 'resolve':\n        return next((x['command'] for x in p['rows'] if x['path']==p['path']),None)\n    if action == 'reroot':\n        return [p['new']]+p['path'][1:]\n    return {'error': 'unsupported menu operation'}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('encode contract', solve('encode', ['r~'+str(N),'a/b']), 'r~0'+str(N)+'/a~1b')\ncheck('ancestor-availability contract', solve('ancestor-availability', {'owners':[{'available':True,'id':N},{'available':False,'id':N+1}],'command_available':True}), False)\ncheck('parent contract', solve('parent', ['r','a','b'+str(N)]), ['r','a'])\ncheck('descendant contract', solve('descendant', {'root':['r','a'],'candidate':['r','b',str(N)]}), False)\ncheck('resolve contract', solve('resolve', {'rows':[{'path':['r','a',str(N)],'command':'wrong'},{'path':['r','b',str(N)],'command':'right'}],'path':['r','b',str(N)]}), 'right')\ncheck('reroot contract', solve('reroot', {'new':'new'+str(N),'path':['old','tools','run']}), ['new'+str(N),'tools','run'])\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-command-address-resolve","generated_at":"2026-09-29T14:42:11.486189+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 `next((x['command'] for x in p['rows'] if x['path']==p['path']),None)` at resolve.","root_cause":"The command-address model applies `next((x['command'] for x in p['rows'] if x['path'][-1]==p['path'][-1]),None)` at its resolve operation instead of the stipulated transformation.","sha256":"fecaa10f7491e05b0d48fd7b8006ee648d84181bcc19409eae3e1578d0a7eca4","title":"Repeated local IDs route to the wrong menu branch · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":47.956,"exit_code":1,"observations":[{"actual":"r~01/a~1b","check":"encode contract","expected":"r~01/a~1b","passed":true},{"actual":false,"check":"ancestor-availability contract","expected":false,"passed":true},{"actual":["r","a"],"check":"parent contract","expected":["r","a"],"passed":true},{"actual":false,"check":"descendant contract","expected":false,"passed":true},{"actual":"wrong","check":"resolve contract","expected":"right","passed":false},{"actual":["new1","tools","run"],"check":"reroot contract","expected":["new1","tools","run"],"passed":true},{"actual":{"error":"unsupported menu operation"},"check":"unknown operation","expected":{"error":"unsupported menu operation"},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"encode contract\", \"actual\": \"r~01/a~1b\", \"expected\": \"r~01/a~1b\", \"passed\": true}, {\"check\": \"ancestor-availability contract\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"parent contract\", \"actual\": [\"r\", \"a\"], \"expected\": [\"r\", \"a\"], \"passed\": true}, {\"check\": \"descendant contract\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"resolve contract\", \"actual\": \"wrong\", \"expected\": \"right\", \"passed\": false}, {\"check\": \"reroot contract\", \"actual\": [\"new1\", \"tools\", \"run\"], \"expected\": [\"new1\", \"tools\", \"run\"], \"passed\": true}, {\"check\": \"unknown operation\", \"actual\": {\"error\": \"unsupported menu operation\"}, \"expected\": {\"error\": \"unsupported menu operation\"}, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":45.717,"exit_code":1,"observations":[{"actual":"r~01/a~1b","check":"encode contract","expected":"r~01/a~1b","passed":true},{"actual":false,"check":"ancestor-availability contract","expected":false,"passed":true},{"actual":["r","a"],"check":"parent contract","expected":["r","a"],"passed":true},{"actual":false,"check":"descendant contract","expected":false,"passed":true},{"actual":"wrong","check":"resolve contract","expected":"right","passed":false},{"actual":["new1","tools","run"],"check":"reroot contract","expected":["new1","tools","run"],"passed":true},{"actual":{"error":"unsupported menu operation"},"check":"unknown operation","expected":{"error":"unsupported menu operation"},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"encode contract\", \"actual\": \"r~01/a~1b\", \"expected\": \"r~01/a~1b\", \"passed\": true}, {\"check\": \"ancestor-availability contract\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"parent contract\", \"actual\": [\"r\", \"a\"], \"expected\": [\"r\", \"a\"], \"passed\": true}, {\"check\": \"descendant contract\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"resolve contract\", \"actual\": \"wrong\", \"expected\": \"right\", \"passed\": false}, {\"check\": \"reroot contract\", \"actual\": [\"new1\", \"tools\", \"run\"], \"expected\": [\"new1\", \"tools\", \"run\"], \"passed\": true}, {\"check\": \"unknown operation\", \"actual\": {\"error\": \"unsupported menu operation\"}, \"expected\": {\"error\": \"unsupported menu operation\"}, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":44.159,"exit_code":0,"observations":[{"actual":"r~01/a~1b","check":"encode contract","expected":"r~01/a~1b","passed":true},{"actual":false,"check":"ancestor-availability contract","expected":false,"passed":true},{"actual":["r","a"],"check":"parent contract","expected":["r","a"],"passed":true},{"actual":false,"check":"descendant contract","expected":false,"passed":true},{"actual":"right","check":"resolve contract","expected":"right","passed":true},{"actual":["new1","tools","run"],"check":"reroot contract","expected":["new1","tools","run"],"passed":true},{"actual":{"error":"unsupported menu operation"},"check":"unknown operation","expected":{"error":"unsupported menu operation"},"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"encode contract\", \"actual\": \"r~01/a~1b\", \"expected\": \"r~01/a~1b\", \"passed\": true}, {\"check\": \"ancestor-availability contract\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"parent contract\", \"actual\": [\"r\", \"a\"], \"expected\": [\"r\", \"a\"], \"passed\": true}, {\"check\": \"descendant contract\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"resolve contract\", \"actual\": \"right\", \"expected\": \"right\", \"passed\": true}, {\"check\": \"reroot contract\", \"actual\": [\"new1\", \"tools\", \"run\"], \"expected\": [\"new1\", \"tools\", \"run\"], \"passed\": true}, {\"check\": \"unknown operation\", \"actual\": {\"error\": \"unsupported menu operation\"}, \"expected\": {\"error\": \"unsupported menu operation\"}, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}