{"abstract":"Hyperlink indices follow backend delivery order.","category":"Accessibility interaction semantics","checks":6,"contract":"Input [text_length,links,offset] where links [id,start,end,url,enabled]. Admit only nonempty URL, enabled and nonempty interval after clamping. Sort by start then shorter interval then input order; dedupe IDs after sorting. Query offset resolves the first matching half-open span, or None. Return [ordered descriptors,hit_id]. URLs remain exact including fragments; IDs are retained even when URL is shared.","evaluation_group":"s3-accessibility-hyperlink-spans","failed_approach":"The local repair substitutes valid.sort(key=lambda x:(x[0],x[2])) but still mishandles the regression fixtures.","family":"s3-accessibility-hyperlink-spans-link-order","id":"FA-53881","implementations":{"attempt":{"sha256":"add3123d874820902a9056fd0cc6d88ea858352b8f2bc6153c690c930d956824","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(data):\n    length,links,offset = data\n    valid = []\n    for i,(ident,start,end,url,enabled) in enumerate(links):\n        if not enabled or not url: continue\n        start,end = max(0,start),min(length,end)\n        if start >= end: continue\n        valid.append((start,end-start,i,ident,end,url))\n    valid.sort(key=lambda x:(x[0],x[2]))\n    seen = set()\n    rows = []\n    for start,width,i,ident,end,url in valid:\n        if ident in seen: continue\n        seen.add(ident)\n        rows.append([ident,start,end,url])\n    hit = next((ident for ident,start,end,url in rows if start <= offset < end),None)\n    return [rows,hit]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('contract fixture 1', solve([N+5,[['wide',N,N+4,'/a#x',True],['small',N,N+2,'/a#y',True]],N+1],), [[['small',N,N+2,'/a#y'],['wide',N,N+4,'/a#x']],'small'])\ncheck('contract fixture 2', solve([5,[['a',-3,2,'/a',True],['b',2,8,'/b',True]],2],), [[['a',0,2,'/a'],['b',2,5,'/b']],'b'])\ncheck('contract fixture 3', solve([5,[['a',1,1,'/a',True],['b',4,2,'/b',True],['c',0,3,'',True],['d',0,3,'/d',False]],0],), [[],None])\ncheck('contract fixture 4', solve([6,[['a',3,6,'later',True],['a',0,2,'early',True]],1],), [[['a',0,2,'early']],'a'])\ncheck('contract fixture 5', solve([3,[['a',0,3,'/same',True],['b',0,3,'/same',True]],3],), [[['a',0,3,'/same'],['b',0,3,'/same']],None])\ncheck('contract fixture 6', solve([0,[],0],), [[],None])\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":"f0713454528e99330ab898391aa201afdfefcf17d1529a85c59d83451579b8aa","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(data):\n    length,links,offset = data\n    valid = []\n    for i,(ident,start,end,url,enabled) in enumerate(links):\n        if not enabled or not url: continue\n        start,end = max(0,start),min(length,end)\n        if start >= end: continue\n        valid.append((start,end-start,i,ident,end,url))\n    valid.sort(key=lambda x:x[2])\n    seen = set()\n    rows = []\n    for start,width,i,ident,end,url in valid:\n        if ident in seen: continue\n        seen.add(ident)\n        rows.append([ident,start,end,url])\n    hit = next((ident for ident,start,end,url in rows if start <= offset < end),None)\n    return [rows,hit]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('contract fixture 1', solve([N+5,[['wide',N,N+4,'/a#x',True],['small',N,N+2,'/a#y',True]],N+1],), [[['small',N,N+2,'/a#y'],['wide',N,N+4,'/a#x']],'small'])\ncheck('contract fixture 2', solve([5,[['a',-3,2,'/a',True],['b',2,8,'/b',True]],2],), [[['a',0,2,'/a'],['b',2,5,'/b']],'b'])\ncheck('contract fixture 3', solve([5,[['a',1,1,'/a',True],['b',4,2,'/b',True],['c',0,3,'',True],['d',0,3,'/d',False]],0],), [[],None])\ncheck('contract fixture 4', solve([6,[['a',3,6,'later',True],['a',0,2,'early',True]],1],), [[['a',0,2,'early']],'a'])\ncheck('contract fixture 5', solve([3,[['a',0,3,'/same',True],['b',0,3,'/same',True]],3],), [[['a',0,3,'/same'],['b',0,3,'/same']],None])\ncheck('contract fixture 6', solve([0,[],0],), [[],None])\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":"f4654d835f55847af12997f87b94c7f2e1def26a29178e6b84b9e32d343f7cde","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(data):\n    length,links,offset = data\n    valid = []\n    for i,(ident,start,end,url,enabled) in enumerate(links):\n        if not enabled or not url: continue\n        start,end = max(0,start),min(length,end)\n        if start >= end: continue\n        valid.append((start,end-start,i,ident,end,url))\n    valid.sort(key=lambda x:(x[0],x[1],x[2]))\n    seen = set()\n    rows = []\n    for start,width,i,ident,end,url in valid:\n        if ident in seen: continue\n        seen.add(ident)\n        rows.append([ident,start,end,url])\n    hit = next((ident for ident,start,end,url in rows if start <= offset < end),None)\n    return [rows,hit]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('contract fixture 1', solve([N+5,[['wide',N,N+4,'/a#x',True],['small',N,N+2,'/a#y',True]],N+1],), [[['small',N,N+2,'/a#y'],['wide',N,N+4,'/a#x']],'small'])\ncheck('contract fixture 2', solve([5,[['a',-3,2,'/a',True],['b',2,8,'/b',True]],2],), [[['a',0,2,'/a'],['b',2,5,'/b']],'b'])\ncheck('contract fixture 3', solve([5,[['a',1,1,'/a',True],['b',4,2,'/b',True],['c',0,3,'',True],['d',0,3,'/d',False]],0],), [[],None])\ncheck('contract fixture 4', solve([6,[['a',3,6,'later',True],['a',0,2,'early',True]],1],), [[['a',0,2,'early']],'a'])\ncheck('contract fixture 5', solve([3,[['a',0,3,'/same',True],['b',0,3,'/same',True]],3],), [[['a',0,3,'/same'],['b',0,3,'/same']],None])\ncheck('contract fixture 6', solve([0,[],0],), [[],None])\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-hyperlink-spans-link-order","generated_at":"2026-09-29T14:45:43.188990+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 link order decision: valid.sort(key=lambda x:(x[0],x[1],x[2]))","root_cause":"The link order decision in the hyperlink spans adapter violates its declared contract.","sha256":"c6c089376fad95fe09b6ffe98a5e5cb294b3746be78f12f39da7c5273d50f842","title":"Hyperlink indices follow backend delivery order · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":40.745,"exit_code":1,"observations":[{"actual":[[["wide",1,5,"/a#x"],["small",1,3,"/a#y"]],"wide"],"check":"contract fixture 1","expected":[[["small",1,3,"/a#y"],["wide",1,5,"/a#x"]],"small"],"passed":false},{"actual":[[["a",0,2,"/a"],["b",2,5,"/b"]],"b"],"check":"contract fixture 2","expected":[[["a",0,2,"/a"],["b",2,5,"/b"]],"b"],"passed":true},{"actual":[[],null],"check":"contract fixture 3","expected":[[],null],"passed":true},{"actual":[[["a",0,2,"early"]],"a"],"check":"contract fixture 4","expected":[[["a",0,2,"early"]],"a"],"passed":true},{"actual":[[["a",0,3,"/same"],["b",0,3,"/same"]],null],"check":"contract fixture 5","expected":[[["a",0,3,"/same"],["b",0,3,"/same"]],null],"passed":true},{"actual":[[],null],"check":"contract fixture 6","expected":[[],null],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"contract fixture 1\", \"actual\": [[[\"wide\", 1, 5, \"/a#x\"], [\"small\", 1, 3, \"/a#y\"]], \"wide\"], \"expected\": [[[\"small\", 1, 3, \"/a#y\"], [\"wide\", 1, 5, \"/a#x\"]], \"small\"], \"passed\": false}, {\"check\": \"contract fixture 2\", \"actual\": [[[\"a\", 0, 2, \"/a\"], [\"b\", 2, 5, \"/b\"]], \"b\"], \"expected\": [[[\"a\", 0, 2, \"/a\"], [\"b\", 2, 5, \"/b\"]], \"b\"], \"passed\": true}, {\"check\": \"contract fixture 3\", \"actual\": [[], null], \"expected\": [[], null], \"passed\": true}, {\"check\": \"contract fixture 4\", \"actual\": [[[\"a\", 0, 2, \"early\"]], \"a\"], \"expected\": [[[\"a\", 0, 2, \"early\"]], \"a\"], \"passed\": true}, {\"check\": \"contract fixture 5\", \"actual\": [[[\"a\", 0, 3, \"/same\"], [\"b\", 0, 3, \"/same\"]], null], \"expected\": [[[\"a\", 0, 3, \"/same\"], [\"b\", 0, 3, \"/same\"]], null], \"passed\": true}, {\"check\": \"contract fixture 6\", \"actual\": [[], null], \"expected\": [[], null], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.408,"exit_code":1,"observations":[{"actual":[[["wide",1,5,"/a#x"],["small",1,3,"/a#y"]],"wide"],"check":"contract fixture 1","expected":[[["small",1,3,"/a#y"],["wide",1,5,"/a#x"]],"small"],"passed":false},{"actual":[[["a",0,2,"/a"],["b",2,5,"/b"]],"b"],"check":"contract fixture 2","expected":[[["a",0,2,"/a"],["b",2,5,"/b"]],"b"],"passed":true},{"actual":[[],null],"check":"contract fixture 3","expected":[[],null],"passed":true},{"actual":[[["a",3,6,"later"]],null],"check":"contract fixture 4","expected":[[["a",0,2,"early"]],"a"],"passed":false},{"actual":[[["a",0,3,"/same"],["b",0,3,"/same"]],null],"check":"contract fixture 5","expected":[[["a",0,3,"/same"],["b",0,3,"/same"]],null],"passed":true},{"actual":[[],null],"check":"contract fixture 6","expected":[[],null],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"contract fixture 1\", \"actual\": [[[\"wide\", 1, 5, \"/a#x\"], [\"small\", 1, 3, \"/a#y\"]], \"wide\"], \"expected\": [[[\"small\", 1, 3, \"/a#y\"], [\"wide\", 1, 5, \"/a#x\"]], \"small\"], \"passed\": false}, {\"check\": \"contract fixture 2\", \"actual\": [[[\"a\", 0, 2, \"/a\"], [\"b\", 2, 5, \"/b\"]], \"b\"], \"expected\": [[[\"a\", 0, 2, \"/a\"], [\"b\", 2, 5, \"/b\"]], \"b\"], \"passed\": true}, {\"check\": \"contract fixture 3\", \"actual\": [[], null], \"expected\": [[], null], \"passed\": true}, {\"check\": \"contract fixture 4\", \"actual\": [[[\"a\", 3, 6, \"later\"]], null], \"expected\": [[[\"a\", 0, 2, \"early\"]], \"a\"], \"passed\": false}, {\"check\": \"contract fixture 5\", \"actual\": [[[\"a\", 0, 3, \"/same\"], [\"b\", 0, 3, \"/same\"]], null], \"expected\": [[[\"a\", 0, 3, \"/same\"], [\"b\", 0, 3, \"/same\"]], null], \"passed\": true}, {\"check\": \"contract fixture 6\", \"actual\": [[], null], \"expected\": [[], null], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":41.69,"exit_code":0,"observations":[{"actual":[[["small",1,3,"/a#y"],["wide",1,5,"/a#x"]],"small"],"check":"contract fixture 1","expected":[[["small",1,3,"/a#y"],["wide",1,5,"/a#x"]],"small"],"passed":true},{"actual":[[["a",0,2,"/a"],["b",2,5,"/b"]],"b"],"check":"contract fixture 2","expected":[[["a",0,2,"/a"],["b",2,5,"/b"]],"b"],"passed":true},{"actual":[[],null],"check":"contract fixture 3","expected":[[],null],"passed":true},{"actual":[[["a",0,2,"early"]],"a"],"check":"contract fixture 4","expected":[[["a",0,2,"early"]],"a"],"passed":true},{"actual":[[["a",0,3,"/same"],["b",0,3,"/same"]],null],"check":"contract fixture 5","expected":[[["a",0,3,"/same"],["b",0,3,"/same"]],null],"passed":true},{"actual":[[],null],"check":"contract fixture 6","expected":[[],null],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"contract fixture 1\", \"actual\": [[[\"small\", 1, 3, \"/a#y\"], [\"wide\", 1, 5, \"/a#x\"]], \"small\"], \"expected\": [[[\"small\", 1, 3, \"/a#y\"], [\"wide\", 1, 5, \"/a#x\"]], \"small\"], \"passed\": true}, {\"check\": \"contract fixture 2\", \"actual\": [[[\"a\", 0, 2, \"/a\"], [\"b\", 2, 5, \"/b\"]], \"b\"], \"expected\": [[[\"a\", 0, 2, \"/a\"], [\"b\", 2, 5, \"/b\"]], \"b\"], \"passed\": true}, {\"check\": \"contract fixture 3\", \"actual\": [[], null], \"expected\": [[], null], \"passed\": true}, {\"check\": \"contract fixture 4\", \"actual\": [[[\"a\", 0, 2, \"early\"]], \"a\"], \"expected\": [[[\"a\", 0, 2, \"early\"]], \"a\"], \"passed\": true}, {\"check\": \"contract fixture 5\", \"actual\": [[[\"a\", 0, 3, \"/same\"], [\"b\", 0, 3, \"/same\"]], null], \"expected\": [[[\"a\", 0, 3, \"/same\"], [\"b\", 0, 3, \"/same\"]], null], \"passed\": true}, {\"check\": \"contract fixture 6\", \"actual\": [[], null], \"expected\": [[], null], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}