{"abstract":"Menu refresh pins a submenu to the old row index.","category":"Menu interactions","checks":7,"contract":"Refreshing an open menu reconciles immutable command IDs, provider revisions and annotations without confusing display positions with identity.","contract_signature":"action, p","evaluation_group":"s3-menu-interactions-menu-snapshot-refresh","failed_approach":"The attempted repair `0` still violates the anchor-id oracle.","family":"s3-menu-interactions-menu-snapshot-refresh-anchor-id","id":"FA-32876","implementations":{"attempt":{"sha256":"31750528160c35b2946887b9ceeec9195f16c3aae2d92524c8dc17344241abc7","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 == 'retain-live':\n        return [x for x in p['old'] if x in p['new']]\n    if action == 'new-order':\n        return [x for x in p['new'] if x in p['old']]\n    if action == 'annotation':\n        return {x:p['annotations'][x] for x in p['new'] if x in p['annotations']}\n    if action == 'provider-version':\n        return p['incoming']>p['current']\n    if action == 'path-valid':\n        return all(x in p['parents'] and p['parents'][x]==y for y,x in zip(p['chain'],p['chain'][1:]))\n    if action == 'anchor-id':\n        return 0\n    return {'error': 'unsupported menu operation'}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('retain-live contract', solve('retain-live', {'old':[N,N+1],'new':[N+1,N+2]}), [N+1])\ncheck('new-order contract', solve('new-order', {'old':[N,N+1],'new':[N+1,N]}), [N+1,N])\ncheck('annotation contract', solve('annotation', {'new':['a'],'annotations':{'a':N,'gone':N+1}}), {'a':N})\ncheck('provider-version contract', solve('provider-version', {'incoming':N,'current':N}), False)\ncheck('path-valid contract', solve('path-valid', {'chain':['r','a',str(N)],'parents':{'a':'r',str(N):'other'}}), False)\ncheck('anchor-id contract', solve('anchor-id', {'rows':['x','y','owner'+str(N)],'owner':'owner'+str(N),'old_index':1}), 2)\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":"05bbcced685d8278c40f22de7c52dbaf5798b3fa33ae6bf1aff5cfe2ad2c0bbb","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 == 'retain-live':\n        return [x for x in p['old'] if x in p['new']]\n    if action == 'new-order':\n        return [x for x in p['new'] if x in p['old']]\n    if action == 'annotation':\n        return {x:p['annotations'][x] for x in p['new'] if x in p['annotations']}\n    if action == 'provider-version':\n        return p['incoming']>p['current']\n    if action == 'path-valid':\n        return all(x in p['parents'] and p['parents'][x]==y for y,x in zip(p['chain'],p['chain'][1:]))\n    if action == 'anchor-id':\n        return p['old_index']\n    return {'error': 'unsupported menu operation'}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('retain-live contract', solve('retain-live', {'old':[N,N+1],'new':[N+1,N+2]}), [N+1])\ncheck('new-order contract', solve('new-order', {'old':[N,N+1],'new':[N+1,N]}), [N+1,N])\ncheck('annotation contract', solve('annotation', {'new':['a'],'annotations':{'a':N,'gone':N+1}}), {'a':N})\ncheck('provider-version contract', solve('provider-version', {'incoming':N,'current':N}), False)\ncheck('path-valid contract', solve('path-valid', {'chain':['r','a',str(N)],'parents':{'a':'r',str(N):'other'}}), False)\ncheck('anchor-id contract', solve('anchor-id', {'rows':['x','y','owner'+str(N)],'owner':'owner'+str(N),'old_index':1}), 2)\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-snapshot-refresh-anchor-id","generated_at":"2026-09-29T14:42:16.735334+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.","root_cause":"The menu-snapshot-refresh model applies `p['old_index']` at its anchor-id operation instead of the stipulated transformation.","sha256":"63de4abe5e77fdc4feefd14d1477cfef411c90bd85ebfc4a2f246dd5c3813906","title":"Menu refresh pins a submenu to the old row index · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":49.023,"exit_code":1,"observations":[{"actual":[2],"check":"retain-live contract","expected":[2],"passed":true},{"actual":[2,1],"check":"new-order contract","expected":[2,1],"passed":true},{"actual":{"a":1},"check":"annotation contract","expected":{"a":1},"passed":true},{"actual":false,"check":"provider-version contract","expected":false,"passed":true},{"actual":false,"check":"path-valid contract","expected":false,"passed":true},{"actual":0,"check":"anchor-id contract","expected":2,"passed":false},{"actual":{"error":"unsupported menu operation"},"check":"unknown operation","expected":{"error":"unsupported menu operation"},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"retain-live contract\", \"actual\": [2], \"expected\": [2], \"passed\": true}, {\"check\": \"new-order contract\", \"actual\": [2, 1], \"expected\": [2, 1], \"passed\": true}, {\"check\": \"annotation contract\", \"actual\": {\"a\": 1}, \"expected\": {\"a\": 1}, \"passed\": true}, {\"check\": \"provider-version contract\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"path-valid contract\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"anchor-id contract\", \"actual\": 0, \"expected\": 2, \"passed\": false}, {\"check\": \"unknown operation\", \"actual\": {\"error\": \"unsupported menu operation\"}, \"expected\": {\"error\": \"unsupported menu operation\"}, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":44.85,"exit_code":1,"observations":[{"actual":[2],"check":"retain-live contract","expected":[2],"passed":true},{"actual":[2,1],"check":"new-order contract","expected":[2,1],"passed":true},{"actual":{"a":1},"check":"annotation contract","expected":{"a":1},"passed":true},{"actual":false,"check":"provider-version contract","expected":false,"passed":true},{"actual":false,"check":"path-valid contract","expected":false,"passed":true},{"actual":1,"check":"anchor-id contract","expected":2,"passed":false},{"actual":{"error":"unsupported menu operation"},"check":"unknown operation","expected":{"error":"unsupported menu operation"},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"retain-live contract\", \"actual\": [2], \"expected\": [2], \"passed\": true}, {\"check\": \"new-order contract\", \"actual\": [2, 1], \"expected\": [2, 1], \"passed\": true}, {\"check\": \"annotation contract\", \"actual\": {\"a\": 1}, \"expected\": {\"a\": 1}, \"passed\": true}, {\"check\": \"provider-version contract\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"path-valid contract\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"anchor-id contract\", \"actual\": 1, \"expected\": 2, \"passed\": false}, {\"check\": \"unknown operation\", \"actual\": {\"error\": \"unsupported menu operation\"}, \"expected\": {\"error\": \"unsupported menu operation\"}, \"passed\": true}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}