{"abstract":"Menu history merges identical commands from different context targets.","category":"Menu interactions","checks":7,"contract":"Menu command receipts retain committed effects, invocation identity and reversible scope; receipt generation does not imply successful mutation.","evaluation_group":"s3-menu-interactions-menu-command-receipts","failed_approach":"The attempted repair `p['command']==p['previous_command'] and p['elapsed']<=p['window']` still violates the merge-window oracle.","family":"s3-menu-interactions-menu-command-receipts-merge-window","id":"FA-33086","implementations":{"attempt":{"sha256":"bb0077f70a33b3623bccba7b817c46cb42448ba9865e00cae1132f0f7df66fc0","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 == 'success-receipt':\n        return p['receipt'] if p['committed'] else None\n    if action == 'effect-order':\n        return list(reversed(p))\n    if action == 'scope':\n        return [x for x in p['effects'] if x['transaction']==p['transaction']]\n    if action == 'description':\n        return p['captured_label']\n    if action == 'noop':\n        return None if p['before']==p['after'] else {'before':p['before'],'after':p['after']}\n    if action == 'merge-window':\n        return p['command']==p['previous_command'] and p['elapsed']<=p['window']\n    return {'error': 'unsupported menu operation'}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('success-receipt contract', solve('success-receipt', {'receipt':N,'committed':False,'attempted':True}), None)\ncheck('effect-order contract', solve('effect-order', ['create','write'+str(N),'rename']), ['rename','write'+str(N),'create'])\ncheck('scope contract', solve('scope', {'transaction':N,'document':'d','effects':[{'transaction':N,'document':'d'},{'transaction':N+1,'document':'d'}]}), [{'transaction':N,'document':'d'}])\ncheck('description contract', solve('description', {'captured_label':'Move '+str(N),'live_label':'Copy','command_id':'edit'}), 'Move '+str(N))\ncheck('noop contract', solve('noop', {'before':N,'after':N}), None)\ncheck('merge-window contract', solve('merge-window', {'command':'rename','previous_command':'rename','context':N,'previous_context':N+1,'elapsed':1,'window':5}), False)\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":"d55b5f8250e9501de57c34c4f5ad64819aa8d80461f925ae24e3c2dea6a76a01","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 == 'success-receipt':\n        return p['receipt'] if p['committed'] else None\n    if action == 'effect-order':\n        return list(reversed(p))\n    if action == 'scope':\n        return [x for x in p['effects'] if x['transaction']==p['transaction']]\n    if action == 'description':\n        return p['captured_label']\n    if action == 'noop':\n        return None if p['before']==p['after'] else {'before':p['before'],'after':p['after']}\n    if action == 'merge-window':\n        return p['command']==p['previous_command']\n    return {'error': 'unsupported menu operation'}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('success-receipt contract', solve('success-receipt', {'receipt':N,'committed':False,'attempted':True}), None)\ncheck('effect-order contract', solve('effect-order', ['create','write'+str(N),'rename']), ['rename','write'+str(N),'create'])\ncheck('scope contract', solve('scope', {'transaction':N,'document':'d','effects':[{'transaction':N,'document':'d'},{'transaction':N+1,'document':'d'}]}), [{'transaction':N,'document':'d'}])\ncheck('description contract', solve('description', {'captured_label':'Move '+str(N),'live_label':'Copy','command_id':'edit'}), 'Move '+str(N))\ncheck('noop contract', solve('noop', {'before':N,'after':N}), None)\ncheck('merge-window contract', solve('merge-window', {'command':'rename','previous_command':'rename','context':N,'previous_context':N+1,'elapsed':1,'window':5}), False)\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":"79cdbebe599a468dd5d63fa2cf905ccc390178c52a3f69906590fa3d291526ba","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 == 'success-receipt':\n        return p['receipt'] if p['committed'] else None\n    if action == 'effect-order':\n        return list(reversed(p))\n    if action == 'scope':\n        return [x for x in p['effects'] if x['transaction']==p['transaction']]\n    if action == 'description':\n        return p['captured_label']\n    if action == 'noop':\n        return None if p['before']==p['after'] else {'before':p['before'],'after':p['after']}\n    if action == 'merge-window':\n        return p['command']==p['previous_command'] and p['context']==p['previous_context'] and p['elapsed']<=p['window']\n    return {'error': 'unsupported menu operation'}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('success-receipt contract', solve('success-receipt', {'receipt':N,'committed':False,'attempted':True}), None)\ncheck('effect-order contract', solve('effect-order', ['create','write'+str(N),'rename']), ['rename','write'+str(N),'create'])\ncheck('scope contract', solve('scope', {'transaction':N,'document':'d','effects':[{'transaction':N,'document':'d'},{'transaction':N+1,'document':'d'}]}), [{'transaction':N,'document':'d'}])\ncheck('description contract', solve('description', {'captured_label':'Move '+str(N),'live_label':'Copy','command_id':'edit'}), 'Move '+str(N))\ncheck('noop contract', solve('noop', {'before':N,'after':N}), None)\ncheck('merge-window contract', solve('merge-window', {'command':'rename','previous_command':'rename','context':N,'previous_context':N+1,'elapsed':1,'window':5}), False)\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-receipts-merge-window","generated_at":"2026-09-29T14:42:18.855206+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['command']==p['previous_command'] and p['context']==p['previous_context'] and p['elapsed']<=p['window']` at merge-window.","root_cause":"The menu-command-receipts model applies `p['command']==p['previous_command']` at its merge-window operation instead of the stipulated transformation.","sha256":"63d79a7d6bbe4f94dbab6bf1822658b2251d81a9f9211254a3526e42fc001f3f","title":"Menu history merges identical commands from different context targets · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":39.837,"exit_code":1,"observations":[{"actual":null,"check":"success-receipt contract","expected":null,"passed":true},{"actual":["rename","write1","create"],"check":"effect-order contract","expected":["rename","write1","create"],"passed":true},{"actual":[{"document":"d","transaction":1}],"check":"scope contract","expected":[{"document":"d","transaction":1}],"passed":true},{"actual":"Move 1","check":"description contract","expected":"Move 1","passed":true},{"actual":null,"check":"noop contract","expected":null,"passed":true},{"actual":true,"check":"merge-window contract","expected":false,"passed":false},{"actual":{"error":"unsupported menu operation"},"check":"unknown operation","expected":{"error":"unsupported menu operation"},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"success-receipt contract\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"effect-order contract\", \"actual\": [\"rename\", \"write1\", \"create\"], \"expected\": [\"rename\", \"write1\", \"create\"], \"passed\": true}, {\"check\": \"scope contract\", \"actual\": [{\"transaction\": 1, \"document\": \"d\"}], \"expected\": [{\"transaction\": 1, \"document\": \"d\"}], \"passed\": true}, {\"check\": \"description contract\", \"actual\": \"Move 1\", \"expected\": \"Move 1\", \"passed\": true}, {\"check\": \"noop contract\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"merge-window contract\", \"actual\": true, \"expected\": false, \"passed\": false}, {\"check\": \"unknown operation\", \"actual\": {\"error\": \"unsupported menu operation\"}, \"expected\": {\"error\": \"unsupported menu operation\"}, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":47.35,"exit_code":1,"observations":[{"actual":null,"check":"success-receipt contract","expected":null,"passed":true},{"actual":["rename","write1","create"],"check":"effect-order contract","expected":["rename","write1","create"],"passed":true},{"actual":[{"document":"d","transaction":1}],"check":"scope contract","expected":[{"document":"d","transaction":1}],"passed":true},{"actual":"Move 1","check":"description contract","expected":"Move 1","passed":true},{"actual":null,"check":"noop contract","expected":null,"passed":true},{"actual":true,"check":"merge-window contract","expected":false,"passed":false},{"actual":{"error":"unsupported menu operation"},"check":"unknown operation","expected":{"error":"unsupported menu operation"},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"success-receipt contract\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"effect-order contract\", \"actual\": [\"rename\", \"write1\", \"create\"], \"expected\": [\"rename\", \"write1\", \"create\"], \"passed\": true}, {\"check\": \"scope contract\", \"actual\": [{\"transaction\": 1, \"document\": \"d\"}], \"expected\": [{\"transaction\": 1, \"document\": \"d\"}], \"passed\": true}, {\"check\": \"description contract\", \"actual\": \"Move 1\", \"expected\": \"Move 1\", \"passed\": true}, {\"check\": \"noop contract\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"merge-window contract\", \"actual\": true, \"expected\": false, \"passed\": false}, {\"check\": \"unknown operation\", \"actual\": {\"error\": \"unsupported menu operation\"}, \"expected\": {\"error\": \"unsupported menu operation\"}, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":42.522,"exit_code":0,"observations":[{"actual":null,"check":"success-receipt contract","expected":null,"passed":true},{"actual":["rename","write1","create"],"check":"effect-order contract","expected":["rename","write1","create"],"passed":true},{"actual":[{"document":"d","transaction":1}],"check":"scope contract","expected":[{"document":"d","transaction":1}],"passed":true},{"actual":"Move 1","check":"description contract","expected":"Move 1","passed":true},{"actual":null,"check":"noop contract","expected":null,"passed":true},{"actual":false,"check":"merge-window contract","expected":false,"passed":true},{"actual":{"error":"unsupported menu operation"},"check":"unknown operation","expected":{"error":"unsupported menu operation"},"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"success-receipt contract\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"effect-order contract\", \"actual\": [\"rename\", \"write1\", \"create\"], \"expected\": [\"rename\", \"write1\", \"create\"], \"passed\": true}, {\"check\": \"scope contract\", \"actual\": [{\"transaction\": 1, \"document\": \"d\"}], \"expected\": [{\"transaction\": 1, \"document\": \"d\"}], \"passed\": true}, {\"check\": \"description contract\", \"actual\": \"Move 1\", \"expected\": \"Move 1\", \"passed\": true}, {\"check\": \"noop contract\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"merge-window contract\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"unknown operation\", \"actual\": {\"error\": \"unsupported menu operation\"}, \"expected\": {\"error\": \"unsupported menu operation\"}, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}