{"abstract":"Repeated mention alignment always selects the first occurrence.","category":"Annotation span alignment","checks":7,"contract":"Return [start,end) for the first occurrence of needle at or after cursor, or None. Empty needle is invalid.","contract_signature":"text, needle, cursor","evaluation_group":"annotation-span-repeat-mention-cursor","failed_approach":"Allowing an empty needle returns the cursor as a zero-width match instead of rejecting it.","family":"w3-annotation-span-alignment-repeat-mention-cursor","id":"FA-100216","implementations":{"attempt":{"sha256":"8ca5ede1e9fee59ae65a3bf5b27db597c45c4f83087f402e8e6aaff5a5e53aa6","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(text, needle, cursor):\n    i=text.find(needle,cursor); return [i,i+len(needle)] if i>=0 else None\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('second repeated mention', solve('cat and cat','cat',4), [8,11])\ncheck('cursor inside earlier match', solve('banana','ana',2), [3,6])\ncheck('no later match', solve('cat cat','cat',5), None)\ncheck('empty needle', solve('abc','',0), None)\ncheck('single occurrence', solve('x'+str(N),'x',0), [0,1])\ncheck('match at cursor', solve('abc','b',1), [1,2])\ncheck('empty text', solve('','a',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":"0613bf3e14291fb79310bac79610685cb4281647f1ff99e7371d6746a35f6807","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(text, needle, cursor):\n    i=text.find(needle); return [i,i+len(needle)] if i>=0 else None\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('second repeated mention', solve('cat and cat','cat',4), [8,11])\ncheck('cursor inside earlier match', solve('banana','ana',2), [3,6])\ncheck('no later match', solve('cat cat','cat',5), None)\ncheck('empty needle', solve('abc','',0), None)\ncheck('single occurrence', solve('x'+str(N),'x',0), [0,1])\ncheck('match at cursor', solve('abc','b',1), [1,2])\ncheck('empty text', solve('','a',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":"Contracts use integer offsets, explicit edits, and supplied token boundaries; they do not define a tokenizer or production annotation format. 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":"w3-annotation-span-alignment-repeat-mention-cursor","generated_at":"2026-09-30T16:48:33.099017+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A small offline annotation transformation keeps span coordinates explicit when text or token boundaries change.","root_cause":"Occurrence lookup ignores the cursor after the prior annotation.","sha256":"a245f9a32bf27e676d9d50e0418ccb37efb47b446a8d19b91257cb7f11f72546","title":"Repeated mention alignment always selects the first occurrence · case 01","variant":1,"variant_policy":"The fixture code references N, supplied as 1 through 5. Fixed boundary checks may repeat. These records share one mechanism and must remain together in evaluation splits.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":26.876,"exit_code":1,"observations":[{"actual":[8,11],"check":"second repeated mention","expected":[8,11],"passed":true},{"actual":[3,6],"check":"cursor inside earlier match","expected":[3,6],"passed":true},{"actual":null,"check":"no later match","expected":null,"passed":true},{"actual":[0,0],"check":"empty needle","expected":null,"passed":false},{"actual":[0,1],"check":"single occurrence","expected":[0,1],"passed":true},{"actual":[1,2],"check":"match at cursor","expected":[1,2],"passed":true},{"actual":null,"check":"empty text","expected":null,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"second repeated mention\", \"actual\": [8, 11], \"expected\": [8, 11], \"passed\": true}, {\"check\": \"cursor inside earlier match\", \"actual\": [3, 6], \"expected\": [3, 6], \"passed\": true}, {\"check\": \"no later match\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"empty needle\", \"actual\": [0, 0], \"expected\": null, \"passed\": false}, {\"check\": \"single occurrence\", \"actual\": [0, 1], \"expected\": [0, 1], \"passed\": true}, {\"check\": \"match at cursor\", \"actual\": [1, 2], \"expected\": [1, 2], \"passed\": true}, {\"check\": \"empty text\", \"actual\": null, \"expected\": null, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":27.058,"exit_code":1,"observations":[{"actual":[0,3],"check":"second repeated mention","expected":[8,11],"passed":false},{"actual":[1,4],"check":"cursor inside earlier match","expected":[3,6],"passed":false},{"actual":[0,3],"check":"no later match","expected":null,"passed":false},{"actual":[0,0],"check":"empty needle","expected":null,"passed":false},{"actual":[0,1],"check":"single occurrence","expected":[0,1],"passed":true},{"actual":[1,2],"check":"match at cursor","expected":[1,2],"passed":true},{"actual":null,"check":"empty text","expected":null,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"second repeated mention\", \"actual\": [0, 3], \"expected\": [8, 11], \"passed\": false}, {\"check\": \"cursor inside earlier match\", \"actual\": [1, 4], \"expected\": [3, 6], \"passed\": false}, {\"check\": \"no later match\", \"actual\": [0, 3], \"expected\": null, \"passed\": false}, {\"check\": \"empty needle\", \"actual\": [0, 0], \"expected\": null, \"passed\": false}, {\"check\": \"single occurrence\", \"actual\": [0, 1], \"expected\": [0, 1], \"passed\": true}, {\"check\": \"match at cursor\", \"actual\": [1, 2], \"expected\": [1, 2], \"passed\": true}, {\"check\": \"empty text\", \"actual\": null, \"expected\": null, \"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."}}