{"abstract":"Menu IDs containing separators alias other commands.","category":"Menu interactions","checks":7,"contract":"Stable menu paths retain ancestry and available owners; separator encoding is unambiguous and resolution is exact.","contract_signature":"action, p","evaluation_group":"s3-menu-interactions-command-address","failed_approach":"The attempted repair `'/'.join(x.replace('/','~1') for x in p)` still violates the encode oracle.","family":"s3-menu-interactions-command-address-encode","id":"FA-32341","implementations":{"attempt":{"sha256":"b7af2a28b4078a7bf51753e86efbbded2993d6be0b6831728a06e58364088512","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('/','~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"},"broken":{"sha256":"63dbeee8ffe5ab86ed9da5182d4c2ac55c58caf3c9025fbf6d561c7cdd76fa48","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(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-encode","generated_at":"2026-09-29T14:42:11.486120+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 command-address model applies `'/'.join(p)` at its encode operation instead of the stipulated transformation.","sha256":"824ae11999b19a4761df63f1a10b36407b3dc09f7f145290b8d14830cff8fa77","title":"Menu IDs containing separators alias other commands · 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":48.812,"exit_code":1,"observations":[{"actual":"r~1/a~1b","check":"encode contract","expected":"r~01/a~1b","passed":false},{"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":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"encode contract\", \"actual\": \"r~1/a~1b\", \"expected\": \"r~01/a~1b\", \"passed\": false}, {\"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\": false}\n"},"broken":{"elapsed_ms":46.287,"exit_code":1,"observations":[{"actual":"r~1/a/b","check":"encode contract","expected":"r~01/a~1b","passed":false},{"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":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"encode contract\", \"actual\": \"r~1/a/b\", \"expected\": \"r~01/a~1b\", \"passed\": false}, {\"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\": 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."}}