{"abstract":"Annotation queries ignore the requested type mask.","category":"Accessibility interaction semantics","checks":7,"contract":"Input [length,annotations,types] annotations [id,start,end,kind,detail,resolved]. Admit allowed types and unresolved annotations with nonempty detail. Clamp half-open ranges, discard empty or reversed. Preserve overlapping annotations; dedupe same ID by first eligible record. Output sorted by start,end,ID. Return [id,start,end,kind,detail]. Spelling, grammar, comment are the only recognized kinds even if types requests unknown types.","evaluation_group":"s3-accessibility-annotation-ranges","failed_approach":"The local repair substitutes or not types but still mishandles the regression fixtures.","family":"s3-accessibility-annotation-ranges-requested-types","id":"FA-54161","implementations":{"attempt":{"sha256":"1b45b234316e2e0c517271b7c6a0b3385a8aecec84aae85e1b9fd8f6eda03af1","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(data):\n    length,annotations,types = data\n    seen = set()\n    result = []\n    for ident,start,end,kind,detail,resolved in annotations:\n        if kind not in {'spelling','grammar','comment'} or not types: continue\n        if resolved or not detail: continue\n        start,end = max(0,start),min(length,end)\n        if start >= end or ident in seen: continue\n        seen.add(ident)\n        result.append([ident,start,end,kind,detail])\n    return sorted(result,key=lambda row:(row[1],row[2],row[0]))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('contract fixture 1', solve([N+5,[['b',N,N+3,'comment','B',False],['a',N,N+2,'spelling','A',False],['c',N,N+2,'grammar','C',False]],['comment','spelling','grammar']],), [['a',N,N+2,'spelling','A'],['c',N,N+2,'grammar','C'],['b',N,N+3,'comment','B']])\ncheck('contract fixture 2', solve([4,[['a',-2,2,'comment','A',False],['b',2,8,'comment','B',False]],['comment']],), [['a',0,2,'comment','A'],['b',2,4,'comment','B']])\ncheck('contract fixture 3', solve([4,[['a',0,2,'comment','A',True],['b',0,2,'spelling','B',False],['c',0,2,'unknown','C',False],['d',0,2,'comment','',False]],['comment','unknown']],), [])\ncheck('contract fixture 4', solve([4,[['a',0,0,'comment','zero',False],['b',3,1,'comment','reverse',False]],['comment']],), [])\ncheck('contract fixture 5', solve([4,[['a',2,3,'comment','first',False],['a',0,1,'comment','later',False]],['comment']],), [['a',2,3,'comment','first']])\ncheck('contract fixture 6', solve([4,[['a',0,2,'comment','resolved',True],['a',1,3,'comment','live',False]],['comment']],), [['a',1,3,'comment','live']])\ncheck('contract fixture 7', solve([0,[],[]],), [])\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":"cb2002b44c9e9538ba92f34f77d4712850e8ac31e2739d6854d3d8c9780ab356","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(data):\n    length,annotations,types = data\n    seen = set()\n    result = []\n    for ident,start,end,kind,detail,resolved in annotations:\n        if kind not in {'spelling','grammar','comment'} : continue\n        if resolved or not detail: continue\n        start,end = max(0,start),min(length,end)\n        if start >= end or ident in seen: continue\n        seen.add(ident)\n        result.append([ident,start,end,kind,detail])\n    return sorted(result,key=lambda row:(row[1],row[2],row[0]))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('contract fixture 1', solve([N+5,[['b',N,N+3,'comment','B',False],['a',N,N+2,'spelling','A',False],['c',N,N+2,'grammar','C',False]],['comment','spelling','grammar']],), [['a',N,N+2,'spelling','A'],['c',N,N+2,'grammar','C'],['b',N,N+3,'comment','B']])\ncheck('contract fixture 2', solve([4,[['a',-2,2,'comment','A',False],['b',2,8,'comment','B',False]],['comment']],), [['a',0,2,'comment','A'],['b',2,4,'comment','B']])\ncheck('contract fixture 3', solve([4,[['a',0,2,'comment','A',True],['b',0,2,'spelling','B',False],['c',0,2,'unknown','C',False],['d',0,2,'comment','',False]],['comment','unknown']],), [])\ncheck('contract fixture 4', solve([4,[['a',0,0,'comment','zero',False],['b',3,1,'comment','reverse',False]],['comment']],), [])\ncheck('contract fixture 5', solve([4,[['a',2,3,'comment','first',False],['a',0,1,'comment','later',False]],['comment']],), [['a',2,3,'comment','first']])\ncheck('contract fixture 6', solve([4,[['a',0,2,'comment','resolved',True],['a',1,3,'comment','live',False]],['comment']],), [['a',1,3,'comment','live']])\ncheck('contract fixture 7', solve([0,[],[]],), [])\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":"39109e157ea14e2f5b0807fb3b8e6c50af9a6caf8a6cb9f64f2daa8f2be3f1f0","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(data):\n    length,annotations,types = data\n    seen = set()\n    result = []\n    for ident,start,end,kind,detail,resolved in annotations:\n        if kind not in {'spelling','grammar','comment'} or kind not in types: continue\n        if resolved or not detail: continue\n        start,end = max(0,start),min(length,end)\n        if start >= end or ident in seen: continue\n        seen.add(ident)\n        result.append([ident,start,end,kind,detail])\n    return sorted(result,key=lambda row:(row[1],row[2],row[0]))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('contract fixture 1', solve([N+5,[['b',N,N+3,'comment','B',False],['a',N,N+2,'spelling','A',False],['c',N,N+2,'grammar','C',False]],['comment','spelling','grammar']],), [['a',N,N+2,'spelling','A'],['c',N,N+2,'grammar','C'],['b',N,N+3,'comment','B']])\ncheck('contract fixture 2', solve([4,[['a',-2,2,'comment','A',False],['b',2,8,'comment','B',False]],['comment']],), [['a',0,2,'comment','A'],['b',2,4,'comment','B']])\ncheck('contract fixture 3', solve([4,[['a',0,2,'comment','A',True],['b',0,2,'spelling','B',False],['c',0,2,'unknown','C',False],['d',0,2,'comment','',False]],['comment','unknown']],), [])\ncheck('contract fixture 4', solve([4,[['a',0,0,'comment','zero',False],['b',3,1,'comment','reverse',False]],['comment']],), [])\ncheck('contract fixture 5', solve([4,[['a',2,3,'comment','first',False],['a',0,1,'comment','later',False]],['comment']],), [['a',2,3,'comment','first']])\ncheck('contract fixture 6', solve([4,[['a',0,2,'comment','resolved',True],['a',1,3,'comment','live',False]],['comment']],), [['a',1,3,'comment','live']])\ncheck('contract fixture 7', solve([0,[],[]],), [])\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-annotation-ranges-requested-types","generated_at":"2026-09-29T14:45:45.812282+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 requested types decision: or kind not in types","root_cause":"The requested types decision in the annotation ranges adapter violates its declared contract.","sha256":"e06086210ae9fd6aba88b5188fe0e112328355205be53c691818d5268f92a58f","title":"Annotation queries ignore the requested type mask · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":43.728,"exit_code":1,"observations":[{"actual":[["a",1,3,"spelling","A"],["c",1,3,"grammar","C"],["b",1,4,"comment","B"]],"check":"contract fixture 1","expected":[["a",1,3,"spelling","A"],["c",1,3,"grammar","C"],["b",1,4,"comment","B"]],"passed":true},{"actual":[["a",0,2,"comment","A"],["b",2,4,"comment","B"]],"check":"contract fixture 2","expected":[["a",0,2,"comment","A"],["b",2,4,"comment","B"]],"passed":true},{"actual":[["b",0,2,"spelling","B"]],"check":"contract fixture 3","expected":[],"passed":false},{"actual":[],"check":"contract fixture 4","expected":[],"passed":true},{"actual":[["a",2,3,"comment","first"]],"check":"contract fixture 5","expected":[["a",2,3,"comment","first"]],"passed":true},{"actual":[["a",1,3,"comment","live"]],"check":"contract fixture 6","expected":[["a",1,3,"comment","live"]],"passed":true},{"actual":[],"check":"contract fixture 7","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"contract fixture 1\", \"actual\": [[\"a\", 1, 3, \"spelling\", \"A\"], [\"c\", 1, 3, \"grammar\", \"C\"], [\"b\", 1, 4, \"comment\", \"B\"]], \"expected\": [[\"a\", 1, 3, \"spelling\", \"A\"], [\"c\", 1, 3, \"grammar\", \"C\"], [\"b\", 1, 4, \"comment\", \"B\"]], \"passed\": true}, {\"check\": \"contract fixture 2\", \"actual\": [[\"a\", 0, 2, \"comment\", \"A\"], [\"b\", 2, 4, \"comment\", \"B\"]], \"expected\": [[\"a\", 0, 2, \"comment\", \"A\"], [\"b\", 2, 4, \"comment\", \"B\"]], \"passed\": true}, {\"check\": \"contract fixture 3\", \"actual\": [[\"b\", 0, 2, \"spelling\", \"B\"]], \"expected\": [], \"passed\": false}, {\"check\": \"contract fixture 4\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"contract fixture 5\", \"actual\": [[\"a\", 2, 3, \"comment\", \"first\"]], \"expected\": [[\"a\", 2, 3, \"comment\", \"first\"]], \"passed\": true}, {\"check\": \"contract fixture 6\", \"actual\": [[\"a\", 1, 3, \"comment\", \"live\"]], \"expected\": [[\"a\", 1, 3, \"comment\", \"live\"]], \"passed\": true}, {\"check\": \"contract fixture 7\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":44.39,"exit_code":1,"observations":[{"actual":[["a",1,3,"spelling","A"],["c",1,3,"grammar","C"],["b",1,4,"comment","B"]],"check":"contract fixture 1","expected":[["a",1,3,"spelling","A"],["c",1,3,"grammar","C"],["b",1,4,"comment","B"]],"passed":true},{"actual":[["a",0,2,"comment","A"],["b",2,4,"comment","B"]],"check":"contract fixture 2","expected":[["a",0,2,"comment","A"],["b",2,4,"comment","B"]],"passed":true},{"actual":[["b",0,2,"spelling","B"]],"check":"contract fixture 3","expected":[],"passed":false},{"actual":[],"check":"contract fixture 4","expected":[],"passed":true},{"actual":[["a",2,3,"comment","first"]],"check":"contract fixture 5","expected":[["a",2,3,"comment","first"]],"passed":true},{"actual":[["a",1,3,"comment","live"]],"check":"contract fixture 6","expected":[["a",1,3,"comment","live"]],"passed":true},{"actual":[],"check":"contract fixture 7","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"contract fixture 1\", \"actual\": [[\"a\", 1, 3, \"spelling\", \"A\"], [\"c\", 1, 3, \"grammar\", \"C\"], [\"b\", 1, 4, \"comment\", \"B\"]], \"expected\": [[\"a\", 1, 3, \"spelling\", \"A\"], [\"c\", 1, 3, \"grammar\", \"C\"], [\"b\", 1, 4, \"comment\", \"B\"]], \"passed\": true}, {\"check\": \"contract fixture 2\", \"actual\": [[\"a\", 0, 2, \"comment\", \"A\"], [\"b\", 2, 4, \"comment\", \"B\"]], \"expected\": [[\"a\", 0, 2, \"comment\", \"A\"], [\"b\", 2, 4, \"comment\", \"B\"]], \"passed\": true}, {\"check\": \"contract fixture 3\", \"actual\": [[\"b\", 0, 2, \"spelling\", \"B\"]], \"expected\": [], \"passed\": false}, {\"check\": \"contract fixture 4\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"contract fixture 5\", \"actual\": [[\"a\", 2, 3, \"comment\", \"first\"]], \"expected\": [[\"a\", 2, 3, \"comment\", \"first\"]], \"passed\": true}, {\"check\": \"contract fixture 6\", \"actual\": [[\"a\", 1, 3, \"comment\", \"live\"]], \"expected\": [[\"a\", 1, 3, \"comment\", \"live\"]], \"passed\": true}, {\"check\": \"contract fixture 7\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":40.244,"exit_code":0,"observations":[{"actual":[["a",1,3,"spelling","A"],["c",1,3,"grammar","C"],["b",1,4,"comment","B"]],"check":"contract fixture 1","expected":[["a",1,3,"spelling","A"],["c",1,3,"grammar","C"],["b",1,4,"comment","B"]],"passed":true},{"actual":[["a",0,2,"comment","A"],["b",2,4,"comment","B"]],"check":"contract fixture 2","expected":[["a",0,2,"comment","A"],["b",2,4,"comment","B"]],"passed":true},{"actual":[],"check":"contract fixture 3","expected":[],"passed":true},{"actual":[],"check":"contract fixture 4","expected":[],"passed":true},{"actual":[["a",2,3,"comment","first"]],"check":"contract fixture 5","expected":[["a",2,3,"comment","first"]],"passed":true},{"actual":[["a",1,3,"comment","live"]],"check":"contract fixture 6","expected":[["a",1,3,"comment","live"]],"passed":true},{"actual":[],"check":"contract fixture 7","expected":[],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"contract fixture 1\", \"actual\": [[\"a\", 1, 3, \"spelling\", \"A\"], [\"c\", 1, 3, \"grammar\", \"C\"], [\"b\", 1, 4, \"comment\", \"B\"]], \"expected\": [[\"a\", 1, 3, \"spelling\", \"A\"], [\"c\", 1, 3, \"grammar\", \"C\"], [\"b\", 1, 4, \"comment\", \"B\"]], \"passed\": true}, {\"check\": \"contract fixture 2\", \"actual\": [[\"a\", 0, 2, \"comment\", \"A\"], [\"b\", 2, 4, \"comment\", \"B\"]], \"expected\": [[\"a\", 0, 2, \"comment\", \"A\"], [\"b\", 2, 4, \"comment\", \"B\"]], \"passed\": true}, {\"check\": \"contract fixture 3\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"contract fixture 4\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"contract fixture 5\", \"actual\": [[\"a\", 2, 3, \"comment\", \"first\"]], \"expected\": [[\"a\", 2, 3, \"comment\", \"first\"]], \"passed\": true}, {\"check\": \"contract fixture 6\", \"actual\": [[\"a\", 1, 3, \"comment\", \"live\"]], \"expected\": [[\"a\", 1, 3, \"comment\", \"live\"]], \"passed\": true}, {\"check\": \"contract fixture 7\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}