{"abstract":"Menu confirmation miscounts destructive effects in a mixed plan.","category":"Menu interactions","checks":7,"contract":"A confirmation launched from a menu freezes command intent; confirm executes exactly that intent, cancellation discards it, and stale documents require reconfirmation.","evaluation_group":"s3-menu-interactions-menu-command-confirmation","failed_approach":"The attempted repair `int(any(x['destructive'] for x in p))` still violates the destructive-count oracle.","family":"s3-menu-interactions-menu-command-confirmation-destructive-count","id":"FA-33711","implementations":{"attempt":{"sha256":"8bade9e34e462827bea7f73499f53ef5c05dbba67e15e417fbd203c08b8914f4","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 == 'intent':\n        return {'command':p['command'],'targets':p['captured'],'arguments':p['arguments']}\n    if action == 'cancel':\n        return None\n    if action == 'consume':\n        return {'execute':p['intent'],'pending':None}\n    if action == 'revision':\n        return 'execute' if p['captured_revision']==p['live_revision'] else 'reconfirm'\n    if action == 'destructive-count':\n        return int(any(x['destructive'] for x in p))\n    if action == 'return-menu':\n        return p['menu'] if p['menu_live'] else None\n    return {'error': 'unsupported menu operation'}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('intent contract', solve('intent', {'command':'delete','captured':[N],'current':[N+1],'arguments':{'permanent':True}}), {'command':'delete','targets':[N],'arguments':{'permanent':True}})\ncheck('cancel contract', solve('cancel', {'pending':{'target':N}}), None)\ncheck('consume contract', solve('consume', {'intent':{'id':N}}), {'execute':{'id':N},'pending':None})\ncheck('revision contract', solve('revision', {'captured_revision':N,'live_revision':N+1}), 'reconfirm')\ncheck('destructive-count contract', solve('destructive-count', [{'destructive':True,'id':N},{'destructive':True,'id':N+1},{'destructive':False,'id':N+2}]), 2)\ncheck('return-menu contract', solve('return-menu', {'menu':N,'menu_live':False,'fallback':'root'}), None)\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":"2bf8c71bfedb77776ee39396c2a0655be0bd657c8eda7b05cee181f90e777ab1","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 == 'intent':\n        return {'command':p['command'],'targets':p['captured'],'arguments':p['arguments']}\n    if action == 'cancel':\n        return None\n    if action == 'consume':\n        return {'execute':p['intent'],'pending':None}\n    if action == 'revision':\n        return 'execute' if p['captured_revision']==p['live_revision'] else 'reconfirm'\n    if action == 'destructive-count':\n        return len(p)\n    if action == 'return-menu':\n        return p['menu'] if p['menu_live'] else None\n    return {'error': 'unsupported menu operation'}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('intent contract', solve('intent', {'command':'delete','captured':[N],'current':[N+1],'arguments':{'permanent':True}}), {'command':'delete','targets':[N],'arguments':{'permanent':True}})\ncheck('cancel contract', solve('cancel', {'pending':{'target':N}}), None)\ncheck('consume contract', solve('consume', {'intent':{'id':N}}), {'execute':{'id':N},'pending':None})\ncheck('revision contract', solve('revision', {'captured_revision':N,'live_revision':N+1}), 'reconfirm')\ncheck('destructive-count contract', solve('destructive-count', [{'destructive':True,'id':N},{'destructive':True,'id':N+1},{'destructive':False,'id':N+2}]), 2)\ncheck('return-menu contract', solve('return-menu', {'menu':N,'menu_live':False,'fallback':'root'}), None)\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":"4a26eb3598423d13c1ff1ba81eed79ec8b5189741b3f8d7b5c63f13dc555c5e7","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 == 'intent':\n        return {'command':p['command'],'targets':p['captured'],'arguments':p['arguments']}\n    if action == 'cancel':\n        return None\n    if action == 'consume':\n        return {'execute':p['intent'],'pending':None}\n    if action == 'revision':\n        return 'execute' if p['captured_revision']==p['live_revision'] else 'reconfirm'\n    if action == 'destructive-count':\n        return sum(x['destructive'] for x in p)\n    if action == 'return-menu':\n        return p['menu'] if p['menu_live'] else None\n    return {'error': 'unsupported menu operation'}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('intent contract', solve('intent', {'command':'delete','captured':[N],'current':[N+1],'arguments':{'permanent':True}}), {'command':'delete','targets':[N],'arguments':{'permanent':True}})\ncheck('cancel contract', solve('cancel', {'pending':{'target':N}}), None)\ncheck('consume contract', solve('consume', {'intent':{'id':N}}), {'execute':{'id':N},'pending':None})\ncheck('revision contract', solve('revision', {'captured_revision':N,'live_revision':N+1}), 'reconfirm')\ncheck('destructive-count contract', solve('destructive-count', [{'destructive':True,'id':N},{'destructive':True,'id':N+1},{'destructive':False,'id':N+2}]), 2)\ncheck('return-menu contract', solve('return-menu', {'menu':N,'menu_live':False,'fallback':'root'}), None)\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-command-confirmation-destructive-count","generated_at":"2026-09-29T14:42:24.977501+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 `sum(x['destructive'] for x in p)` at destructive-count.","root_cause":"The menu-command-confirmation model applies `len(p)` at its destructive-count operation instead of the stipulated transformation.","sha256":"365a58d9ffe7d85f100ad1a46da291c556015815876a79af29871101a2cd18f8","title":"Menu confirmation miscounts destructive effects in a mixed plan · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":44.003,"exit_code":1,"observations":[{"actual":{"arguments":{"permanent":true},"command":"delete","targets":[1]},"check":"intent contract","expected":{"arguments":{"permanent":true},"command":"delete","targets":[1]},"passed":true},{"actual":null,"check":"cancel contract","expected":null,"passed":true},{"actual":{"execute":{"id":1},"pending":null},"check":"consume contract","expected":{"execute":{"id":1},"pending":null},"passed":true},{"actual":"reconfirm","check":"revision contract","expected":"reconfirm","passed":true},{"actual":1,"check":"destructive-count contract","expected":2,"passed":false},{"actual":null,"check":"return-menu contract","expected":null,"passed":true},{"actual":{"error":"unsupported menu operation"},"check":"unknown operation","expected":{"error":"unsupported menu operation"},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"intent contract\", \"actual\": {\"command\": \"delete\", \"targets\": [1], \"arguments\": {\"permanent\": true}}, \"expected\": {\"command\": \"delete\", \"targets\": [1], \"arguments\": {\"permanent\": true}}, \"passed\": true}, {\"check\": \"cancel contract\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"consume contract\", \"actual\": {\"execute\": {\"id\": 1}, \"pending\": null}, \"expected\": {\"execute\": {\"id\": 1}, \"pending\": null}, \"passed\": true}, {\"check\": \"revision contract\", \"actual\": \"reconfirm\", \"expected\": \"reconfirm\", \"passed\": true}, {\"check\": \"destructive-count contract\", \"actual\": 1, \"expected\": 2, \"passed\": false}, {\"check\": \"return-menu contract\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"unknown operation\", \"actual\": {\"error\": \"unsupported menu operation\"}, \"expected\": {\"error\": \"unsupported menu operation\"}, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.436,"exit_code":1,"observations":[{"actual":{"arguments":{"permanent":true},"command":"delete","targets":[1]},"check":"intent contract","expected":{"arguments":{"permanent":true},"command":"delete","targets":[1]},"passed":true},{"actual":null,"check":"cancel contract","expected":null,"passed":true},{"actual":{"execute":{"id":1},"pending":null},"check":"consume contract","expected":{"execute":{"id":1},"pending":null},"passed":true},{"actual":"reconfirm","check":"revision contract","expected":"reconfirm","passed":true},{"actual":3,"check":"destructive-count contract","expected":2,"passed":false},{"actual":null,"check":"return-menu contract","expected":null,"passed":true},{"actual":{"error":"unsupported menu operation"},"check":"unknown operation","expected":{"error":"unsupported menu operation"},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"intent contract\", \"actual\": {\"command\": \"delete\", \"targets\": [1], \"arguments\": {\"permanent\": true}}, \"expected\": {\"command\": \"delete\", \"targets\": [1], \"arguments\": {\"permanent\": true}}, \"passed\": true}, {\"check\": \"cancel contract\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"consume contract\", \"actual\": {\"execute\": {\"id\": 1}, \"pending\": null}, \"expected\": {\"execute\": {\"id\": 1}, \"pending\": null}, \"passed\": true}, {\"check\": \"revision contract\", \"actual\": \"reconfirm\", \"expected\": \"reconfirm\", \"passed\": true}, {\"check\": \"destructive-count contract\", \"actual\": 3, \"expected\": 2, \"passed\": false}, {\"check\": \"return-menu contract\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"unknown operation\", \"actual\": {\"error\": \"unsupported menu operation\"}, \"expected\": {\"error\": \"unsupported menu operation\"}, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":39.842,"exit_code":0,"observations":[{"actual":{"arguments":{"permanent":true},"command":"delete","targets":[1]},"check":"intent contract","expected":{"arguments":{"permanent":true},"command":"delete","targets":[1]},"passed":true},{"actual":null,"check":"cancel contract","expected":null,"passed":true},{"actual":{"execute":{"id":1},"pending":null},"check":"consume contract","expected":{"execute":{"id":1},"pending":null},"passed":true},{"actual":"reconfirm","check":"revision contract","expected":"reconfirm","passed":true},{"actual":2,"check":"destructive-count contract","expected":2,"passed":true},{"actual":null,"check":"return-menu contract","expected":null,"passed":true},{"actual":{"error":"unsupported menu operation"},"check":"unknown operation","expected":{"error":"unsupported menu operation"},"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"intent contract\", \"actual\": {\"command\": \"delete\", \"targets\": [1], \"arguments\": {\"permanent\": true}}, \"expected\": {\"command\": \"delete\", \"targets\": [1], \"arguments\": {\"permanent\": true}}, \"passed\": true}, {\"check\": \"cancel contract\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"consume contract\", \"actual\": {\"execute\": {\"id\": 1}, \"pending\": null}, \"expected\": {\"execute\": {\"id\": 1}, \"pending\": null}, \"passed\": true}, {\"check\": \"revision contract\", \"actual\": \"reconfirm\", \"expected\": \"reconfirm\", \"passed\": true}, {\"check\": \"destructive-count contract\", \"actual\": 2, \"expected\": 2, \"passed\": true}, {\"check\": \"return-menu contract\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"unknown operation\", \"actual\": {\"error\": \"unsupported menu operation\"}, \"expected\": {\"error\": \"unsupported menu operation\"}, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}