{"abstract":"Menu patch revision advances once per operation instead of commit.","category":"Menu interactions","checks":8,"contract":"Provider menu patches apply to one base revision atomically; row edits use stable IDs and insertion anchors, while missing anchors reject the patch.","evaluation_group":"s3-menu-interactions-menu-patch-transaction","failed_approach":"The attempted repair `p['base']+p['operation_count']` still violates the revision-step oracle.","family":"s3-menu-interactions-menu-patch-transaction-revision-step","id":"FA-33416","implementations":{"attempt":{"sha256":"0625aea036677c283f99e0f2a47512866f00b88c7630f121344d4026b0abfaa5","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 == 'base':\n        return p['base']==p['revision']\n    if action == 'insert-after':\n        return p['rows'][:p['rows'].index(p['anchor'])+1]+[p['new']]+p['rows'][p['rows'].index(p['anchor'])+1:]\n    if action == 'missing-anchor':\n        return 'reject' if p['anchor'] not in p['rows'] else 'apply'\n    if action == 'rollback':\n        return p['before'] if p['failed'] else p['working']\n    if action == 'replace-kind':\n        return dict(p['replacement'],id=p['old']['id'])\n    if action == 'revision-step':\n        return p['base']+p['operation_count']\n    return {'error': 'unsupported menu operation'}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('base contract', solve('base', {'base':N,'revision':N+1}), False)\ncheck('insert-after contract', solve('insert-after', {'rows':['a','b'],'anchor':'a','new':N}), ['a',N,'b'])\ncheck('missing-anchor contract', solve('missing-anchor', {'rows':[N],'anchor':N+1}), 'reject')\ncheck('rollback contract', solve('rollback', {'before':[N,N+1],'working':[N+2],'failed':True}), [N,N+1])\ncheck('replace-kind contract', solve('replace-kind', {'old':{'id':N,'kind':'command','handler':'old'},'replacement':{'kind':'submenu','children':[N+1]}}), {'id':N,'kind':'submenu','children':[N+1]})\ncheck('revision-step contract', solve('revision-step', {'base':N,'committed':True,'operation_count':3}), N+1)\ncheck('unknown operation', solve('unknown', {}), {'error': 'unsupported menu operation'})\ncheck('failed patch retains revision',solve('revision-step',{'base':N,'committed':False,'operation_count':2}),N)\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":"5c5e73c98306969307f9bde6383bfff302f068d6c0c97e915a639d2a5e6ddb03","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 == 'base':\n        return p['base']==p['revision']\n    if action == 'insert-after':\n        return p['rows'][:p['rows'].index(p['anchor'])+1]+[p['new']]+p['rows'][p['rows'].index(p['anchor'])+1:]\n    if action == 'missing-anchor':\n        return 'reject' if p['anchor'] not in p['rows'] else 'apply'\n    if action == 'rollback':\n        return p['before'] if p['failed'] else p['working']\n    if action == 'replace-kind':\n        return dict(p['replacement'],id=p['old']['id'])\n    if action == 'revision-step':\n        return p['base']+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('base contract', solve('base', {'base':N,'revision':N+1}), False)\ncheck('insert-after contract', solve('insert-after', {'rows':['a','b'],'anchor':'a','new':N}), ['a',N,'b'])\ncheck('missing-anchor contract', solve('missing-anchor', {'rows':[N],'anchor':N+1}), 'reject')\ncheck('rollback contract', solve('rollback', {'before':[N,N+1],'working':[N+2],'failed':True}), [N,N+1])\ncheck('replace-kind contract', solve('replace-kind', {'old':{'id':N,'kind':'command','handler':'old'},'replacement':{'kind':'submenu','children':[N+1]}}), {'id':N,'kind':'submenu','children':[N+1]})\ncheck('revision-step contract', solve('revision-step', {'base':N,'committed':True,'operation_count':3}), N+1)\ncheck('unknown operation', solve('unknown', {}), {'error': 'unsupported menu operation'})\ncheck('failed patch retains revision',solve('revision-step',{'base':N,'committed':False,'operation_count':2}),N)\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":"4341cb1e599737923927c9d3369e6fa374b1b9fe48279893021dda6e66841324","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 == 'base':\n        return p['base']==p['revision']\n    if action == 'insert-after':\n        return p['rows'][:p['rows'].index(p['anchor'])+1]+[p['new']]+p['rows'][p['rows'].index(p['anchor'])+1:]\n    if action == 'missing-anchor':\n        return 'reject' if p['anchor'] not in p['rows'] else 'apply'\n    if action == 'rollback':\n        return p['before'] if p['failed'] else p['working']\n    if action == 'replace-kind':\n        return dict(p['replacement'],id=p['old']['id'])\n    if action == 'revision-step':\n        return p['base']+int(p['committed'])\n    return {'error': 'unsupported menu operation'}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('base contract', solve('base', {'base':N,'revision':N+1}), False)\ncheck('insert-after contract', solve('insert-after', {'rows':['a','b'],'anchor':'a','new':N}), ['a',N,'b'])\ncheck('missing-anchor contract', solve('missing-anchor', {'rows':[N],'anchor':N+1}), 'reject')\ncheck('rollback contract', solve('rollback', {'before':[N,N+1],'working':[N+2],'failed':True}), [N,N+1])\ncheck('replace-kind contract', solve('replace-kind', {'old':{'id':N,'kind':'command','handler':'old'},'replacement':{'kind':'submenu','children':[N+1]}}), {'id':N,'kind':'submenu','children':[N+1]})\ncheck('revision-step contract', solve('revision-step', {'base':N,'committed':True,'operation_count':3}), N+1)\ncheck('unknown operation', solve('unknown', {}), {'error': 'unsupported menu operation'})\ncheck('failed patch retains revision',solve('revision-step',{'base':N,'committed':False,'operation_count':2}),N)\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-patch-transaction-revision-step","generated_at":"2026-09-29T14:42:22.140589+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['base']+int(p['committed'])` at revision-step.","root_cause":"The menu-patch-transaction model applies `p['base']+1` at its revision-step operation instead of the stipulated transformation.","sha256":"ab6ae55da4ec239b0d0c2822e90d164fbc2d2a368012bcf46c5f2296837ce071","title":"Menu patch revision advances once per operation instead of commit · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":41.376,"exit_code":1,"observations":[{"actual":false,"check":"base contract","expected":false,"passed":true},{"actual":["a",1,"b"],"check":"insert-after contract","expected":["a",1,"b"],"passed":true},{"actual":"reject","check":"missing-anchor contract","expected":"reject","passed":true},{"actual":[1,2],"check":"rollback contract","expected":[1,2],"passed":true},{"actual":{"children":[2],"id":1,"kind":"submenu"},"check":"replace-kind contract","expected":{"children":[2],"id":1,"kind":"submenu"},"passed":true},{"actual":4,"check":"revision-step contract","expected":2,"passed":false},{"actual":{"error":"unsupported menu operation"},"check":"unknown operation","expected":{"error":"unsupported menu operation"},"passed":true},{"actual":3,"check":"failed patch retains revision","expected":1,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"base contract\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"insert-after contract\", \"actual\": [\"a\", 1, \"b\"], \"expected\": [\"a\", 1, \"b\"], \"passed\": true}, {\"check\": \"missing-anchor contract\", \"actual\": \"reject\", \"expected\": \"reject\", \"passed\": true}, {\"check\": \"rollback contract\", \"actual\": [1, 2], \"expected\": [1, 2], \"passed\": true}, {\"check\": \"replace-kind contract\", \"actual\": {\"kind\": \"submenu\", \"children\": [2], \"id\": 1}, \"expected\": {\"id\": 1, \"kind\": \"submenu\", \"children\": [2]}, \"passed\": true}, {\"check\": \"revision-step contract\", \"actual\": 4, \"expected\": 2, \"passed\": false}, {\"check\": \"unknown operation\", \"actual\": {\"error\": \"unsupported menu operation\"}, \"expected\": {\"error\": \"unsupported menu operation\"}, \"passed\": true}, {\"check\": \"failed patch retains revision\", \"actual\": 3, \"expected\": 1, \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.617,"exit_code":1,"observations":[{"actual":false,"check":"base contract","expected":false,"passed":true},{"actual":["a",1,"b"],"check":"insert-after contract","expected":["a",1,"b"],"passed":true},{"actual":"reject","check":"missing-anchor contract","expected":"reject","passed":true},{"actual":[1,2],"check":"rollback contract","expected":[1,2],"passed":true},{"actual":{"children":[2],"id":1,"kind":"submenu"},"check":"replace-kind contract","expected":{"children":[2],"id":1,"kind":"submenu"},"passed":true},{"actual":2,"check":"revision-step contract","expected":2,"passed":true},{"actual":{"error":"unsupported menu operation"},"check":"unknown operation","expected":{"error":"unsupported menu operation"},"passed":true},{"actual":2,"check":"failed patch retains revision","expected":1,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"base contract\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"insert-after contract\", \"actual\": [\"a\", 1, \"b\"], \"expected\": [\"a\", 1, \"b\"], \"passed\": true}, {\"check\": \"missing-anchor contract\", \"actual\": \"reject\", \"expected\": \"reject\", \"passed\": true}, {\"check\": \"rollback contract\", \"actual\": [1, 2], \"expected\": [1, 2], \"passed\": true}, {\"check\": \"replace-kind contract\", \"actual\": {\"kind\": \"submenu\", \"children\": [2], \"id\": 1}, \"expected\": {\"id\": 1, \"kind\": \"submenu\", \"children\": [2]}, \"passed\": true}, {\"check\": \"revision-step contract\", \"actual\": 2, \"expected\": 2, \"passed\": true}, {\"check\": \"unknown operation\", \"actual\": {\"error\": \"unsupported menu operation\"}, \"expected\": {\"error\": \"unsupported menu operation\"}, \"passed\": true}, {\"check\": \"failed patch retains revision\", \"actual\": 2, \"expected\": 1, \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":41.291,"exit_code":0,"observations":[{"actual":false,"check":"base contract","expected":false,"passed":true},{"actual":["a",1,"b"],"check":"insert-after contract","expected":["a",1,"b"],"passed":true},{"actual":"reject","check":"missing-anchor contract","expected":"reject","passed":true},{"actual":[1,2],"check":"rollback contract","expected":[1,2],"passed":true},{"actual":{"children":[2],"id":1,"kind":"submenu"},"check":"replace-kind contract","expected":{"children":[2],"id":1,"kind":"submenu"},"passed":true},{"actual":2,"check":"revision-step contract","expected":2,"passed":true},{"actual":{"error":"unsupported menu operation"},"check":"unknown operation","expected":{"error":"unsupported menu operation"},"passed":true},{"actual":1,"check":"failed patch retains revision","expected":1,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"base contract\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"insert-after contract\", \"actual\": [\"a\", 1, \"b\"], \"expected\": [\"a\", 1, \"b\"], \"passed\": true}, {\"check\": \"missing-anchor contract\", \"actual\": \"reject\", \"expected\": \"reject\", \"passed\": true}, {\"check\": \"rollback contract\", \"actual\": [1, 2], \"expected\": [1, 2], \"passed\": true}, {\"check\": \"replace-kind contract\", \"actual\": {\"kind\": \"submenu\", \"children\": [2], \"id\": 1}, \"expected\": {\"id\": 1, \"kind\": \"submenu\", \"children\": [2]}, \"passed\": true}, {\"check\": \"revision-step contract\", \"actual\": 2, \"expected\": 2, \"passed\": true}, {\"check\": \"unknown operation\", \"actual\": {\"error\": \"unsupported menu operation\"}, \"expected\": {\"error\": \"unsupported menu operation\"}, \"passed\": true}, {\"check\": \"failed patch retains revision\", \"actual\": 1, \"expected\": 1, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}