{"abstract":"Cancelled menu command continues through ancestor handlers.","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 `p['handled'] and p['cancelled']` still violates the stop oracle.","family":"s3-menu-interactions-command-routing-stop","id":"FA-32601","implementations":{"attempt":{"sha256":"f37fd308ee3f8c4583d38c846a23a6105f5d67c1cbf53d3081baf89ae35921b3","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'] and 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"},"broken":{"sha256":"3feb414c8219f1dcee7fd9c0250d97827b9d73303ed872b14b9621e30c9e746f","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']\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"},"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-stop","generated_at":"2026-09-29T14:42:13.873109+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 `p['handled'] or p['cancelled']` at stop.","root_cause":"The command-routing model applies `p['handled']` at its stop operation instead of the stipulated transformation.","sha256":"557a0f7031cf305a8103eb7de523b545b945241965024f4d54d56032ee6cb087","title":"Cancelled menu command continues through ancestor handlers · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":43.811,"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":false,"check":"stop contract","expected":true,"passed":false},{"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":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\": false, \"expected\": true, \"passed\": false}, {\"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\": false}\n"},"broken":{"elapsed_ms":40.35,"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":false,"check":"stop contract","expected":true,"passed":false},{"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":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\": false, \"expected\": true, \"passed\": false}, {\"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\": false}\n"},"fixed":{"elapsed_ms":41.853,"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"}