{"abstract":"Menu command result conflates execution owner and invocation origin.","category":"Menu interactions","checks":7,"contract":"Menu dispatch resolves the nearest ancestor handler accepting the command, preserving a command origin distinct from the handler owner.","evaluation_group":"s3-menu-interactions-command-routing","failed_approach":"The attempted repair `{'command':p['command'],'handler':p['handler'],'origin':p['handler']}` still violates the result-owner oracle.","family":"s3-menu-interactions-command-routing-result-owner","id":"FA-32606","implementations":{"attempt":{"sha256":"7b45339549cfef04cf7df09a1f8e85aec596c8b3bb6b8fa831c2c14f0862a576","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 == 'nearest':\n        return next((x['owner'] for x in reversed(p['chain']) if p['command'] in x['handles']),None)\n    if action == 'unsupported':\n        return next((x['owner'] for x in reversed(p['chain']) if p['command'] in x['handles']),None)\n    if action == 'origin':\n        return p['invocation_origin']\n    if action == 'args':\n        return dict(p['defaults'],**p['invocation'])\n    if action == 'stop':\n        return p['handled'] or p['cancelled']\n    if action == 'result-owner':\n        return {'command':p['command'],'handler':p['handler'],'origin':p['handler']}\n    return {'error': 'unsupported menu operation'}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('nearest contract', solve('nearest', {'command':'c'+str(N),'chain':[{'owner':'root','handles':['c'+str(N)]},{'owner':'child','handles':['c'+str(N)]}]}), 'child')\ncheck('unsupported contract', solve('unsupported', {'command':'missing'+str(N),'chain':[{'owner':'root','handles':['a']},{'owner':'child','handles':['b']}]}), None)\ncheck('origin contract', solve('origin', {'invocation_origin':'row'+str(N),'handler_owner':'panel','root_owner':'app'}), 'row'+str(N))\ncheck('args contract', solve('args', {'defaults':{'count':1,'mode':'copy'},'invocation':{'count':N+1}}), {'count':N+1,'mode':'copy'})\ncheck('stop contract', solve('stop', {'handled':False,'cancelled':True,'serial':N}), True)\ncheck('result-owner contract', solve('result-owner', {'command':str(N),'handler':'app','origin':'context'}), {'command':str(N),'handler':'app','origin':'context'})\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":"42b8b37e554e627456396e882a54036ec15a50907f031fd18fbb8c490e1fa9fc","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 == 'nearest':\n        return next((x['owner'] for x in reversed(p['chain']) if p['command'] in x['handles']),None)\n    if action == 'unsupported':\n        return next((x['owner'] for x in reversed(p['chain']) if p['command'] in x['handles']),None)\n    if action == 'origin':\n        return p['invocation_origin']\n    if action == 'args':\n        return dict(p['defaults'],**p['invocation'])\n    if action == 'stop':\n        return p['handled'] or p['cancelled']\n    if action == 'result-owner':\n        return {'command':p['command'],'handler':p['origin'],'origin':p['origin']}\n    return {'error': 'unsupported menu operation'}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('nearest contract', solve('nearest', {'command':'c'+str(N),'chain':[{'owner':'root','handles':['c'+str(N)]},{'owner':'child','handles':['c'+str(N)]}]}), 'child')\ncheck('unsupported contract', solve('unsupported', {'command':'missing'+str(N),'chain':[{'owner':'root','handles':['a']},{'owner':'child','handles':['b']}]}), None)\ncheck('origin contract', solve('origin', {'invocation_origin':'row'+str(N),'handler_owner':'panel','root_owner':'app'}), 'row'+str(N))\ncheck('args contract', solve('args', {'defaults':{'count':1,'mode':'copy'},'invocation':{'count':N+1}}), {'count':N+1,'mode':'copy'})\ncheck('stop contract', solve('stop', {'handled':False,'cancelled':True,'serial':N}), True)\ncheck('result-owner contract', solve('result-owner', {'command':str(N),'handler':'app','origin':'context'}), {'command':str(N),'handler':'app','origin':'context'})\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":"a074dadc309847fa86daf7c53729dc9f1d2f43608fa3d0e6829c711c5680dee8","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 == 'nearest':\n        return next((x['owner'] for x in reversed(p['chain']) if p['command'] in x['handles']),None)\n    if action == 'unsupported':\n        return next((x['owner'] for x in reversed(p['chain']) if p['command'] in x['handles']),None)\n    if action == 'origin':\n        return p['invocation_origin']\n    if action == 'args':\n        return dict(p['defaults'],**p['invocation'])\n    if action == 'stop':\n        return p['handled'] or p['cancelled']\n    if action == 'result-owner':\n        return {'command':p['command'],'handler':p['handler'],'origin':p['origin']}\n    return {'error': 'unsupported menu operation'}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('nearest contract', solve('nearest', {'command':'c'+str(N),'chain':[{'owner':'root','handles':['c'+str(N)]},{'owner':'child','handles':['c'+str(N)]}]}), 'child')\ncheck('unsupported contract', solve('unsupported', {'command':'missing'+str(N),'chain':[{'owner':'root','handles':['a']},{'owner':'child','handles':['b']}]}), None)\ncheck('origin contract', solve('origin', {'invocation_origin':'row'+str(N),'handler_owner':'panel','root_owner':'app'}), 'row'+str(N))\ncheck('args contract', solve('args', {'defaults':{'count':1,'mode':'copy'},'invocation':{'count':N+1}}), {'count':N+1,'mode':'copy'})\ncheck('stop contract', solve('stop', {'handled':False,'cancelled':True,'serial':N}), True)\ncheck('result-owner contract', solve('result-owner', {'command':str(N),'handler':'app','origin':'context'}), {'command':str(N),'handler':'app','origin':'context'})\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-routing-result-owner","generated_at":"2026-09-29T14:42:13.872832+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 `{'command':p['command'],'handler':p['handler'],'origin':p['origin']}` at result-owner.","root_cause":"The command-routing model applies `{'command':p['command'],'handler':p['origin'],'origin':p['origin']}` at its result-owner operation instead of the stipulated transformation.","sha256":"bc2b477574f86beefe3c0eb31ca4782205e7908792223765aabc1cd073136189","title":"Menu command result conflates execution owner and invocation origin · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":42.911,"exit_code":1,"observations":[{"actual":"child","check":"nearest contract","expected":"child","passed":true},{"actual":null,"check":"unsupported contract","expected":null,"passed":true},{"actual":"row1","check":"origin contract","expected":"row1","passed":true},{"actual":{"count":2,"mode":"copy"},"check":"args contract","expected":{"count":2,"mode":"copy"},"passed":true},{"actual":true,"check":"stop contract","expected":true,"passed":true},{"actual":{"command":"1","handler":"app","origin":"app"},"check":"result-owner contract","expected":{"command":"1","handler":"app","origin":"context"},"passed":false},{"actual":{"error":"unsupported menu operation"},"check":"unknown operation","expected":{"error":"unsupported menu operation"},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"nearest contract\", \"actual\": \"child\", \"expected\": \"child\", \"passed\": true}, {\"check\": \"unsupported contract\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"origin contract\", \"actual\": \"row1\", \"expected\": \"row1\", \"passed\": true}, {\"check\": \"args contract\", \"actual\": {\"count\": 2, \"mode\": \"copy\"}, \"expected\": {\"count\": 2, \"mode\": \"copy\"}, \"passed\": true}, {\"check\": \"stop contract\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"result-owner contract\", \"actual\": {\"command\": \"1\", \"handler\": \"app\", \"origin\": \"app\"}, \"expected\": {\"command\": \"1\", \"handler\": \"app\", \"origin\": \"context\"}, \"passed\": false}, {\"check\": \"unknown operation\", \"actual\": {\"error\": \"unsupported menu operation\"}, \"expected\": {\"error\": \"unsupported menu operation\"}, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.956,"exit_code":1,"observations":[{"actual":"child","check":"nearest contract","expected":"child","passed":true},{"actual":null,"check":"unsupported contract","expected":null,"passed":true},{"actual":"row1","check":"origin contract","expected":"row1","passed":true},{"actual":{"count":2,"mode":"copy"},"check":"args contract","expected":{"count":2,"mode":"copy"},"passed":true},{"actual":true,"check":"stop contract","expected":true,"passed":true},{"actual":{"command":"1","handler":"context","origin":"context"},"check":"result-owner contract","expected":{"command":"1","handler":"app","origin":"context"},"passed":false},{"actual":{"error":"unsupported menu operation"},"check":"unknown operation","expected":{"error":"unsupported menu operation"},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"nearest contract\", \"actual\": \"child\", \"expected\": \"child\", \"passed\": true}, {\"check\": \"unsupported contract\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"origin contract\", \"actual\": \"row1\", \"expected\": \"row1\", \"passed\": true}, {\"check\": \"args contract\", \"actual\": {\"count\": 2, \"mode\": \"copy\"}, \"expected\": {\"count\": 2, \"mode\": \"copy\"}, \"passed\": true}, {\"check\": \"stop contract\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"result-owner contract\", \"actual\": {\"command\": \"1\", \"handler\": \"context\", \"origin\": \"context\"}, \"expected\": {\"command\": \"1\", \"handler\": \"app\", \"origin\": \"context\"}, \"passed\": false}, {\"check\": \"unknown operation\", \"actual\": {\"error\": \"unsupported menu operation\"}, \"expected\": {\"error\": \"unsupported menu operation\"}, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":41.921,"exit_code":0,"observations":[{"actual":"child","check":"nearest contract","expected":"child","passed":true},{"actual":null,"check":"unsupported contract","expected":null,"passed":true},{"actual":"row1","check":"origin contract","expected":"row1","passed":true},{"actual":{"count":2,"mode":"copy"},"check":"args contract","expected":{"count":2,"mode":"copy"},"passed":true},{"actual":true,"check":"stop contract","expected":true,"passed":true},{"actual":{"command":"1","handler":"app","origin":"context"},"check":"result-owner contract","expected":{"command":"1","handler":"app","origin":"context"},"passed":true},{"actual":{"error":"unsupported menu operation"},"check":"unknown operation","expected":{"error":"unsupported menu operation"},"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"nearest contract\", \"actual\": \"child\", \"expected\": \"child\", \"passed\": true}, {\"check\": \"unsupported contract\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"origin contract\", \"actual\": \"row1\", \"expected\": \"row1\", \"passed\": true}, {\"check\": \"args contract\", \"actual\": {\"count\": 2, \"mode\": \"copy\"}, \"expected\": {\"count\": 2, \"mode\": \"copy\"}, \"passed\": true}, {\"check\": \"stop contract\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"result-owner contract\", \"actual\": {\"command\": \"1\", \"handler\": \"app\", \"origin\": \"context\"}, \"expected\": {\"command\": \"1\", \"handler\": \"app\", \"origin\": \"context\"}, \"passed\": true}, {\"check\": \"unknown operation\", \"actual\": {\"error\": \"unsupported menu operation\"}, \"expected\": {\"error\": \"unsupported menu operation\"}, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}