FA-100141 / Annotation span alignment / Open access
Insertion shifts spans at and after the insertion point · case 01
Insertion shifts spans at and after the insertion point.
ROOT CAUSE
Both endpoints use strict-after movement, so a boundary at the insertion point does not follow the inserted text.
THE FAILURE
Both endpoints use strict-after movement, so a boundary at the insertion point does not follow the inserted text.
Unsuccessful approach: Using right affinity for starts but strict-after movement for ends leaves spans ending exactly at the insertion point unshifted.
Case contract
For spans [start,end) and insertion [at,length), apply right affinity: endpoints at or after at shift by length; earlier endpoints stay fixed.
Why this case matters
A small offline annotation transformation keeps span coordinates explicit when text or token boundaries change.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(spans, at, length):
return [[s+(length if s>at else 0), e+(length if e>at else 0)] for s,e in spans]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('strictly before', solve([[1,3]],4,N), [[1,3]])
check('strictly after', solve([[5,8]],4,N), [[5+N,8+N]])
check('at start follows inserted text', solve([[4,7]],4,N), [[4+N,7+N]])
check('at end follows inserted text', solve([[1,4]],4,N), [[1,4+N]])
check('empty span on insertion', solve([[4,4]],4,N), [[4+N,4+N]])
check('empty spans list', solve([],4,N), [])
check('zero length insertion', solve([[4,6]],4,0), [[4,6]])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| strictly before | [[1, 3]] | [[1, 3]] | Passed |
| strictly after | [[6, 9]] | [[6, 9]] | Passed |
| at start follows inserted text | [[4, 8]] | [[5, 8]] | Failed |
| at end follows inserted text | [[1, 4]] | [[1, 5]] | Failed |
| empty span on insertion | [[4, 4]] | [[5, 5]] | Failed |
| empty spans list | [] | [] | Passed |
| zero length insertion | [[4, 6]] | [[4, 6]] | Passed |
SHA-256 / 5dd8ffaf366c3c6dfcd2742f1f34fc7eba8647822d14c417ccfa85806c5800ae
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(spans, at, length):
return [[s+(length if s>=at else 0), e+(length if e>at else 0)] for s,e in spans]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('strictly before', solve([[1,3]],4,N), [[1,3]])
check('strictly after', solve([[5,8]],4,N), [[5+N,8+N]])
check('at start follows inserted text', solve([[4,7]],4,N), [[4+N,7+N]])
check('at end follows inserted text', solve([[1,4]],4,N), [[1,4+N]])
check('empty span on insertion', solve([[4,4]],4,N), [[4+N,4+N]])
check('empty spans list', solve([],4,N), [])
check('zero length insertion', solve([[4,6]],4,0), [[4,6]])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| strictly before | [[1, 3]] | [[1, 3]] | Passed |
| strictly after | [[6, 9]] | [[6, 9]] | Passed |
| at start follows inserted text | [[5, 8]] | [[5, 8]] | Passed |
| at end follows inserted text | [[1, 4]] | [[1, 5]] | Failed |
| empty span on insertion | [[5, 4]] | [[5, 5]] | Failed |
| empty spans list | [] | [] | Passed |
| zero length insertion | [[4, 6]] | [[4, 6]] | Passed |
SHA-256 / 3b556edaf16a25c04b70dbd2d3fcfc33d06ae0f204696d9524b5c8cc0ccb0162
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 7 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗Verification & scope
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.
Observations recorded using Python 3.12.14 at 2026-09-30T16:48:32.171503+00:00.
Case digest / 9eae442fb0019c793c9b2441f30e68148f60c135010b0ae10819b360599472f8