{"abstract":"Sibling reorder leaves accessibility snapshot order stale.","category":"Accessibility interaction semantics","checks":7,"contract":"Input [before,after] maps stable object ID to {role,name,parent,order}. Return delta operations in phases: removed IDs sorted lexical; added IDs sorted by after order then ID; common IDs sorted lexical get role-replace if role differs, otherwise name-set if name differs; parent/order changes append move even after role-replace. Removed values use old role, added records preserve complete new record, name-set preserves empty names. Same ID is never remove+add just for role changes. Return operations lists.","evaluation_group":"s3-accessibility-snapshot-delta","failed_approach":"The local repair substitutes old['parent'] != new['parent'] and old['order'] != new['order'] but still mishandles the regression fixtures.","family":"s3-accessibility-snapshot-delta-order-change","id":"FA-54331","implementations":{"attempt":{"sha256":"273ee04cdb0cc8f653eae6fcb83d26ef7feea1913690c626f2881aed1b2b10bb","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(data):\n    before,after = data\n    result = []\n    for ident in sorted(set(before)-set(after)): result.append(['remove',ident,before[ident]['role']])\n    for ident in sorted(set(after)-set(before),key=lambda x:(after[x]['order'],x)): result.append(['add',ident,after[ident]])\n    for ident in sorted(set(before)&set(after)):\n        old,new = before[ident],after[ident]\n        if old['role'] != new['role']: result.append(['replace-role',ident,new['role']])\n        elif old['name'] != new['name']: result.append(['set-name',ident,new['name']])\n        if old['parent'] != new['parent'] and old['order'] != new['order']: result.append(['move',ident,new['parent'],new['order']])\n    return result\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('contract fixture 1', solve([{'x':{'role':'image','name':'old','parent':'a','order':N}},{'x':{'role':'button','name':'new','parent':'b','order':N+1}}],), [['replace-role','x','button'],['move','x','b',N+1]])\ncheck('contract fixture 2', solve([{'x':{'role':'image','name':'old','parent':None,'order':0}},{'x':{'role':'image','name':'','parent':None,'order':0}}],), [['set-name','x','']])\ncheck('contract fixture 3', solve([{'z':{'role':'image','name':'Z','parent':None,'order':0},'a':{'role':'group','name':'A','parent':None,'order':1}},{}],), [['remove','a','group'],['remove','z','image']])\ncheck('contract fixture 4', solve([{}, {'z':{'role':'image','name':'Z','parent':None,'order':0},'a':{'role':'group','name':'A','parent':None,'order':1}}],), [['add','z',{'role':'image','name':'Z','parent':None,'order':0}],['add','a',{'role':'group','name':'A','parent':None,'order':1}]])\ncheck('contract fixture 5', solve([{'x':{'role':'image','name':'X','parent':'a','order':0}},{'x':{'role':'image','name':'X','parent':'a','order':N}}],), [['move','x','a',N]])\ncheck('contract fixture 6', solve([{'x':{'role':'image','name':'X','parent':'a','order':0}},{'x':{'role':'image','name':'X','parent':'b','order':0}}],), [['move','x','b',0]])\ncheck('contract fixture 7', solve([{},{}],), [])\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":"b95dee1a19d3dfd14d9ec3068967983bc2e25821c9703a4e16885735a881f2e7","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(data):\n    before,after = data\n    result = []\n    for ident in sorted(set(before)-set(after)): result.append(['remove',ident,before[ident]['role']])\n    for ident in sorted(set(after)-set(before),key=lambda x:(after[x]['order'],x)): result.append(['add',ident,after[ident]])\n    for ident in sorted(set(before)&set(after)):\n        old,new = before[ident],after[ident]\n        if old['role'] != new['role']: result.append(['replace-role',ident,new['role']])\n        elif old['name'] != new['name']: result.append(['set-name',ident,new['name']])\n        if old['parent'] != new['parent']: result.append(['move',ident,new['parent'],new['order']])\n    return result\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('contract fixture 1', solve([{'x':{'role':'image','name':'old','parent':'a','order':N}},{'x':{'role':'button','name':'new','parent':'b','order':N+1}}],), [['replace-role','x','button'],['move','x','b',N+1]])\ncheck('contract fixture 2', solve([{'x':{'role':'image','name':'old','parent':None,'order':0}},{'x':{'role':'image','name':'','parent':None,'order':0}}],), [['set-name','x','']])\ncheck('contract fixture 3', solve([{'z':{'role':'image','name':'Z','parent':None,'order':0},'a':{'role':'group','name':'A','parent':None,'order':1}},{}],), [['remove','a','group'],['remove','z','image']])\ncheck('contract fixture 4', solve([{}, {'z':{'role':'image','name':'Z','parent':None,'order':0},'a':{'role':'group','name':'A','parent':None,'order':1}}],), [['add','z',{'role':'image','name':'Z','parent':None,'order':0}],['add','a',{'role':'group','name':'A','parent':None,'order':1}]])\ncheck('contract fixture 5', solve([{'x':{'role':'image','name':'X','parent':'a','order':0}},{'x':{'role':'image','name':'X','parent':'a','order':N}}],), [['move','x','a',N]])\ncheck('contract fixture 6', solve([{'x':{'role':'image','name':'X','parent':'a','order':0}},{'x':{'role':'image','name':'X','parent':'b','order':0}}],), [['move','x','b',0]])\ncheck('contract fixture 7', solve([{},{}],), [])\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":"9354be8a55177f12917ccdb77fbde6bed5abc6e05a83b2081b5ca1d202d92629","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(data):\n    before,after = data\n    result = []\n    for ident in sorted(set(before)-set(after)): result.append(['remove',ident,before[ident]['role']])\n    for ident in sorted(set(after)-set(before),key=lambda x:(after[x]['order'],x)): result.append(['add',ident,after[ident]])\n    for ident in sorted(set(before)&set(after)):\n        old,new = before[ident],after[ident]\n        if old['role'] != new['role']: result.append(['replace-role',ident,new['role']])\n        elif old['name'] != new['name']: result.append(['set-name',ident,new['name']])\n        if old['parent'] != new['parent'] or old['order'] != new['order']: result.append(['move',ident,new['parent'],new['order']])\n    return result\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('contract fixture 1', solve([{'x':{'role':'image','name':'old','parent':'a','order':N}},{'x':{'role':'button','name':'new','parent':'b','order':N+1}}],), [['replace-role','x','button'],['move','x','b',N+1]])\ncheck('contract fixture 2', solve([{'x':{'role':'image','name':'old','parent':None,'order':0}},{'x':{'role':'image','name':'','parent':None,'order':0}}],), [['set-name','x','']])\ncheck('contract fixture 3', solve([{'z':{'role':'image','name':'Z','parent':None,'order':0},'a':{'role':'group','name':'A','parent':None,'order':1}},{}],), [['remove','a','group'],['remove','z','image']])\ncheck('contract fixture 4', solve([{}, {'z':{'role':'image','name':'Z','parent':None,'order':0},'a':{'role':'group','name':'A','parent':None,'order':1}}],), [['add','z',{'role':'image','name':'Z','parent':None,'order':0}],['add','a',{'role':'group','name':'A','parent':None,'order':1}]])\ncheck('contract fixture 5', solve([{'x':{'role':'image','name':'X','parent':'a','order':0}},{'x':{'role':'image','name':'X','parent':'a','order':N}}],), [['move','x','a',N]])\ncheck('contract fixture 6', solve([{'x':{'role':'image','name':'X','parent':'a','order':0}},{'x':{'role':'image','name':'X','parent':'b','order':0}}],), [['move','x','b',0]])\ncheck('contract fixture 7', solve([{},{}],), [])\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":"Stipulated finite adapter contract, not a claim of platform accessibility or ARIA 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-accessibility-snapshot-delta-order-change","generated_at":"2026-09-29T14:45:47.296735+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Offline accessibility bridge model with explicit policy; useful for testing semantic API adapters independently of browser implementations.","repair":"Apply the exact contract at the order change decision: old['parent'] != new['parent'] or old['order'] != new['order']","root_cause":"The order change decision in the snapshot delta adapter violates its declared contract.","sha256":"a599c3c1673369194a1d6fd600b2d36b4051f75cba60b21a0fbed7108e4ade4b","title":"Sibling reorder leaves accessibility snapshot order stale · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":46.053,"exit_code":1,"observations":[{"actual":[["replace-role","x","button"],["move","x","b",2]],"check":"contract fixture 1","expected":[["replace-role","x","button"],["move","x","b",2]],"passed":true},{"actual":[["set-name","x",""]],"check":"contract fixture 2","expected":[["set-name","x",""]],"passed":true},{"actual":[["remove","a","group"],["remove","z","image"]],"check":"contract fixture 3","expected":[["remove","a","group"],["remove","z","image"]],"passed":true},{"actual":[["add","z",{"name":"Z","order":0,"parent":null,"role":"image"}],["add","a",{"name":"A","order":1,"parent":null,"role":"group"}]],"check":"contract fixture 4","expected":[["add","z",{"name":"Z","order":0,"parent":null,"role":"image"}],["add","a",{"name":"A","order":1,"parent":null,"role":"group"}]],"passed":true},{"actual":[],"check":"contract fixture 5","expected":[["move","x","a",1]],"passed":false},{"actual":[],"check":"contract fixture 6","expected":[["move","x","b",0]],"passed":false},{"actual":[],"check":"contract fixture 7","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"contract fixture 1\", \"actual\": [[\"replace-role\", \"x\", \"button\"], [\"move\", \"x\", \"b\", 2]], \"expected\": [[\"replace-role\", \"x\", \"button\"], [\"move\", \"x\", \"b\", 2]], \"passed\": true}, {\"check\": \"contract fixture 2\", \"actual\": [[\"set-name\", \"x\", \"\"]], \"expected\": [[\"set-name\", \"x\", \"\"]], \"passed\": true}, {\"check\": \"contract fixture 3\", \"actual\": [[\"remove\", \"a\", \"group\"], [\"remove\", \"z\", \"image\"]], \"expected\": [[\"remove\", \"a\", \"group\"], [\"remove\", \"z\", \"image\"]], \"passed\": true}, {\"check\": \"contract fixture 4\", \"actual\": [[\"add\", \"z\", {\"role\": \"image\", \"name\": \"Z\", \"parent\": null, \"order\": 0}], [\"add\", \"a\", {\"role\": \"group\", \"name\": \"A\", \"parent\": null, \"order\": 1}]], \"expected\": [[\"add\", \"z\", {\"role\": \"image\", \"name\": \"Z\", \"parent\": null, \"order\": 0}], [\"add\", \"a\", {\"role\": \"group\", \"name\": \"A\", \"parent\": null, \"order\": 1}]], \"passed\": true}, {\"check\": \"contract fixture 5\", \"actual\": [], \"expected\": [[\"move\", \"x\", \"a\", 1]], \"passed\": false}, {\"check\": \"contract fixture 6\", \"actual\": [], \"expected\": [[\"move\", \"x\", \"b\", 0]], \"passed\": false}, {\"check\": \"contract fixture 7\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.466,"exit_code":1,"observations":[{"actual":[["replace-role","x","button"],["move","x","b",2]],"check":"contract fixture 1","expected":[["replace-role","x","button"],["move","x","b",2]],"passed":true},{"actual":[["set-name","x",""]],"check":"contract fixture 2","expected":[["set-name","x",""]],"passed":true},{"actual":[["remove","a","group"],["remove","z","image"]],"check":"contract fixture 3","expected":[["remove","a","group"],["remove","z","image"]],"passed":true},{"actual":[["add","z",{"name":"Z","order":0,"parent":null,"role":"image"}],["add","a",{"name":"A","order":1,"parent":null,"role":"group"}]],"check":"contract fixture 4","expected":[["add","z",{"name":"Z","order":0,"parent":null,"role":"image"}],["add","a",{"name":"A","order":1,"parent":null,"role":"group"}]],"passed":true},{"actual":[],"check":"contract fixture 5","expected":[["move","x","a",1]],"passed":false},{"actual":[["move","x","b",0]],"check":"contract fixture 6","expected":[["move","x","b",0]],"passed":true},{"actual":[],"check":"contract fixture 7","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"contract fixture 1\", \"actual\": [[\"replace-role\", \"x\", \"button\"], [\"move\", \"x\", \"b\", 2]], \"expected\": [[\"replace-role\", \"x\", \"button\"], [\"move\", \"x\", \"b\", 2]], \"passed\": true}, {\"check\": \"contract fixture 2\", \"actual\": [[\"set-name\", \"x\", \"\"]], \"expected\": [[\"set-name\", \"x\", \"\"]], \"passed\": true}, {\"check\": \"contract fixture 3\", \"actual\": [[\"remove\", \"a\", \"group\"], [\"remove\", \"z\", \"image\"]], \"expected\": [[\"remove\", \"a\", \"group\"], [\"remove\", \"z\", \"image\"]], \"passed\": true}, {\"check\": \"contract fixture 4\", \"actual\": [[\"add\", \"z\", {\"role\": \"image\", \"name\": \"Z\", \"parent\": null, \"order\": 0}], [\"add\", \"a\", {\"role\": \"group\", \"name\": \"A\", \"parent\": null, \"order\": 1}]], \"expected\": [[\"add\", \"z\", {\"role\": \"image\", \"name\": \"Z\", \"parent\": null, \"order\": 0}], [\"add\", \"a\", {\"role\": \"group\", \"name\": \"A\", \"parent\": null, \"order\": 1}]], \"passed\": true}, {\"check\": \"contract fixture 5\", \"actual\": [], \"expected\": [[\"move\", \"x\", \"a\", 1]], \"passed\": false}, {\"check\": \"contract fixture 6\", \"actual\": [[\"move\", \"x\", \"b\", 0]], \"expected\": [[\"move\", \"x\", \"b\", 0]], \"passed\": true}, {\"check\": \"contract fixture 7\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":44.201,"exit_code":0,"observations":[{"actual":[["replace-role","x","button"],["move","x","b",2]],"check":"contract fixture 1","expected":[["replace-role","x","button"],["move","x","b",2]],"passed":true},{"actual":[["set-name","x",""]],"check":"contract fixture 2","expected":[["set-name","x",""]],"passed":true},{"actual":[["remove","a","group"],["remove","z","image"]],"check":"contract fixture 3","expected":[["remove","a","group"],["remove","z","image"]],"passed":true},{"actual":[["add","z",{"name":"Z","order":0,"parent":null,"role":"image"}],["add","a",{"name":"A","order":1,"parent":null,"role":"group"}]],"check":"contract fixture 4","expected":[["add","z",{"name":"Z","order":0,"parent":null,"role":"image"}],["add","a",{"name":"A","order":1,"parent":null,"role":"group"}]],"passed":true},{"actual":[["move","x","a",1]],"check":"contract fixture 5","expected":[["move","x","a",1]],"passed":true},{"actual":[["move","x","b",0]],"check":"contract fixture 6","expected":[["move","x","b",0]],"passed":true},{"actual":[],"check":"contract fixture 7","expected":[],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"contract fixture 1\", \"actual\": [[\"replace-role\", \"x\", \"button\"], [\"move\", \"x\", \"b\", 2]], \"expected\": [[\"replace-role\", \"x\", \"button\"], [\"move\", \"x\", \"b\", 2]], \"passed\": true}, {\"check\": \"contract fixture 2\", \"actual\": [[\"set-name\", \"x\", \"\"]], \"expected\": [[\"set-name\", \"x\", \"\"]], \"passed\": true}, {\"check\": \"contract fixture 3\", \"actual\": [[\"remove\", \"a\", \"group\"], [\"remove\", \"z\", \"image\"]], \"expected\": [[\"remove\", \"a\", \"group\"], [\"remove\", \"z\", \"image\"]], \"passed\": true}, {\"check\": \"contract fixture 4\", \"actual\": [[\"add\", \"z\", {\"role\": \"image\", \"name\": \"Z\", \"parent\": null, \"order\": 0}], [\"add\", \"a\", {\"role\": \"group\", \"name\": \"A\", \"parent\": null, \"order\": 1}]], \"expected\": [[\"add\", \"z\", {\"role\": \"image\", \"name\": \"Z\", \"parent\": null, \"order\": 0}], [\"add\", \"a\", {\"role\": \"group\", \"name\": \"A\", \"parent\": null, \"order\": 1}]], \"passed\": true}, {\"check\": \"contract fixture 5\", \"actual\": [[\"move\", \"x\", \"a\", 1]], \"expected\": [[\"move\", \"x\", \"a\", 1]], \"passed\": true}, {\"check\": \"contract fixture 6\", \"actual\": [[\"move\", \"x\", \"b\", 0]], \"expected\": [[\"move\", \"x\", \"b\", 0]], \"passed\": true}, {\"check\": \"contract fixture 7\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}