{"abstract":"Sequential anchor insertion reverses contributed menu rows.","category":"Menu interactions","checks":7,"contract":"Menu contribution placement uses named before/after anchors and stable fallback slots; the before anchor owns precedence when both are supplied.","contract_signature":"action, p","evaluation_group":"s3-menu-interactions-contribution-anchors","failed_approach":"The attempted repair `p['batch']+p['rows']` still violates the batch-order oracle.","family":"s3-menu-interactions-contribution-anchors-batch-order","id":"FA-33441","implementations":{"attempt":{"sha256":"5b0e07fe8167128ca731498f817bc0128dc2d2f50dd4849851f36c2df29662c5","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 == 'before':\n        return p['rows'][:p['rows'].index(p['anchor'])]+[p['id']]+p['rows'][p['rows'].index(p['anchor']):]\n    if action == 'fallback-slot':\n        return p['slots'].get(p['requested'],p['slots']['default'])\n    if action == 'anchor-owner':\n        return (p['provider'],p['local'])\n    if action == 'before-precedence':\n        return p['before'] if p['before'] is not None else p['after']\n    if action == 'batch-order':\n        return p['batch']+p['rows']\n    if action == 'self-anchor':\n        return p['id']!=p['anchor']\n    return {'error': 'unsupported menu operation'}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('before contract', solve('before', {'rows':['a','b'],'anchor':'b','id':N}), ['a',N,'b'])\ncheck('fallback-slot contract', solve('fallback-slot', {'requested':'missing','slots':{'default':N+4,'start':0}}), N+4)\ncheck('anchor-owner contract', solve('anchor-owner', {'provider':'p'+str(N),'local':'tools'}), ('p'+str(N),'tools'))\ncheck('before-precedence contract', solve('before-precedence', {'before':N,'after':N+1}), N)\ncheck('batch-order contract', solve('batch-order', {'rows':['a','b'],'at':1,'batch':[N,N+1]}), ['a',N,N+1,'b'])\ncheck('self-anchor contract', solve('self-anchor', {'id':N,'anchor':N,'registered':[N]}), 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":"20aca6739d789ae0ed2cc3a97f2c3733d5e5e858befe08e37bfa9bbf660be2ea","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 == 'before':\n        return p['rows'][:p['rows'].index(p['anchor'])]+[p['id']]+p['rows'][p['rows'].index(p['anchor']):]\n    if action == 'fallback-slot':\n        return p['slots'].get(p['requested'],p['slots']['default'])\n    if action == 'anchor-owner':\n        return (p['provider'],p['local'])\n    if action == 'before-precedence':\n        return p['before'] if p['before'] is not None else p['after']\n    if action == 'batch-order':\n        return p['rows'][:p['at']]+list(reversed(p['batch']))+p['rows'][p['at']:]\n    if action == 'self-anchor':\n        return p['id']!=p['anchor']\n    return {'error': 'unsupported menu operation'}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('before contract', solve('before', {'rows':['a','b'],'anchor':'b','id':N}), ['a',N,'b'])\ncheck('fallback-slot contract', solve('fallback-slot', {'requested':'missing','slots':{'default':N+4,'start':0}}), N+4)\ncheck('anchor-owner contract', solve('anchor-owner', {'provider':'p'+str(N),'local':'tools'}), ('p'+str(N),'tools'))\ncheck('before-precedence contract', solve('before-precedence', {'before':N,'after':N+1}), N)\ncheck('batch-order contract', solve('batch-order', {'rows':['a','b'],'at':1,'batch':[N,N+1]}), ['a',N,N+1,'b'])\ncheck('self-anchor contract', solve('self-anchor', {'id':N,'anchor':N,'registered':[N]}), 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-contribution-anchors-batch-order","generated_at":"2026-09-29T14:42:22.428332+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 contribution-anchors model applies `p['rows'][:p['at']]+list(reversed(p['batch']))+p['rows'][p['at']:]` at its batch-order operation instead of the stipulated transformation.","sha256":"3b9a3d1bd51b94147c9c5b17a0657c29b257018735424ce05794b450a67148e3","title":"Sequential anchor insertion reverses contributed menu rows · 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":38.868,"exit_code":1,"observations":[{"actual":["a",1,"b"],"check":"before contract","expected":["a",1,"b"],"passed":true},{"actual":5,"check":"fallback-slot contract","expected":5,"passed":true},{"actual":["p1","tools"],"check":"anchor-owner contract","expected":["p1","tools"],"passed":true},{"actual":1,"check":"before-precedence contract","expected":1,"passed":true},{"actual":[1,2,"a","b"],"check":"batch-order contract","expected":["a",1,2,"b"],"passed":false},{"actual":false,"check":"self-anchor contract","expected":false,"passed":true},{"actual":{"error":"unsupported menu operation"},"check":"unknown operation","expected":{"error":"unsupported menu operation"},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"before contract\", \"actual\": [\"a\", 1, \"b\"], \"expected\": [\"a\", 1, \"b\"], \"passed\": true}, {\"check\": \"fallback-slot contract\", \"actual\": 5, \"expected\": 5, \"passed\": true}, {\"check\": \"anchor-owner contract\", \"actual\": [\"p1\", \"tools\"], \"expected\": [\"p1\", \"tools\"], \"passed\": true}, {\"check\": \"before-precedence contract\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"batch-order contract\", \"actual\": [1, 2, \"a\", \"b\"], \"expected\": [\"a\", 1, 2, \"b\"], \"passed\": false}, {\"check\": \"self-anchor contract\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"unknown operation\", \"actual\": {\"error\": \"unsupported menu operation\"}, \"expected\": {\"error\": \"unsupported menu operation\"}, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.529,"exit_code":1,"observations":[{"actual":["a",1,"b"],"check":"before contract","expected":["a",1,"b"],"passed":true},{"actual":5,"check":"fallback-slot contract","expected":5,"passed":true},{"actual":["p1","tools"],"check":"anchor-owner contract","expected":["p1","tools"],"passed":true},{"actual":1,"check":"before-precedence contract","expected":1,"passed":true},{"actual":["a",2,1,"b"],"check":"batch-order contract","expected":["a",1,2,"b"],"passed":false},{"actual":false,"check":"self-anchor contract","expected":false,"passed":true},{"actual":{"error":"unsupported menu operation"},"check":"unknown operation","expected":{"error":"unsupported menu operation"},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"before contract\", \"actual\": [\"a\", 1, \"b\"], \"expected\": [\"a\", 1, \"b\"], \"passed\": true}, {\"check\": \"fallback-slot contract\", \"actual\": 5, \"expected\": 5, \"passed\": true}, {\"check\": \"anchor-owner contract\", \"actual\": [\"p1\", \"tools\"], \"expected\": [\"p1\", \"tools\"], \"passed\": true}, {\"check\": \"before-precedence contract\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"batch-order contract\", \"actual\": [\"a\", 2, 1, \"b\"], \"expected\": [\"a\", 1, 2, \"b\"], \"passed\": false}, {\"check\": \"self-anchor contract\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"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."}}