{"abstract":"Insertion shifts spans at and after the insertion point.","category":"Annotation span alignment","checks":7,"contract":"For spans [start,end) and insertion [at,length), apply right affinity: endpoints at or after at shift by length; earlier endpoints stay fixed.","contract_signature":"spans, at, length","evaluation_group":"annotation-span-insert-shift","failed_approach":"Using right affinity for starts but strict-after movement for ends leaves spans ending exactly at the insertion point unshifted.","family":"w3-annotation-span-alignment-insert-shift","id":"FA-100141","implementations":{"attempt":{"sha256":"3b556edaf16a25c04b70dbd2d3fcfc33d06ae0f204696d9524b5c8cc0ccb0162","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(spans, at, length):\n    return [[s+(length if s>=at else 0), e+(length if e>at else 0)] for s,e in spans]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('strictly before', solve([[1,3]],4,N), [[1,3]])\ncheck('strictly after', solve([[5,8]],4,N), [[5+N,8+N]])\ncheck('at start follows inserted text', solve([[4,7]],4,N), [[4+N,7+N]])\ncheck('at end follows inserted text', solve([[1,4]],4,N), [[1,4+N]])\ncheck('empty span on insertion', solve([[4,4]],4,N), [[4+N,4+N]])\ncheck('empty spans list', solve([],4,N), [])\ncheck('zero length insertion', solve([[4,6]],4,0), [[4,6]])\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":"5dd8ffaf366c3c6dfcd2742f1f34fc7eba8647822d14c417ccfa85806c5800ae","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(spans, at, length):\n    return [[s+(length if s>at else 0), e+(length if e>at else 0)] for s,e in spans]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('strictly before', solve([[1,3]],4,N), [[1,3]])\ncheck('strictly after', solve([[5,8]],4,N), [[5+N,8+N]])\ncheck('at start follows inserted text', solve([[4,7]],4,N), [[4+N,7+N]])\ncheck('at end follows inserted text', solve([[1,4]],4,N), [[1,4+N]])\ncheck('empty span on insertion', solve([[4,4]],4,N), [[4+N,4+N]])\ncheck('empty spans list', solve([],4,N), [])\ncheck('zero length insertion', solve([[4,6]],4,0), [[4,6]])\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-insert-shift","generated_at":"2026-09-30T16:48:32.171503+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":"Both endpoints use strict-after movement, so a boundary at the insertion point does not follow the inserted text.","sha256":"9eae442fb0019c793c9b2441f30e68148f60c135010b0ae10819b360599472f8","title":"Insertion shifts spans at and after the insertion point · 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":30.296,"exit_code":1,"observations":[{"actual":[[1,3]],"check":"strictly before","expected":[[1,3]],"passed":true},{"actual":[[6,9]],"check":"strictly after","expected":[[6,9]],"passed":true},{"actual":[[5,8]],"check":"at start follows inserted text","expected":[[5,8]],"passed":true},{"actual":[[1,4]],"check":"at end follows inserted text","expected":[[1,5]],"passed":false},{"actual":[[5,4]],"check":"empty span on insertion","expected":[[5,5]],"passed":false},{"actual":[],"check":"empty spans list","expected":[],"passed":true},{"actual":[[4,6]],"check":"zero length insertion","expected":[[4,6]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"strictly before\", \"actual\": [[1, 3]], \"expected\": [[1, 3]], \"passed\": true}, {\"check\": \"strictly after\", \"actual\": [[6, 9]], \"expected\": [[6, 9]], \"passed\": true}, {\"check\": \"at start follows inserted text\", \"actual\": [[5, 8]], \"expected\": [[5, 8]], \"passed\": true}, {\"check\": \"at end follows inserted text\", \"actual\": [[1, 4]], \"expected\": [[1, 5]], \"passed\": false}, {\"check\": \"empty span on insertion\", \"actual\": [[5, 4]], \"expected\": [[5, 5]], \"passed\": false}, {\"check\": \"empty spans list\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"zero length insertion\", \"actual\": [[4, 6]], \"expected\": [[4, 6]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":29.521,"exit_code":1,"observations":[{"actual":[[1,3]],"check":"strictly before","expected":[[1,3]],"passed":true},{"actual":[[6,9]],"check":"strictly after","expected":[[6,9]],"passed":true},{"actual":[[4,8]],"check":"at start follows inserted text","expected":[[5,8]],"passed":false},{"actual":[[1,4]],"check":"at end follows inserted text","expected":[[1,5]],"passed":false},{"actual":[[4,4]],"check":"empty span on insertion","expected":[[5,5]],"passed":false},{"actual":[],"check":"empty spans list","expected":[],"passed":true},{"actual":[[4,6]],"check":"zero length insertion","expected":[[4,6]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"strictly before\", \"actual\": [[1, 3]], \"expected\": [[1, 3]], \"passed\": true}, {\"check\": \"strictly after\", \"actual\": [[6, 9]], \"expected\": [[6, 9]], \"passed\": true}, {\"check\": \"at start follows inserted text\", \"actual\": [[4, 8]], \"expected\": [[5, 8]], \"passed\": false}, {\"check\": \"at end follows inserted text\", \"actual\": [[1, 4]], \"expected\": [[1, 5]], \"passed\": false}, {\"check\": \"empty span on insertion\", \"actual\": [[4, 4]], \"expected\": [[5, 5]], \"passed\": false}, {\"check\": \"empty spans list\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"zero length insertion\", \"actual\": [[4, 6]], \"expected\": [[4, 6]], \"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."}}